From 48da203e78bcb082e66c398f441adf895d634c7f Mon Sep 17 00:00:00 2001 From: Kaden Schutt Date: Fri, 4 Sep 2026 07:43:46 +0000 Subject: [PATCH] fix(hw-gate): import the runner user's login toolchain before building Second live run on #686 (33849478193): Sol authorized hardware, both lanes started, both failed inside 40 s with "[Errno 2] No such file or directory: 'cargo'". No GPU was ever touched. Both runners are systemd services. `actions-runner/.path` was written at install (2026-07-11) and is the distro default PATH; the service environment has no ~/.cargo/bin, no /opt/rocm/core/bin, no ROCM_PATH. The #679 evidence runs were driven by hand from a login shell, which is why this never surfaced. Nothing on either host changed. hw-run and fable-decide now import the runner user's login PATH and the ROCm variables (ROCM_PATH, HIP_PATH, HSA_PATH, HIP_PLATFORM, LD_LIBRARY_PATH) via GITHUB_PATH / GITHUB_ENV before the build steps. Verified under a bare service environment on hiptrx: the step yields ROCM_PATH=/opt/rocm/core, HIP_PATH, LD_LIBRARY_PATH, and cargo/hipcc/omp resolve. hipx's login shell carries the same variables. --- .github/workflows/hw-gate.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/hw-gate.yml b/.github/workflows/hw-gate.yml index 187825f2a..b290fbbf2 100644 --- a/.github/workflows/hw-gate.yml +++ b/.github/workflows/hw-gate.yml @@ -224,6 +224,15 @@ jobs: with: name: hw-gate-prelim path: prelim + - name: Login-shell toolchain (the runner service PATH has neither cargo nor ROCm) + # Both runners are systemd services: PATH is the distro default, so + # `cargo` and `hipcc` are not found (run 33849478193 failed both lanes in + # 40 s with "[Errno 2] No such file or directory: 'cargo'"). The runner + # user's login shell has the toolchain; import it for the steps below. + run: | + set -euo pipefail + bash -lc 'echo "$PATH"' | tr ':' '\n' >> "$GITHUB_PATH" + bash -lc 'env' | grep -E '^(ROCM_PATH|HIP_PATH|HSA_PATH|HIP_PLATFORM|LD_LIBRARY_PATH)=' >> "$GITHUB_ENV" || true - name: "Run routes (shared GPU lock: coexists with other lanes, excludes a Fable session)" run: | set -euo pipefail @@ -352,6 +361,11 @@ jobs: ref: ${{ needs.select.outputs.head_sha }} path: pr fetch-depth: 0 + - name: Login-shell toolchain (the runner service PATH has neither cargo nor ROCm) + run: | + set -euo pipefail + bash -lc 'echo "$PATH"' | tr ':' '\n' >> "$GITHUB_PATH" + bash -lc 'env' | grep -E '^(ROCM_PATH|HIP_PATH|HSA_PATH|HIP_PLATFORM|LD_LIBRARY_PATH)=' >> "$GITHUB_ENV" || true - name: Build PR head and base branch run: | set -euo pipefail