Skip to content

Commit baad89c

Browse files
not-matthiasGuillaumeLagrange
authored andcommitted
ci: keep analysis and walltime matrix separated
1 parent 984f949 commit baad89c

1 file changed

Lines changed: 47 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132132
- run: cargo nextest run -p cargo-codspeed --partition hash:${{ matrix.partition }}/5
133133

134-
compat-integration-test:
134+
analysis-integration-test:
135135
strategy:
136136
matrix:
137137
package:
@@ -141,10 +141,12 @@ jobs:
141141
- codspeed-divan-compat-examples
142142
- codspeed-criterion-compat
143143
mode:
144-
- walltime
145-
- instrumentation
146144
- memory
147-
runs-on: ${{ matrix.mode == 'walltime' && 'codspeed-macro' || 'ubuntu-latest' }}
145+
- instrumentation
146+
include:
147+
- package: codspeed-criterion-compat
148+
features: async_futures
149+
runs-on: ubuntu-latest
148150
steps:
149151
- uses: actions/checkout@v4
150152
with:
@@ -157,16 +159,11 @@ jobs:
157159

158160
- run: cargo install --path crates/cargo-codspeed --locked
159161

160-
- name: Remove .cargo/config.toml to not force instrumentation mode
161-
if: ${{ matrix.mode != 'instrumentation' }}
162-
run: rm -f .cargo/config.toml
163-
164-
- run: |
165-
if [ "${{ matrix.package }}" = "codspeed-criterion-compat" ]; then
166-
cargo codspeed build -p ${{ matrix.package }} --features async_futures
167-
else
168-
cargo codspeed build -p ${{ matrix.package }}
169-
fi
162+
- name: Build the benchmarks
163+
run: |
164+
# Remove the cargo config else it forces instrumentation mode
165+
rm -f .cargo/config.toml
166+
cargo codspeed build -m ${{matrix.mode}} -p ${{ matrix.package }} ${{ matrix.features && format('--features {0}', matrix.features) || '' }}
170167
171168
- name: Run the benchmarks
172169
uses: CodSpeedHQ/action@main
@@ -176,6 +173,40 @@ jobs:
176173
run: cargo codspeed run
177174
mode: ${{ matrix.mode }}
178175

176+
walltime-integration-test:
177+
runs-on: codspeed-macro
178+
strategy:
179+
matrix:
180+
package:
181+
- codspeed-divan-compat
182+
- codspeed-divan-compat-examples
183+
- codspeed-criterion-compat
184+
steps:
185+
- uses: actions/checkout@v4
186+
with:
187+
submodules: true
188+
- uses: moonrepo/setup-rust@v1
189+
with:
190+
cache-target: release
191+
env:
192+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
193+
194+
- run: cargo install --path crates/cargo-codspeed --locked
195+
196+
- name: Build the benchmarks
197+
run: |
198+
# Remove the cargo config else it forces instrumentation mode
199+
rm -f .cargo/config.toml
200+
cargo codspeed build -p ${{ matrix.package }}
201+
202+
- name: Run the benchmarks
203+
uses: CodSpeedHQ/action@main
204+
env:
205+
MY_ENV_VAR: "YES"
206+
with:
207+
run: cargo codspeed run
208+
mode: walltime
209+
179210
musl-build-check:
180211
strategy:
181212
matrix:
@@ -210,7 +241,8 @@ jobs:
210241
- tests-without-cargo-codspeed
211242
- test-cargo-codspeed
212243
- msrv-check
213-
- compat-integration-test
244+
- analysis-integration-test
245+
- walltime-integration-test
214246
- musl-build-check
215247
steps:
216248
- uses: re-actors/alls-green@release/v1

0 commit comments

Comments
 (0)