Skip to content

Commit 99785ae

Browse files
committed
chore(ci): add memory profiling
1 parent 238398e commit 99785ae

1 file changed

Lines changed: 19 additions & 41 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -127,47 +127,20 @@ jobs:
127127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128128
- run: cargo nextest run -p cargo-codspeed --partition hash:${{ matrix.partition }}/5
129129

130-
compat-integration-test-instrumentation:
131-
runs-on: ubuntu-latest
132-
strategy:
133-
matrix:
134-
build-args:
135-
- "-p codspeed"
136-
- "-p codspeed-bencher-compat"
137-
- "--features async_futures -p codspeed-criterion-compat"
138-
- "-p codspeed-divan-compat"
139-
- "-p codspeed-divan-compat-examples"
140-
steps:
141-
- uses: actions/checkout@v4
142-
with:
143-
submodules: true
144-
- uses: moonrepo/setup-rust@v1
145-
with:
146-
cache-target: release
147-
env:
148-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149-
150-
- run: cargo install --path crates/cargo-codspeed --locked
151-
152-
- run: cargo codspeed build ${{ matrix.build-args }}
153-
154-
- name: Run the benchmarks
155-
uses: CodSpeedHQ/action@main
156-
env:
157-
MY_ENV_VAR: "YES"
158-
with:
159-
run: cargo codspeed run
160-
mode: instrumentation
161-
token: ${{ secrets.CODSPEED_TOKEN }}
162-
163-
compat-integration-test-walltime:
164-
runs-on: codspeed-macro
130+
compat-integration-test:
165131
strategy:
166132
matrix:
167133
package:
134+
- codspeed
135+
- codspeed-bencher-compat
168136
- codspeed-divan-compat
169137
- codspeed-divan-compat-examples
170138
- codspeed-criterion-compat
139+
mode:
140+
- walltime
141+
- instrumentation
142+
- memory
143+
runs-on: ${{ matrix.mode == 'walltime' && 'codspeed-macro' || 'ubuntu-latest' }}
171144
steps:
172145
- uses: actions/checkout@v4
173146
with:
@@ -180,18 +153,24 @@ jobs:
180153

181154
- run: cargo install --path crates/cargo-codspeed --locked
182155

156+
- name: Remove .cargo/config.toml to not force instrumentation mode
157+
if: ${{ matrix.mode != 'instrumentation' }}
158+
run: rm -f .cargo/config.toml
159+
183160
- run: |
184-
# Remove the cargo config else it forces instrumentation mode
185-
rm -f .cargo/config.toml
186-
cargo codspeed build -p ${{ matrix.package }}
161+
if [ "${{ matrix.package }}" = "codspeed-criterion-compat" ]; then
162+
cargo codspeed build -p ${{ matrix.package }} --features async_futures
163+
else
164+
cargo codspeed build -p ${{ matrix.package }}
165+
fi
187166
188167
- name: Run the benchmarks
189168
uses: CodSpeedHQ/action@main
190169
env:
191170
MY_ENV_VAR: "YES"
192171
with:
193172
run: cargo codspeed run
194-
mode: walltime
173+
mode: ${{ matrix.mode }}
195174
token: ${{ secrets.CODSPEED_TOKEN }}
196175

197176
musl-build-check:
@@ -228,8 +207,7 @@ jobs:
228207
- tests-without-cargo-codspeed
229208
- test-cargo-codspeed
230209
- msrv-check
231-
- compat-integration-test-instrumentation
232-
- compat-integration-test-walltime
210+
- compat-integration-test
233211
- musl-build-check
234212
steps:
235213
- uses: re-actors/alls-green@release/v1

0 commit comments

Comments
 (0)