Skip to content

[WIP] Replace dtolnay/rust-toolchain action with rustup commands#141

Closed
Copilot wants to merge 1 commit intozizmorfrom
copilot/replace-dtolnay-action-with-rustup
Closed

[WIP] Replace dtolnay/rust-toolchain action with rustup commands#141
Copilot wants to merge 1 commit intozizmorfrom
copilot/replace-dtolnay-action-with-rustup

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 4, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Replace all uses of dtolnay/rust-toolchain action with equivalent rustup shell commands in the CI workflows.

Background

The zizmor branch has been working on pinning actions and addressing security concerns. The dtolnay/rust-toolchain action was intentionally left unpinned because alternatives should be explored first, including manual rustup commands. This PR implements that alternative.

Changes Required

.github/workflows/ci.yml

Replace dtolnay/rust-toolchain in the following jobs:

  1. test (line 190) - Ubuntu only

    • Replace uses: dtolnay/rust-toolchain@stable with:
    - name: Install Rust
      run: |
        rustup update stable
        rustup default stable
  2. test-journey (line 214) - Ubuntu only

    • Same replacement as test
  3. test-fast (line 242) - Multi-platform including Windows

    • Replace with (note shell: bash since this runs on Windows):
    - name: Install Rust
      shell: bash
      run: |
        rustup update stable
        rustup default stable
  4. test-fixtures-windows (line 302) - Windows only

    • Replace with (note shell: bash):
    - name: Install Rust
      shell: bash
      run: |
        rustup update stable
        rustup default stable
  5. test-32bit-windows-size-doc (lines 413-415) - Windows only

    • Replace uses: dtolnay/rust-toolchain@stable with targets: ${{ env.TARGET }} with:
    - name: Install Rust
      shell: bash
      run: |
        rustup update stable
        rustup default stable
        rustup target add "$TARGET"
    • Note: $TARGET is already defined at job-level env as i686-pc-windows-msvc
  6. lint (lines 434-437) - Ubuntu only

    • Replace uses: dtolnay/rust-toolchain@master with toolchain: stable and components: clippy,rustfmt with:
    - name: Install Rust
      run: |
        rustup update stable
        rustup default stable
        rustup component add clippy rustfmt

.github/workflows/release.yml

  1. build-release (lines 250-254)

    • Replace uses: dtolnay/rust-toolchain@master with toolchain: ${{ matrix.rust }} and targets: ${{ matrix.target }} with:
    - name: Install Rust
      env:
        RUST: ${{ matrix.rust }}
      run: |
        rustup update "$RUST"
        rustup default "$RUST"
        rustup target add "$TARGET"
    • Note: $TARGET is already defined at job-level env. RUST is defined at step-level because it's only needed in this step.
    • Do NOT specify shell: since the workflow has a default of bash at the workflow level.
  2. installation (lines 546-550)

    • Move the step-level env: variables RUST and TARGET from the existing cargo install step (lines 557-559) to the job-level env: block
    • Replace uses: dtolnay/rust-toolchain@master with:
    - name: Install Rust
      run: |
        rustup update "$RUST"
        rustup default "$RUST"
        rustup target add "$TARGET"
    • Update the existing "Installation from crates.io" step to remove its step-level env: block (since RUST and TARGET will now be at job level)
    • Do NOT specify shell: since the workflow has a default of bash at the workflow level.

Important Guidelines

  • Do NOT use ${{ }} interpolation inside shell script run: blocks - use environment variables instead
  • Only specify shell: bash when necessary (i.e., on Windows jobs in ci.yml where there's no workflow-level default)
  • Do NOT specify shell: bash in release.yml jobs since there's already a workflow-level default
  • Follow the existing pattern used in the wasm job of ci.yml which already uses manual rustup commands

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Copy Markdown
Owner

@EliahKagan EliahKagan left a comment

Choose a reason for hiding this comment

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

Although this error has happened before when it shouldn't, I've done a fair bit of testing of Copilot features over a short time very recently and the error message might potentially be accurate. (This review is basically a note to self to check that before reporting a bug.) I'll close this.

@EliahKagan EliahKagan closed this Jan 4, 2026
@EliahKagan EliahKagan deleted the copilot/replace-dtolnay-action-with-rustup branch January 4, 2026 04:15
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