chore: release main (#234) #214
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Benchmark build - main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: packages/amagaki/ | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout benchmark repo | |
uses: actions/checkout@v4 | |
with: | |
repository: blinkk/amagaki-benchmark | |
path: packages/amagaki/benchmark | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules-bm-pr | |
with: | |
path: | | |
~/.npm | |
node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Build amagaki and benchmark | |
run: | | |
npm install | |
npm run dev:start | |
node ./dist/src/cli.js --profile build benchmark | |
# Currently every benchmark comparison is happening against the previous benchmark | |
# and not against a 'standard' or consistent benchmark. This benchmark build is made | |
# to be the baseline benchmark that all following benchmark warnings are based against. | |
# Watching https://github.com/actions/cache/pull/489 | |
# Once there is a way to prevent the normal 'push' benchmark from overwriting the | |
# `main` benchmark this will become the baseline benchmark for future push benchmarks. | |
- name: Cached benchmark data | |
uses: actions/cache@v4 | |
with: | |
path: ./cache | |
key: ${{ runner.os }}-benchmark | |
- name: Create benchmark result | |
uses: rhysd/github-action-benchmark@v1 | |
with: | |
name: Amagaki profiling benchmark | |
tool: 'benchmarkjs' | |
output-file-path: packages/amagaki/benchmark/build/.amagaki/benchmark.txt | |
external-data-json-path: cache/benchmark-data.json |