run toolchain before cache
This commit is contained in:
parent
d4b3cd5292
commit
2f7fe81d81
|
@ -14,7 +14,7 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set rust version
|
- name: Set rust version
|
||||||
run: |
|
run: |
|
||||||
|
@ -32,6 +32,14 @@ jobs:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libudev-dev libssl-dev libsasl2-dev libzstd-dev
|
sudo apt-get install -y libudev-dev libssl-dev libsasl2-dev libzstd-dev
|
||||||
|
|
||||||
|
# The toolchain action should definitely be run before the cache action
|
||||||
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: ${{ env.RUST_STABLE }}
|
||||||
|
components: rustfmt, clippy
|
||||||
|
# avoid the default "-D warnings"
|
||||||
|
rustflags: ""
|
||||||
|
|
||||||
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
|
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
@ -43,14 +51,6 @@ jobs:
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: ${{ env.RUST_STABLE }}
|
|
||||||
components: rustfmt, clippy
|
|
||||||
# avoid the default "-D warnings"
|
|
||||||
rustflags: ""
|
|
||||||
|
|
||||||
|
|
||||||
- name: Run fmt+clippy
|
- name: Run fmt+clippy
|
||||||
run: |
|
run: |
|
||||||
cargo fmt --all --check
|
cargo fmt --all --check
|
||||||
|
|
Loading…
Reference in New Issue