-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 1.73 KB
/
Copy pathBench.yaml
File metadata and controls
77 lines (65 loc) · 1.73 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Benchmark
env:
DEBUG: 'napi:*'
APP_NAME: 'speedy-sourcemap'
MACOSX_DEPLOYMENT_TARGET: '10.13'
# https://github.com/SchrodingerZhu/snmalloc-rs
CACHE_FRIENDLY_OFFSET: 64
'on':
push:
branches:
- main
tags-ignore:
- '**'
paths-ignore:
- '**/*.md'
- LICENSE
- '**/*.gitignore'
- .editorconfig
- docs/**
pull_request: null
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
- name: Install pnpm
run: npm install -g pnpm
- name: Cache cargo
uses: Swatinem/rust-cache@v1
with:
key: ${{ matrix.settings.target }}-node@14-cargo-cache
- name: Cache NPM dependencies
uses: actions/cache@v2
with:
path: node_modules
key: npm-cache-lint-node@14-${{ hashFiles('pnpm-lock.yaml') }}
- name: 'Install wasm-pack'
uses: jetli/wasm-pack-action@v0.3.0
with:
version: 'latest'
- name: 'Install dependencies'
run: pnpm install --frozen-lockfile --registry https://registry.npm.taobao.org
- name: Build
run: |
pnpm build
- name: Run benchmark
run: |
pnpm bench | tee output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'benchmarkjs'
output-file-path: output.txt
auto-push: true
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-always: true