Remove dtolnay's rust-toolchain action (#442)

* Remove dtolnay's rust-toolchain action

I believe our rust-toolchain.toml handles its use case exactly.

I don't believe this'll work, as it'd require rustup install a cargo stub
before any toolchain is installed, yet I want to confirm it doesn't.

* Place quotes around nightly toolchain version

* Put toolchain before options to resolve what appears to be a bug in rustup's help strings

* Add wasm32-unkknown-unknown to clippy workflow
This commit is contained in:
Luke Parker 2023-11-20 02:31:22 -05:00 committed by GitHub
parent b37a0db538
commit 7c9b581723
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 35 deletions

View file

@ -7,16 +7,6 @@ inputs:
require: true require: true
default: default:
rust-toolchain:
description: "Rust toolchain to install"
required: false
default: 1.74.0
rust-components:
description: "Rust components to install"
required: false
default: rust-src, clippy
runs: runs:
using: "composite" using: "composite"
steps: steps:
@ -47,12 +37,5 @@ runs:
svm install 0.8.16 svm install 0.8.16
svm use 0.8.16 svm use 0.8.16
- name: Install Rust
uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0
with:
toolchain: ${{ inputs.rust-toolchain }}
components: ${{ inputs.rust-components }}
targets: wasm32-unknown-unknown
# - name: Cache Rust # - name: Cache Rust
# uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43

View file

@ -17,11 +17,6 @@ jobs:
path: ~/.cargo/advisory-db path: ~/.cargo/advisory-db
key: rust-advisory-db key: rust-advisory-db
- name: Install cargo
uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0
with:
toolchain: 1.74.0
- name: Install cargo deny - name: Install cargo deny
run: cargo install --locked cargo-deny run: cargo install --locked cargo-deny

View file

@ -21,11 +21,12 @@ jobs:
uses: ./.github/actions/build-dependencies uses: ./.github/actions/build-dependencies
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
rust-toolchain: ${{ steps.nightly.outputs.version }}
rust-components: rust-src, clippy - name: Install nightly rust
run: rustup toolchain install ${{ steps.nightly.outputs.version }} --profile minimal -t wasm32-unknown-unknown -c clippy
- name: Run Clippy - name: Run Clippy
run: cargo clippy --all-features --all-targets -- -D warnings -A clippy::items_after_test_module run: cargo +${{ steps.nightly.outputs.version }} clippy --all-features --all-targets -- -D warnings -A clippy::items_after_test_module
deny: deny:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -38,11 +39,6 @@ jobs:
path: ~/.cargo/advisory-db path: ~/.cargo/advisory-db
key: rust-advisory-db key: rust-advisory-db
- name: Install cargo
uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0
with:
toolchain: 1.74.0
- name: Install cargo deny - name: Install cargo deny
run: cargo install --locked cargo-deny run: cargo install --locked cargo-deny
@ -58,11 +54,8 @@ jobs:
id: nightly id: nightly
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
- name: Install rustfmt - name: Install nightly rust
uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 run: rustup toolchain install ${{ steps.nightly.outputs.version }} --profile minimal -c rustfmt
with:
toolchain: ${{ steps.nightly.outputs.version }}
components: rustfmt
- name: Run rustfmt - name: Run rustfmt
run: cargo +${{ steps.nightly.outputs.version }} fmt -- --check run: cargo +${{ steps.nightly.outputs.version }} fmt -- --check