From 41cab83fdb9d10d620c0529bc837a3dddff5dd5f Mon Sep 17 00:00:00 2001 From: flip1995 Date: Thu, 10 Dec 2020 08:53:27 +0100 Subject: [PATCH] Fix toolchain installation in workflows --- .github/workflows/clippy.yml | 13 +++------- .github/workflows/clippy_bors.yml | 40 ++++++++----------------------- .github/workflows/clippy_dev.yml | 10 +++++--- 3 files changed, 20 insertions(+), 43 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 85ca63ef8..89be0e741 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -35,18 +35,11 @@ jobs: with: github_token: "${{ secrets.github_token }}" - - name: rust-toolchain - uses: actions-rs/toolchain@v1.0.6 - with: - toolchain: nightly - target: x86_64-unknown-linux-gnu - profile: minimal - - name: Checkout uses: actions/checkout@v2.3.3 - - name: Run cargo update - run: cargo update + - name: Install toolchain + run: rustup show active-toolchain - name: Cache cargo dir uses: actions/cache@v2 @@ -99,5 +92,5 @@ jobs: # Cleanup - name: Run cargo-cache --autoclean run: | - cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache + cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache cargo cache diff --git a/.github/workflows/clippy_bors.yml b/.github/workflows/clippy_bors.yml index 3e3495c25..af5ddc022 100644 --- a/.github/workflows/clippy_bors.yml +++ b/.github/workflows/clippy_bors.yml @@ -23,6 +23,7 @@ jobs: - uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master with: github_token: "${{ secrets.github_token }}" + - name: Checkout uses: actions/checkout@v2.3.3 with: @@ -84,18 +85,11 @@ jobs: sudo apt-get install gcc-multilib libssl-dev:i386 libgit2-dev:i386 if: matrix.host == 'i686-unknown-linux-gnu' - - name: rust-toolchain - uses: actions-rs/toolchain@v1.0.6 - with: - toolchain: nightly - target: ${{ matrix.host }} - profile: minimal - - name: Checkout uses: actions/checkout@v2.3.3 - - name: Run cargo update - run: cargo update + - name: Install toolchain + run: rustup show active-toolchain - name: Cache cargo dir uses: actions/cache@v2 @@ -153,7 +147,7 @@ jobs: # Cleanup - name: Run cargo-cache --autoclean run: | - cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache + cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache cargo cache integration_build: @@ -166,18 +160,11 @@ jobs: with: github_token: "${{ secrets.github_token }}" - - name: rust-toolchain - uses: actions-rs/toolchain@v1.0.6 - with: - toolchain: nightly - target: x86_64-unknown-linux-gnu - profile: minimal - - name: Checkout uses: actions/checkout@v2.3.3 - - name: Run cargo update - run: cargo update + - name: Install toolchain + run: rustup show active-toolchain - name: Cache cargo dir uses: actions/cache@v2 @@ -209,7 +196,7 @@ jobs: # Cleanup - name: Run cargo-cache --autoclean run: | - cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache + cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache cargo cache integration: needs: integration_build @@ -244,18 +231,11 @@ jobs: with: github_token: "${{ secrets.github_token }}" - - name: rust-toolchain - uses: actions-rs/toolchain@v1.0.6 - with: - toolchain: nightly - target: x86_64-unknown-linux-gnu - profile: minimal - - name: Checkout uses: actions/checkout@v2.3.3 - - name: Run cargo update - run: cargo update + - name: Install toolchain + run: rustup show active-toolchain - name: Cache cargo dir uses: actions/cache@v2 @@ -285,7 +265,7 @@ jobs: # Cleanup - name: Run cargo-cache --autoclean run: | - cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache + cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache cargo cache # These jobs doesn't actually test anything, but they're only used to tell diff --git a/.github/workflows/clippy_dev.yml b/.github/workflows/clippy_dev.yml index 5ee157cf2..95da775b7 100644 --- a/.github/workflows/clippy_dev.yml +++ b/.github/workflows/clippy_dev.yml @@ -22,6 +22,12 @@ jobs: steps: # Setup + - name: Checkout + uses: actions/checkout@v2.3.3 + + - name: remove toolchain file + run: rm rust-toolchain + - name: rust-toolchain uses: actions-rs/toolchain@v1.0.6 with: @@ -29,9 +35,7 @@ jobs: target: x86_64-unknown-linux-gnu profile: minimal components: rustfmt - - - name: Checkout - uses: actions/checkout@v2.3.3 + default: true # Run - name: Build