mirror of
https://github.com/serai-dex/serai.git
synced 2025-03-12 09:26:51 +00:00
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:
parent
97a94a0bf8
commit
ea7c281a47
4 changed files with 6 additions and 49 deletions
|
@ -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
|
||||
|
|
34
.github/actions/cached-rust/action.yml
vendored
34
.github/actions/cached-rust/action.yml
vendored
|
@ -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 }}
|
5
.github/workflows/daily-deny.yml
vendored
5
.github/workflows/daily-deny.yml
vendored
|
@ -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
|
||||
|
|
9
.github/workflows/tests.yml
vendored
9
.github/workflows/tests.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue