Debian Codegraph @

fast-glob/.github/workflows/benchmark.yml

raw
1 name: Benchmark
2
3 on:
4 - push
5
6 env:
7 BENCHMARK_LAUNCHES: 100
8 BENCHMARK_MAX_STDEV: 10
9 BENCHMARK_RETRIES: 3
10
11 jobs:
12 cancel:
13 name: Cancel previous jobs
14 if: github.ref != 'refs/heads/master'
15 runs-on: ubuntu-latest
16 timeout-minutes: 3
17 steps:
18 - name: Cancel previous jobs
19 uses: styfle/[email protected]
20 with:
21 workflow_id: 4198440
22 access_token: ${{ github.token }}
23
24 product:
25 name: Product benchmark
26 if: always()
27 needs:
28 - cancel
29 runs-on: ubuntu-latest
30 env:
31 BENCHMARK_TYPE: product
32 BENCHMARK_OPTIONS: '{}'
33 steps:
34 - name: Setup repository
35 uses: actions/checkout@v2
36 - name: Setup environment
37 uses: actions/setup-node@v1
38 with:
39 node-version: 16
40 - name: Install dependencies
41 run: npm install
42 - name: Compile sources
43 run: npm run compile
44 - name: Benchmark (async)
45 run: npm run bench-async
46 - name: Benchmark (stream)
47 run: npm run bench-stream
48 - name: Benchmark (sync)
49 run: npm run bench-sync
50
51 regress:
52 name: Regress benchmark with options (${{ matrix.benchmark_options }})
53 needs:
54 - cancel
55 runs-on: ubuntu-latest
56 strategy:
57 fail-fast: false
58 matrix:
59 benchmark_options:
60 - '{}'
61 - '{ "objectMode": true }'
62 - '{ "absolute": true }'
63 env:
64 BENCHMARK_TYPE: regression
65 BENCHMARK_OPTIONS: ${{ matrix.benchmark_options }}
66 steps:
67 - name: Setup repository
68 uses: actions/checkout@v2
69 - name: Setup environment
70 uses: actions/setup-node@v1
71 with:
72 node-version: 16
73 - name: Install dependencies
74 run: npm install
75 - name: Compile sources
76 run: npm run compile
77 - name: Benchmark (async)
78 run: npm run bench-async
79 - name: Benchmark (stream)
80 run: npm run bench-stream
81 - name: Benchmark (sync)
82 run: npm run bench-sync