CI: resolve rust-cache misplacement and cache conflict

This commit is contained in:
Miles Liu 2022-11-19 14:37:47 +08:00 committed by Sylvestre Ledru
parent 5acb0227aa
commit 61b7ff8116
2 changed files with 17 additions and 15 deletions

View file

@ -45,7 +45,6 @@ jobs:
- { os: windows-latest , features: feat_os_windows }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Initialize workflow variables
id: vars
shell: bash
@ -71,6 +70,7 @@ jobs:
toolchain: nightly
default: true
profile: minimal
- uses: Swatinem/rust-cache@v2
- name: Install `cargo-udeps`
uses: actions-rs/install@v0.1
with:
@ -103,7 +103,6 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Initialize workflow variables
id: vars
shell: bash
@ -128,6 +127,7 @@ jobs:
default: true
profile: minimal # minimal component installation (ie, no documentation)
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: "`cargo fmt` testing"
shell: bash
run: |
@ -153,7 +153,6 @@ jobs:
- { os: windows-latest , features: feat_os_windows }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Initialize workflow variables
id: vars
shell: bash
@ -189,6 +188,7 @@ jobs:
default: true
profile: minimal # minimal component installation (ie, no documentation)
components: clippy
- uses: Swatinem/rust-cache@v2
- name: "`cargo clippy` lint testing"
shell: bash
run: |
@ -263,7 +263,6 @@ jobs:
# - { os: windows-latest , features: feat_os_windows }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Initialize workflow variables
id: vars
shell: bash
@ -293,6 +292,7 @@ jobs:
default: true
profile: minimal # minimal component installation (ie, no documentation)
components: clippy
- uses: Swatinem/rust-cache@v2
- name: "`cargo doc` with warnings"
shell: bash
run: |
@ -308,7 +308,6 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Initialize workflow variables
id: vars
shell: bash
@ -326,6 +325,7 @@ jobs:
toolchain: ${{ env.RUST_MIN_SRV }}
default: true
profile: minimal # minimal component installation (ie, no documentation)
- uses: Swatinem/rust-cache@v2
- name: Confirm MinSRV compatible 'Cargo.lock'
shell: bash
run: |
@ -377,13 +377,13 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
- uses: Swatinem/rust-cache@v2
- name: "`cargo update` testing"
shell: bash
run: |
@ -402,13 +402,13 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
- uses: Swatinem/rust-cache@v2
- name: "`make build`"
shell: bash
run: |
@ -433,13 +433,13 @@ jobs:
- { os: windows-latest , features: feat_os_windows }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
- uses: Swatinem/rust-cache@v2
- name: Test
uses: actions-rs/cargo@v1
with:
@ -460,13 +460,13 @@ jobs:
- { os: windows-latest , features: feat_os_windows }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
profile: minimal # minimal component installation (ie, no documentation)
- uses: Swatinem/rust-cache@v2
- name: Test
uses: actions-rs/cargo@v1
with:
@ -484,7 +484,6 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install dependencies
shell: bash
run: |
@ -497,6 +496,7 @@ jobs:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
- uses: Swatinem/rust-cache@v2
- name: "`make install`"
shell: bash
run: |
@ -556,7 +556,6 @@ jobs:
- { os: windows-latest , target: x86_64-pc-windows-msvc , features: feat_os_windows }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Initialize workflow variables
id: vars
shell: bash
@ -686,6 +685,9 @@ jobs:
target: ${{ matrix.job.target }}
default: true
profile: minimal # minimal component installation (ie, no documentation)
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.job.os }}-${{ matrix.job.target }}
- name: Initialize toolchain-dependent workflow variables
id: dep_vars
shell: bash
@ -801,7 +803,6 @@ jobs:
- { os: ubuntu-latest }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install/setup prerequisites
shell: bash
run: |
@ -813,6 +814,7 @@ jobs:
toolchain: stable
default: true
profile: minimal # minimal component installation (ie, no documentation)
- uses: Swatinem/rust-cache@v2
- name: "Run BusyBox test suite"
shell: bash
run: |
@ -967,7 +969,6 @@ jobs:
- { os: windows-latest , features: windows }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
# - name: Reattach HEAD ## may be needed for accurate code coverage info
# run: git checkout ${{ github.head_ref }}
- name: Initialize workflow variables
@ -1022,6 +1023,7 @@ jobs:
toolchain: ${{ steps.vars.outputs.TOOLCHAIN }}
default: true
profile: minimal # minimal component installation (ie, no documentation)
- uses: Swatinem/rust-cache@v2
- name: Initialize toolchain-dependent workflow variables
id: dep_vars
shell: bash

View file

@ -27,7 +27,6 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Initialize job variables
id: vars
shell: bash
@ -43,6 +42,7 @@ jobs:
toolchain: ${{ steps.vars.outputs.RUST_MIN_SRV }}
default: true
profile: minimal # minimal component installation (ie, no documentation)
- uses: Swatinem/rust-cache@v2
- name: Ensure updated 'Cargo.lock'
shell: bash
run: |
@ -91,7 +91,6 @@ jobs:
- { os: ubuntu-latest , features: feat_os_unix }
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Initialize job variables
id: vars
shell: bash
@ -110,6 +109,7 @@ jobs:
default: true
profile: minimal # minimal component installation (ie, no documentation)
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: "`cargo fmt`"
shell: bash
run: |