88
99jobs :
1010 codspeed-instrumented :
11- name : Run CodSpeed instrumented
11+ name : Run CodSpeed instrumented (${{ matrix.plugin }})
1212 runs-on : " ubuntu-latest"
13+ strategy :
14+ fail-fast : false
15+ # Shard by plugin so the benchmark groups run in parallel instead of
16+ # sequentially. CodSpeed aggregates the per-shard uploads on the commit.
17+ matrix :
18+ include :
19+ - plugin : tinybench
20+ bench : |
21+ pnpm turbo run bench --filter=@codspeed/tinybench-plugin
22+ pnpm --workspace-concurrency 1 -r bench-tinybench
23+ - plugin : vitest
24+ bench : |
25+ pnpm turbo run bench --filter=@codspeed/vitest-plugin
26+ pnpm --workspace-concurrency 1 -r bench-vitest
27+ - plugin : benchmark.js
28+ bench : |
29+ pnpm turbo run bench --filter=@codspeed/benchmark.js-plugin
30+ pnpm --workspace-concurrency 1 -r bench-benchmark-js
1331 steps :
1432 - uses : " actions/checkout@v4"
1533 with :
@@ -20,32 +38,22 @@ jobs:
2038 with :
2139 cache : pnpm
2240 node-version-file : .nvmrc
41+ - name : Restore turbo cache
42+ uses : ./.github/actions/turbo-cache
2343 - run : pnpm install --frozen-lockfile --prefer-offline
2444 - run : pnpm turbo run build
2545
2646 - name : Run simulation benchmarks
2747 uses : CodSpeedHQ/action@main
2848 with :
2949 mode : simulation
30- run : |
31- pnpm turbo run bench --filter=@codspeed/tinybench-plugin
32- pnpm turbo run bench --filter=@codspeed/vitest-plugin
33- pnpm turbo run bench --filter=@codspeed/benchmark.js-plugin
34- pnpm --workspace-concurrency 1 -r bench-tinybench
35- pnpm --workspace-concurrency 1 -r bench-benchmark-js
36- pnpm --workspace-concurrency 1 -r bench-vitest
50+ run : ${{ matrix.bench }}
3751
3852 - name : Run memory benchmarks
3953 uses : CodSpeedHQ/action@main
4054 with :
4155 mode : memory
42- run : |
43- pnpm turbo run bench --filter=@codspeed/tinybench-plugin
44- pnpm turbo run bench --filter=@codspeed/vitest-plugin
45- pnpm turbo run bench --filter=@codspeed/benchmark.js-plugin
46- pnpm --workspace-concurrency 1 -r bench-tinybench
47- pnpm --workspace-concurrency 1 -r bench-benchmark-js
48- pnpm --workspace-concurrency 1 -r bench-vitest
56+ run : ${{ matrix.bench }}
4957
5058 codspeed-walltime :
5159 name : Run CodSpeed walltime
6068 with :
6169 cache : pnpm
6270 node-version-file : .nvmrc
71+ - name : Restore turbo cache
72+ uses : ./.github/actions/turbo-cache
6373 - run : pnpm install --frozen-lockfile --prefer-offline
6474 - run : pnpm turbo run build
6575
@@ -100,6 +110,9 @@ jobs:
100110 node-version-file : .nvmrc
101111 cache : pnpm
102112
113+ - name : Restore turbo cache
114+ uses : ./.github/actions/turbo-cache
115+
103116 - name : Install repo dependencies
104117 run : pnpm install --frozen-lockfile --prefer-offline
105118
0 commit comments