Move to dtolnay/toolchain (#211)

* Move to dtolnay/toolchain

* Correct dtolnay/toolchain to rust-roolchain

* Pass toolchain by argument instead of revision

Introduces malleability by referring to HEAD of dtolnay, yet GHA errored on the
prior syntax.
This commit is contained in:
Luke Parker 2023-01-09 17:21:31 -05:00 committed by GitHub
parent 97a94a0bf8
commit ea7c281a47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 49 deletions

View file

@ -33,7 +33,7 @@ runs:
solc-select use 0.8.16
- name: Install Rust
uses: ./.github/actions/cached-rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ inputs.rust-toolchain }}
components: ${{ inputs.rust-components }}
@ -44,8 +44,7 @@ runs:
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
- name: Install WASM toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.nightly.outputs.version }}
profile: minimal
target: wasm32-unknown-unknown
targets: wasm32-unknown-unknown

View file

@ -1,34 +0,0 @@
name: cached-rust
description: Installs Rust, caching ~/.cargo and ./target
inputs:
toolchain:
description: "Toolchain to install"
required: false
default: stable
components:
description: "Components to install"
required: false
default:
runs:
using: "composite"
steps:
- name: Rust Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: ${{ runner.os }}-${{ runner.arch }}-rust-${{ steps.install-rust.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ runner.arch }}-rust-${{ steps.install-rust.outputs.rustc_hash }}-
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ inputs.toolchain }}
profile: minimal
default: true
components: ${{ inputs.components }}

View file

@ -18,10 +18,7 @@ jobs:
key: rust-advisory-db
- name: Install cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
uses: dtolnay/rust-toolchain@stable
- name: Install cargo deny
run: cargo install --locked cargo-deny

View file

@ -40,10 +40,7 @@ jobs:
key: rust-advisory-db
- name: Install cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
uses: dtolnay/rust-toolchain@stable
- name: Install cargo deny
run: cargo install --locked cargo-deny
@ -73,12 +70,10 @@ jobs:
id: nightly
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
# Doesn't grab the cache as it's not needed
- name: Install rustfmt
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.nightly.outputs.version }}
profile: minimal
components: rustfmt
- name: Run rustfmt