Skip to content

Commit 28ec14a

Browse files
authored
fix(ci): detect CI env inside maturin Docker containers (#556)
The maturin-action runs cargo inside a manylinux Docker container that receives GITHUB_ACTIONS but not the CI environment variable. This causes the build.rs CI detection to fail, skipping the local build/agentd and attempting to download it from a GitHub release URL that does not yet exist during the release workflow. Also check GITHUB_ACTIONS so the locally-built agentd is found inside the container.
1 parent f97c2c1 commit 28ec14a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

crates/filesystem/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ fn build_agentd(workspace_root: &Path, out_dir: &Path) {
3030
}
3131

3232
// In CI, prefer the locally-built agentd from workspace build/.
33-
if std::env::var_os("CI").is_some() {
33+
// Check both CI (standard) and GITHUB_ACTIONS (set inside maturin Docker containers
34+
// where CI is not forwarded).
35+
if std::env::var_os("CI").is_some() || std::env::var_os("GITHUB_ACTIONS").is_some() {
3436
let local = workspace_root.join("build").join(AGENTD_BINARY);
3537
if local.is_file() {
3638
std::fs::copy(&local, &dest).expect("failed to copy agentd from build/");

0 commit comments

Comments
 (0)