-
Notifications
You must be signed in to change notification settings - Fork 32
fix: add Rust toolchain setup and RUSTUP_HOME support for chroot package manager tests #797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -292,6 +292,11 @@ AWFEOF | |
| echo "[entrypoint] Adding CARGO_HOME/bin to PATH: ${AWF_CARGO_HOME}/bin" | ||
| echo "export PATH=\"${AWF_CARGO_HOME}/bin:\$PATH\"" >> "/host${SCRIPT_FILE}" | ||
| echo "export CARGO_HOME=\"${AWF_CARGO_HOME}\"" >> "/host${SCRIPT_FILE}" | ||
| # Also set RUSTUP_HOME if provided (needed for rustc to find toolchain) | ||
| if [ -n "${AWF_RUSTUP_HOME}" ]; then | ||
| echo "[entrypoint] Setting RUSTUP_HOME: ${AWF_RUSTUP_HOME}" | ||
| echo "export RUSTUP_HOME=\"${AWF_RUSTUP_HOME}\"" >> "/host${SCRIPT_FILE}" | ||
| fi | ||
|
Comment on lines
+295
to
+299
|
||
| else | ||
| # Fallback: detect Cargo from default location if CARGO_HOME not provided | ||
| # This ensures Rust binaries work even when CARGO_HOME env var is not set | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -358,6 +358,10 @@ export function generateDockerCompose( | |
| if (process.env.CARGO_HOME) { | ||
| environment.AWF_CARGO_HOME = process.env.CARGO_HOME; | ||
| } | ||
| // Rust: Pass RUSTUP_HOME so rustc/cargo can find the toolchain | ||
| if (process.env.RUSTUP_HOME) { | ||
| environment.AWF_RUSTUP_HOME = process.env.RUSTUP_HOME; | ||
| } | ||
|
Comment on lines
+361
to
+364
|
||
| // Java: Pass JAVA_HOME so entrypoint can add $JAVA_HOME/bin to PATH and set JAVA_HOME | ||
| if (process.env.JAVA_HOME) { | ||
| environment.AWF_JAVA_HOME = process.env.JAVA_HOME; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow pins most third-party actions to an immutable commit SHA, but
dtolnay/rust-toolchain@stableis a moving ref. Since this step was modified, consider pinning it to a specific commit SHA as well to reduce supply-chain risk and improve CI reproducibility.