Skip to content

Commit d733077

Browse files
committed
debug
1 parent 09b81de commit d733077

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
cache-target: release
3939

4040
- run: cargo install --path crates/cargo-codspeed
41-
4241
- run: cargo codspeed build -p codspeed
4342
- run: cargo codspeed build -p codspeed-bencher-compat
4443
- run: cargo codspeed build --features async_futures -p codspeed-criterion-compat
@@ -48,3 +47,7 @@ jobs:
4847
with:
4948
run: cargo codspeed run
5049
token: ${{ secrets.CODSPEED_TOKEN }}
50+
- name: Tmate Session
51+
uses: mxschmitt/action-tmate@v3
52+
if: always()
53+
timeout-minutes: 15

crates/codspeed/src/utils.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::io;
1+
use std::io::{self, Write};
22
use std::path::{Path, PathBuf};
33
use std::process::Command;
44

@@ -44,7 +44,13 @@ pub fn get_cargo_workspace_root() -> PathBuf {
4444
.current_dir(env!("CARGO_MANIFEST_DIR"))
4545
.output()
4646
.expect("Failed to execute `cargo metadata`");
47-
47+
// Write stdout to /tmp/codspeed-cargo-metadata.txt
48+
let mut file = std::fs::File::create("/tmp/codspeed-cargo-metadata.txt").unwrap();
49+
file.write_all(&output.stdout).unwrap();
50+
file.flush().unwrap();
51+
let mut file = std::fs::File::create("/tmp/codspeed-cargo-metadata.err.txt").unwrap();
52+
file.write_all(&output.stderr).unwrap();
53+
file.flush().unwrap();
4854
let metadata: serde_json::Value =
4955
serde_json::from_slice(&output.stdout).expect("Failed to parse `cargo metadata` output");
5056

0 commit comments

Comments
 (0)