Fix errors finding Rust toolchain (#3802)

* switch to dtolnay/toolchain
* Add .dockerignore to avoid copying target/ into images
* update corrosion
This commit is contained in:
Dustin J. Mitchell 2025-03-06 06:59:04 -05:00 committed by GitHub
parent bcb3f820ab
commit 3c12c0dfd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 48 additions and 56 deletions

View file

@ -15,25 +15,25 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
# If this version is old enough to cause errors, or older than the
# TaskChampion MSRV, bump it to the MSRV of the currently-required
# TaskChampion package; if necessary, bump that version as well.
toolchain: "1.81.0" # MSRV
override: true
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1.0.3
with:
@ -53,12 +53,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
profile: minimal
components: rustfmt
toolchain: stable
override: true
toolchain: "stable"
components: "rustfmt"
- uses: actions-rs/cargo@v1.0.3
with:
@ -71,12 +70,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
profile: minimal
components: rustfmt
toolchain: stable
override: true
toolchain: "stable"
components: "rustfmt"
- name: "Check metadata"
run: ".github/workflows/metadata-check.sh"