Skip to content

Commit a7ed93d

Browse files
committed
Set TMPDIR in CI and make --tempdir option work with FastGA
Two improvements for temp directory management: 1. CI: Set TMPDIR=$RUNNER_TEMP in workflow - GitHub Actions runners have limited /tmp space (~21GB) - RUNNER_TEMP is a dedicated temp directory cleaned after each job - This prevents 'disk space: 0 MB' errors that caused test failures 2. CLI: Make --tempdir option actually work with FastGA - The --tempdir flag existed but wasn't propagated to FastGA - Now sets TMPDIR environment variable when specified - FastGA uses this via Rust's tempfile crate (reads TMPDIR) - Logs temp directory setting when not in quiet mode This ensures FastGA's temporary files go to the right place both in CI (avoiding disk space issues) and when users specify --tempdir.
1 parent 97db3d2 commit a7ed93d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11+
TMPDIR: ${{ runner.temp }} # Use GitHub's temp directory for FastGA temporary files
1112

1213
jobs:
1314
test:

src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,14 @@ fn main() -> Result<()> {
14151415
timing.log("start", &format!("{} | {}", timestamp, cmd_line.join(" ")));
14161416
}
14171417

1418+
// Set TMPDIR if --tempdir is specified (FastGA uses this via Rust's tempfile crate)
1419+
if let Some(ref tempdir) = args.tempdir {
1420+
std::env::set_var("TMPDIR", tempdir);
1421+
if !args.quiet {
1422+
timing.log("tempdir", &format!("Using temp directory: {}", tempdir));
1423+
}
1424+
}
1425+
14181426
// Track alignment time separately
14191427
let mut alignment_time: Option<f64> = None;
14201428

0 commit comments

Comments
 (0)