Skip to content

ci: use user-writable Rust paths on self-hosted runners#29

Merged
andybrown668 merged 1 commit into
mainfrom
ci/self-hosted-rust-paths
Jul 1, 2026
Merged

ci: use user-writable Rust paths on self-hosted runners#29
andybrown668 merged 1 commit into
mainfrom
ci/self-hosted-rust-paths

Conversation

@andybrown668

Copy link
Copy Markdown

Summary

  • Redirect RUSTUP_HOME and CARGO_HOME to user-writable paths on self-hosted lab runners before rustup runs.
  • Fixes CI failures where rustup toolchain install cannot write to root-owned /usr/local/rustup/tmp.

Test plan

  • Reproduce failure locally with default /usr/local/{rustup,cargo} paths
  • Verify rustup toolchain install stable succeeds with user-writable paths
  • Confirm Continuous Integration passes on self-hosted lab runners

Verification commands

export RUSTUP_HOME="$HOME/.rustup" CARGO_HOME="$HOME/.cargo"
mkdir -p "$RUSTUP_HOME" "$CARGO_HOME/bin"
rustup toolchain install stable --component rustfmt --component clippy --profile minimal --no-self-update

Made with Cursor

Lab runners expose root-owned /usr/local/{rustup,cargo}, which causes
rustup toolchain installs to fail with permission denied.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings July 1, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses CI failures on self-hosted “lab” runners by ensuring Rust tooling uses user-writable directories for RUSTUP_HOME and CARGO_HOME before any rustup-driven toolchain installation occurs.

Changes:

  • Introduces a reusable composite action (.github/actions/rust-paths) that sets RUSTUP_HOME, CARGO_HOME, and updates PATH on self-hosted runners.
  • Wires the new action into the main CI workflow in jobs that invoke dtolnay/rust-toolchain.
  • Integrates the same path configuration into the shared setup composite action so downstream jobs inherit the fix.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/ci.yml Adds the new rust-path configuration step before Rust toolchain setup in relevant jobs on self-hosted runners.
.github/actions/setup/action.yml Ensures the shared environment setup configures user-writable Rust paths before installing the toolchain.
.github/actions/rust-paths/action.yml Adds a composite action that redirects Rust tooling state to $HOME on self-hosted runners via GITHUB_ENV/GITHUB_PATH.

@andybrown668 andybrown668 enabled auto-merge July 1, 2026 15:02
@andybrown668 andybrown668 merged commit 3cfe3c7 into main Jul 1, 2026
14 of 20 checks passed
@andybrown668 andybrown668 deleted the ci/self-hosted-rust-paths branch July 1, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants