ci: use user-writable Rust paths on self-hosted runners#29
Merged
Conversation
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>
There was a problem hiding this comment.
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 setsRUSTUP_HOME,CARGO_HOME, and updatesPATHon 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
setupcomposite 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RUSTUP_HOMEandCARGO_HOMEto user-writable paths on self-hosted lab runners before rustup runs.rustup toolchain installcannot write to root-owned/usr/local/rustup/tmp.Test plan
/usr/local/{rustup,cargo}pathsrustup toolchain install stablesucceeds with user-writable pathsVerification commands
Made with Cursor