From 4b0b454d4a8c9dbb8b3d3eef845b1d129276f61d Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Fri, 24 Mar 2023 15:53:47 +0100 Subject: [PATCH] Replace unmaintained actions-rs/* actions in CI workflows (#53) Basically all of the `actions-rs/*` actions are unmaintained. See for more information. Due to their age they generate several warnings in CI runs. To get rid of those warnings the occurrences of `actions-rs/toolchain` are replaced by `dtolnay/rust-toolchain`, and the occurrences of `actions-rs/cargo` are replaced by direct invocations of `cargo`. --- .github/actions/cross-tests/action.yml | 6 ++---- .github/workflows/ascon.yml | 10 +++------- .github/workflows/keccak.yml | 20 ++++++-------------- .github/workflows/workspace.yml | 13 +++---------- 4 files changed, 14 insertions(+), 35 deletions(-) diff --git a/.github/actions/cross-tests/action.yml b/.github/actions/cross-tests/action.yml index 1740939..dc89526 100644 --- a/.github/actions/cross-tests/action.yml +++ b/.github/actions/cross-tests/action.yml @@ -15,12 +15,10 @@ runs: steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ inputs.rust }} - target: ${{ inputs.target }} - override: true + targets: ${{ inputs.target }} - uses: RustCrypto/actions/cross-install@master - if: ${{ inputs.features != 'NO_FEATURE' }} run: | diff --git a/.github/workflows/ascon.yml b/.github/workflows/ascon.yml index f4165f8..aecbc59 100644 --- a/.github/workflows/ascon.yml +++ b/.github/workflows/ascon.yml @@ -37,12 +37,10 @@ jobs: steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - target: ${{ matrix.target }} - override: true + targets: ${{ matrix.target }} - run: cargo build --no-default-features --target ${{ matrix.target }} minimal-versions: @@ -61,11 +59,9 @@ jobs: steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - override: true - run: cargo test --no-default-features - run: cargo test - run: cargo test --all-features diff --git a/.github/workflows/keccak.yml b/.github/workflows/keccak.yml index 5ec3a69..f543c4d 100644 --- a/.github/workflows/keccak.yml +++ b/.github/workflows/keccak.yml @@ -37,12 +37,10 @@ jobs: steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - target: ${{ matrix.target }} - override: true + targets: ${{ matrix.target }} - run: cargo build --no-default-features --target ${{ matrix.target }} minimal-versions: @@ -61,11 +59,9 @@ jobs: steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - override: true - run: cargo check --no-default-features - run: cargo check - run: cargo check --features no_unroll @@ -78,11 +74,9 @@ jobs: steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: nightly - override: true - run: cargo check --features simd - run: cargo test --features simd @@ -132,12 +126,10 @@ jobs: steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - target: aarch64-unknown-linux-gnu - override: true + targets: aarch64-unknown-linux-gnu - name: Install pre-compiled cross run: | # We need a recent version for RUSTFLAGS to work. diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 9ec47e4..7ad274b 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -15,12 +15,10 @@ jobs: steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable components: clippy - profile: minimal - override: true - run: cargo clippy --all -- -D warnings rustfmt: @@ -30,15 +28,10 @@ jobs: uses: actions/checkout@v3 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: stable components: rustfmt - profile: minimal - override: true - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check