Skip to content

Commit d329455

Browse files
committed
fix: ci and small refactoring
1 parent 78ac679 commit d329455

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/benchmark.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ jobs:
3131
bins: cargo-codspeed
3232

3333
- name: Build the benchmark target(s)
34-
run: cd crates/pixi_bench && cargo codspeed build && cd ../../
34+
run: cargo codspeed build -p pixi_bench
3535

3636
- name: Run the benchmarks
37-
uses: CodSpeedHQ/action@v3
37+
uses: CodSpeedHQ/action@v4
3838
with:
39-
run: cd crates/pixi_bench && cargo codspeed run && cd ../../
39+
run: cargo codspeed run -p pixi_bench
40+
mode: "instrumentation"
4041
token: ${{ secrets.CODSPEED_TOKEN }}

crates/pixi_bench/benches/cold_warm_install.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,9 @@ platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
298298
packages: &[&str],
299299
) -> Result<Duration, Box<dyn std::error::Error>> {
300300
let mut cmd = Command::new("pixi");
301-
cmd.arg("install").current_dir(&self.project_dir);
302-
303-
for (key, value) in self.get_env_vars() {
304-
cmd.env(key, value);
305-
}
301+
cmd.arg("install")
302+
.current_dir(&self.project_dir)
303+
.envs(&self.get_env_vars());
306304

307305
println!("⏱️ Timing: pixi install {} packages", packages.len());
308306

0 commit comments

Comments
 (0)