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,24 @@ jobs:
2038 with :
2139 cache : pnpm
2240 node-version-file : .nvmrc
41+ - name : Restore turbo cache
42+ uses : ./.github/actions/turbo-cache
43+ with :
44+ key-suffix : ${{ matrix.plugin }}
2345 - run : pnpm install --frozen-lockfile --prefer-offline
2446 - run : pnpm turbo run build
2547
2648 - name : Run simulation benchmarks
2749 uses : CodSpeedHQ/action@main
2850 with :
2951 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
52+ run : ${{ matrix.bench }}
3753
3854 - name : Run memory benchmarks
3955 uses : CodSpeedHQ/action@main
4056 with :
4157 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
58+ run : ${{ matrix.bench }}
4959
5060 codspeed-walltime :
5161 name : Run CodSpeed walltime
6070 with :
6171 cache : pnpm
6272 node-version-file : .nvmrc
73+ - name : Restore turbo cache
74+ uses : ./.github/actions/turbo-cache
6375 - run : pnpm install --frozen-lockfile --prefer-offline
6476 - run : pnpm turbo run build
6577
@@ -100,6 +112,9 @@ jobs:
100112 node-version-file : .nvmrc
101113 cache : pnpm
102114
115+ - name : Restore turbo cache
116+ uses : ./.github/actions/turbo-cache
117+
103118 - name : Install repo dependencies
104119 run : pnpm install --frozen-lockfile --prefer-offline
105120
0 commit comments