Skip to content

Commit

Permalink
ci: remove usage of actions-rs/toolchain@v1 as it is not actively mai…
Browse files Browse the repository at this point in the history
…ntained

dtolnay/rust-toolchain provides similar functionality, however requires an additional step when using the nightly toolchain because it does not support the override option.

Signed-off-by: Reuben Miller <[email protected]>
  • Loading branch information
reubenmiller committed Jun 1, 2023
1 parent 402fa50 commit 2d6b441
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ jobs:
- uses: actions/checkout@v3

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
override: true
- run: rustup override set ${{steps.toolchain.outputs.name}}

- name: Run cargo-udeps
uses: aig787/cargo-udeps-action@v1
Expand Down Expand Up @@ -202,12 +203,17 @@ jobs:
uses: actions/checkout@v3

# Nightly toolchain is needed for cargo fmt since issue: https://github.com/thin-edge/thin-edge.io/issues/1660
# dtolnay/rust-toolchain is preferred over actions-rs/toolchain is currently not maintained and currently using
# deprecated GHA api (see https://github.com/actions-rs/toolchain/issues/219).
# However since dtolnay/rust-toolchain does not support the 'override' option, an additional call to
# rustup override is required (see https://github.com/dtolnay/rust-toolchain/issues/29#issuecomment-1412903426)
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt
override: true
- run: rustup override set ${{steps.toolchain.outputs.name}}

- name: Cargo fmt --version
uses: actions-rs/cargo@v1
Expand Down

0 comments on commit 2d6b441

Please sign in to comment.