-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (54 loc) · 1.87 KB
/
benchmark-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Benchmark build - main
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/amagaki/
steps:
- uses: actions/checkout@v2
- name: Checkout benchmark repo
uses: actions/checkout@v2
with:
repository: blinkk/amagaki-benchmark
path: packages/amagaki/benchmark
- name: Cache node modules
uses: actions/cache@v2
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@v2
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