From 88e8a5763bfb1c2bf0660f6d6a2eee82d2bfd1eb Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Thu, 12 Feb 2026 07:38:23 +0000 Subject: [PATCH 1/2] Initial plan From 8e1e78701bd6ed08d16d78dcfc965345a55b7e0e Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Thu, 12 Feb 2026 07:40:47 +0000 Subject: [PATCH 2/2] fix(ci): detect and set CARGO_HOME explicitly for rust tests Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --- .github/workflows/test-chroot.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-chroot.yml b/.github/workflows/test-chroot.yml index c2097cbe2..fd90e455f 100644 --- a/.github/workflows/test-chroot.yml +++ b/.github/workflows/test-chroot.yml @@ -183,11 +183,22 @@ jobs: echo "Captured GOROOT: ${GOROOT_VALUE}" # Rust/Cargo: CARGO_HOME is needed so entrypoint can add $CARGO_HOME/bin to PATH - # The rust-toolchain action sets CARGO_HOME but sudo may not preserve it + # The rust-toolchain action doesn't set CARGO_HOME, so detect it from cargo location if [ -n "$CARGO_HOME" ]; then - echo "CARGO_HOME=${CARGO_HOME}" >> $GITHUB_ENV - echo "Captured CARGO_HOME: ${CARGO_HOME}" + CARGO_HOME_VALUE="$CARGO_HOME" + else + # Detect CARGO_HOME from cargo binary location (usually ~/.cargo) + CARGO_BIN=$(which cargo 2>/dev/null || echo "") + if [ -n "$CARGO_BIN" ]; then + # cargo is at $CARGO_HOME/bin/cargo, so strip /bin/cargo + CARGO_HOME_VALUE=$(dirname "$(dirname "$CARGO_BIN")") + else + # Fallback to default location + CARGO_HOME_VALUE="$HOME/.cargo" + fi fi + echo "CARGO_HOME=${CARGO_HOME_VALUE}" >> $GITHUB_ENV + echo "Captured CARGO_HOME: ${CARGO_HOME_VALUE}" # Java: JAVA_HOME is needed so entrypoint can add $JAVA_HOME/bin to PATH # The setup-java action sets JAVA_HOME but sudo may not preserve it