From 362696ab8007ef1a4779885a398286856cacf555 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Fri, 10 Mar 2023 21:16:35 -0800 Subject: [PATCH 1/2] Move to maintained rust installer See https://github.com/actions-rs/toolchain/issues/216 --- .github/workflows/check.yml | 23 +++++------------------ .github/workflows/nostd.yml | 11 ++++++----- .github/workflows/safety.yml | 15 +++------------ .github/workflows/scheduled.yml | 12 ++---------- .github/workflows/test.yml | 25 +++++++------------------ 5 files changed, 23 insertions(+), 63 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 560e9e2..da175c2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -12,10 +12,8 @@ jobs: with: submodules: true - name: Install stable - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable components: rustfmt - name: cargo fmt --check uses: actions-rs/cargo@v1 @@ -34,11 +32,9 @@ jobs: with: submodules: true - name: Install ${{ matrix.toolchain }} - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.toolchain }} - default: true components: clippy - name: cargo clippy uses: actions-rs/clippy-check@v1 @@ -52,11 +48,7 @@ jobs: with: submodules: true - name: Install nightly - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - default: true + uses: dtolnay/rust-toolchain@nightly - name: cargo doc uses: actions-rs/cargo@v1 with: @@ -72,10 +64,7 @@ jobs: with: submodules: true - name: Install stable - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable + uses: dtolnay/rust-toolchain@stable - name: cargo install cargo-hack uses: taiki-e/install-action@cargo-hack - name: cargo hack @@ -96,11 +85,9 @@ jobs: with: submodules: true - name: Install ${{ matrix.toolchain }} - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.msrv }} - default: true - name: cargo +${{ matrix.msrv }} check uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/nostd.yml b/.github/workflows/nostd.yml index 409ae73..235df26 100644 --- a/.github/workflows/nostd.yml +++ b/.github/workflows/nostd.yml @@ -11,12 +11,13 @@ jobs: matrix: target: [thumbv7m-none-eabi, aarch64-unknown-none] steps: - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - target: ${{ matrix.target }} - uses: actions/checkout@v3 + with: + submodules: true + - name: Install stable + uses: dtolnay/rust-toolchain@stable + - name: rustup target add ${{ matrix.target }} + run: rustup target add ${{ matrix.target }} - name: cargo check uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/safety.yml b/.github/workflows/safety.yml index 86fc9ee..77f56a4 100644 --- a/.github/workflows/safety.yml +++ b/.github/workflows/safety.yml @@ -11,11 +11,7 @@ jobs: with: submodules: true - name: Install nightly - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - default: true + uses: dtolnay/rust-toolchain@nightly - run: | # to get the symbolizer for debug symbol resolution sudo apt install llvm @@ -52,11 +48,9 @@ jobs: - run: | echo "NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri)" >> $GITHUB_ENV - name: Install ${{ env.NIGHTLY }} - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ env.NIGHTLY }} - default: true components: miri - name: cargo miri test uses: actions-rs/cargo@v1 @@ -72,10 +66,7 @@ jobs: with: submodules: true - name: Install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal + uses: dtolnay/rust-toolchain@stable - name: cargo test --test loom uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index a5f5311..e341e9b 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -15,11 +15,7 @@ jobs: with: submodules: true - name: Install nightly - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - default: true + uses: dtolnay/rust-toolchain@nightly - name: cargo generate-lockfile if: hashFiles('Cargo.lock') == '' uses: actions-rs/cargo@v1 @@ -44,11 +40,7 @@ jobs: submodules: true - name: Install beta if: hashFiles('Cargo.lock') != '' - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: beta - default: true + uses: dtolnay/rust-toolchain@beta - name: cargo update if: hashFiles('Cargo.lock') != '' uses: actions-rs/cargo@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9569167..53db840 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,11 +15,9 @@ jobs: with: submodules: true - name: Install ${{ matrix.toolchain }} - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.toolchain }} - default: true - name: cargo generate-lockfile if: hashFiles('Cargo.lock') == '' uses: actions-rs/cargo@v1 @@ -39,15 +37,11 @@ jobs: with: submodules: true - name: Install stable - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable + uses: dtolnay/rust-toolchain@stable - name: Install nightly for -Zminimal-versions - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly + uses: dtolnay/rust-toolchain@nightly + - name: rustup default stable + run: rustup default stable - name: cargo update -Zminimal-versions uses: actions-rs/cargo@v1 with: @@ -71,10 +65,7 @@ jobs: with: submodules: true - name: Install stable - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable + uses: dtolnay/rust-toolchain@stable - name: cargo generate-lockfile if: hashFiles('Cargo.lock') == '' uses: actions-rs/cargo@v1 @@ -93,10 +84,8 @@ jobs: with: submodules: true - name: Install stable - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable components: llvm-tools-preview - name: cargo install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov From 90999e1bd1a9dabaecd149697f69e8e26e810562 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Fri, 10 Mar 2023 21:22:30 -0800 Subject: [PATCH 2/2] Fix install message for msrv --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index da175c2..d25da88 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -84,7 +84,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: true - - name: Install ${{ matrix.toolchain }} + - name: Install ${{ matrix.msrv }} uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.msrv }}