From ca07d232e894615c724a3b75197343837c30c29a Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Fri, 9 Jun 2023 10:10:21 +0300 Subject: [PATCH] Use cargo-hack in CI jobs (#485) --- .github/workflows/ascon-hash.yml | 9 +++---- .github/workflows/belt-hash.yml | 30 ++++++++++++++--------- .github/workflows/blake2.yml | 31 ++++++++++++++--------- .github/workflows/fsb.yml | 30 ++++++++++++++--------- .github/workflows/gost94.yml | 30 ++++++++++++++--------- .github/workflows/groestl.yml | 30 ++++++++++++++--------- .github/workflows/k12.yml | 30 ++++++++++++++--------- .github/workflows/md2.yml | 31 +++++++++++++---------- .github/workflows/md4.yml | 33 ++++++++++++++----------- .github/workflows/md5.yml | 34 +++++++++++++++----------- .github/workflows/ripemd.yml | 34 ++++++++++++++------------ .github/workflows/sha1.yml | 9 +++---- .github/workflows/sha2.yml | 42 +++++++++++++++----------------- .github/workflows/sha3.yml | 22 ++++++++--------- .github/workflows/shabal.yml | 30 ++++++++++++++--------- .github/workflows/skein.yml | 30 ++++++++++++++--------- .github/workflows/sm3.yml | 30 ++++++++++++++--------- .github/workflows/streebog.yml | 30 ++++++++++++++--------- .github/workflows/tiger.yml | 29 +++++++++++++--------- .github/workflows/whirlpool.yml | 31 +++++++++++++---------- 20 files changed, 332 insertions(+), 243 deletions(-) diff --git a/.github/workflows/ascon-hash.yml b/.github/workflows/ascon-hash.yml index 9c53ba9c5..0ecdc233f 100644 --- a/.github/workflows/ascon-hash.yml +++ b/.github/workflows/ascon-hash.yml @@ -41,7 +41,8 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std minimal-versions: uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master @@ -62,7 +63,5 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset diff --git a/.github/workflows/belt-hash.yml b/.github/workflows/belt-hash.yml index 50abcfff2..f76161efc 100644 --- a/.github/workflows/belt-hash.yml +++ b/.github/workflows/belt-hash.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.57.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.57.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.57.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,7 +58,10 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} diff --git a/.github/workflows/blake2.yml b/.github/workflows/blake2.yml index 1c5f40bb8..6cfba0c3c 100644 --- a/.github/workflows/blake2.yml +++ b/.github/workflows/blake2.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.41.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,simd,simd_asm,simd_opt test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,9 +58,15 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --features reset + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset --exclude-features simd,simd_asm,simd_opt + + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} + simd: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/fsb.yml b/.github/workflows/fsb.yml index 21b979e51..7bbcd523d 100644 --- a/.github/workflows/fsb.yml +++ b/.github/workflows/fsb.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.41.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,7 +58,10 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} diff --git a/.github/workflows/gost94.yml b/.github/workflows/gost94.yml index 0dfb22364..b0d8bbbeb 100644 --- a/.github/workflows/gost94.yml +++ b/.github/workflows/gost94.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.57.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.57.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,10 +58,13 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} # TODO: merge with test on MSRV bump to 1.57 or higher test-msrv-41: diff --git a/.github/workflows/groestl.yml b/.github/workflows/groestl.yml index e1ec96436..c690c7484 100644 --- a/.github/workflows/groestl.yml +++ b/.github/workflows/groestl.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.41.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,7 +58,10 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} diff --git a/.github/workflows/k12.yml b/.github/workflows/k12.yml index 016363d64..cabd7c640 100644 --- a/.github/workflows/k12.yml +++ b/.github/workflows/k12.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.41.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: # - thumbv7em-none-eabi # TODO: no_std w/o liballoc @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,7 +58,10 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} diff --git a/.github/workflows/md2.yml b/.github/workflows/md2.yml index ddd3cc0f7..3e9acc0d0 100644 --- a/.github/workflows/md2.yml +++ b/.github/workflows/md2.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.57.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.57.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,10 +58,13 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} # TODO: merge with test on MSRV bump to 1.57 or higher test-msrv-41: @@ -67,7 +73,6 @@ jobs: matrix: rust: - 1.41.0 # MSRV - - stable steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master diff --git a/.github/workflows/md4.yml b/.github/workflows/md4.yml index d8513790e..d578fbbcd 100644 --- a/.github/workflows/md4.yml +++ b/.github/workflows/md4.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.57.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.57.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,19 +58,21 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} # TODO: merge with test on MSRV bump to 1.57 or higher - test-msrv-41: + test-msrv: runs-on: ubuntu-latest strategy: matrix: rust: - 1.41.0 # MSRV - - stable steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master diff --git a/.github/workflows/md5.yml b/.github/workflows/md5.yml index 1495f7d37..0a9373390 100644 --- a/.github/workflows/md5.yml +++ b/.github/workflows/md5.yml @@ -21,12 +21,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.57.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -38,19 +44,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -58,10 +61,13 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --features asm + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} # TODO: merge with test on MSRV bump to 1.57 or higher test-msrv: @@ -69,11 +75,11 @@ jobs: strategy: matrix: rust: - - 1.57.0 # MSRV + - 1.41.0 # MSRV steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo test --features oid + - run: cargo test diff --git a/.github/workflows/ripemd.yml b/.github/workflows/ripemd.yml index 9613ed684..1158c3db1 100644 --- a/.github/workflows/ripemd.yml +++ b/.github/workflows/ripemd.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.57.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,21 +41,17 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - # Crate supports MSRV 1.41 without `oid` feature. We test true MSRV - # in the `test-msrv` job. - - 1.57.0 + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -57,10 +59,13 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} # TODO: merge with test on MSRV bump to 1.57 or higher test-msrv: @@ -68,12 +73,11 @@ jobs: strategy: matrix: rust: - - 1.57.0 # MSRV + - 1.41.0 # MSRV steps: - uses: actions/checkout@v3 - uses: RustCrypto/actions/cargo-cache@master - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo test --features oid - run: cargo test --no-default-features diff --git a/.github/workflows/sha1.yml b/.github/workflows/sha1.yml index 76b4d1190..e816af7c9 100644 --- a/.github/workflows/sha1.yml +++ b/.github/workflows/sha1.yml @@ -44,7 +44,8 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm minimal-versions: uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master @@ -81,11 +82,9 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} + - uses: RustCrypto/actions/cargo-hack-install@master - run: ${{ matrix.deps }} - - run: cargo test --target ${{ matrix.target }} --no-default-features - - run: cargo test --target ${{ matrix.target }} - - run: cargo test --target ${{ matrix.target }} --features asm - - run: cargo test --target ${{ matrix.target }} --all-features + - run: cargo hack test --feature-powerset # macOS tests macos: diff --git a/.github/workflows/sha2.yml b/.github/workflows/sha2.yml index 038809089..660d4eb79 100644 --- a/.github/workflows/sha2.yml +++ b/.github/workflows/sha2.yml @@ -32,7 +32,7 @@ jobs: strategy: matrix: rust: - - ${{needs.set-msrv.outputs.msrv}} + - 1.57 - stable target: - thumbv7em-none-eabi @@ -44,12 +44,8 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm-aarch64,asm # Linux tests linux: @@ -70,7 +66,6 @@ jobs: rust: ${{needs.set-msrv.outputs.msrv}} - target: x86_64-unknown-linux-gnu rust: stable - runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -79,11 +74,9 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} + - uses: RustCrypto/actions/cargo-hack-install@master - run: ${{ matrix.deps }} - - run: cargo test --target ${{ matrix.target }} --no-default-features - - run: cargo test --target ${{ matrix.target }} - - run: cargo test --target ${{ matrix.target }} --features asm - - run: cargo test --target ${{ matrix.target }} --all-features + - run: cargo hack test --feature-powerset --exclude-features asm-aarch64 # macOS tests macos: @@ -93,7 +86,6 @@ jobs: rust: - ${{needs.set-msrv.outputs.msrv}} - stable - runs-on: macos-latest steps: - uses: actions/checkout@v3 @@ -102,23 +94,22 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: x86_64-apple-darwin + - uses: RustCrypto/actions/cargo-hack-install@master - run: cargo test --no-default-features - run: cargo test - run: cargo test --features asm + - run: cargo test --all-features # Windows tests windows: needs: set-msrv strategy: matrix: - include: - # 64-bit Windows (GNU) - # TODO(tarcieri): try re-enabling this when we bump MSRV - #- target: x86_64-pc-windows-gnu - # toolchain: 1.41.0 # MSRV - - target: x86_64-pc-windows-gnu - rust: stable - + rust: + - ${{needs.set-msrv.outputs.msrv}} + - stable + target: + - x86_64-pc-windows-gnu runs-on: windows-latest steps: - uses: actions/checkout@v3 @@ -132,10 +123,11 @@ jobs: # Cross-compiled tests cross: + needs: set-msrv strategy: matrix: rust: - - 1.51.0 # 1.41-1.50 `--features` can't be used inside virtual manifest + - ${{needs.set-msrv.outputs.msrv}} - stable target: - aarch64-unknown-linux-gnu @@ -146,7 +138,6 @@ jobs: - rust: stable target: aarch64-unknown-linux-gnu features: asm - runs-on: ubuntu-latest defaults: run: @@ -161,6 +152,11 @@ jobs: target: ${{ matrix.target }} features: ${{ matrix.features }} + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} + # TODO: remove on MSRV bump to 1.57 or higher test-msrv: runs-on: ubuntu-latest diff --git a/.github/workflows/sha3.yml b/.github/workflows/sha3.yml index db4d4078a..482a36ede 100644 --- a/.github/workflows/sha3.yml +++ b/.github/workflows/sha3.yml @@ -43,12 +43,8 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm test: needs: set-msrv @@ -64,17 +60,21 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} # Cross-compiled tests cross: + needs: set-msrv strategy: matrix: rust: - - 1.51.0 # 1.41-1.50 `--features` can't be used inside virtual manifest + - ${{needs.set-msrv.outputs.msrv}} - stable target: - aarch64-unknown-linux-gnu diff --git a/.github/workflows/shabal.yml b/.github/workflows/shabal.yml index 2c42ef43f..bba14d86f 100644 --- a/.github/workflows/shabal.yml +++ b/.github/workflows/shabal.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.41.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,7 +58,10 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} diff --git a/.github/workflows/skein.yml b/.github/workflows/skein.yml index 8f16200cf..d94022496 100644 --- a/.github/workflows/skein.yml +++ b/.github/workflows/skein.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.57.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.57.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.57.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,7 +58,10 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} diff --git a/.github/workflows/sm3.yml b/.github/workflows/sm3.yml index ca2c470be..d1b0f3e3c 100644 --- a/.github/workflows/sm3.yml +++ b/.github/workflows/sm3.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.41.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,7 +58,10 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} diff --git a/.github/workflows/streebog.yml b/.github/workflows/streebog.yml index 6b82856f3..08f8067d8 100644 --- a/.github/workflows/streebog.yml +++ b/.github/workflows/streebog.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.57.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - #- 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,10 +58,13 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} # `oid` feature bumps MSRV to 1.57, so we temporarily split this job. test-msrv: diff --git a/.github/workflows/tiger.yml b/.github/workflows/tiger.yml index 9baf7c159..941ebf290 100644 --- a/.github/workflows/tiger.yml +++ b/.github/workflows/tiger.yml @@ -21,12 +21,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.56.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -38,19 +44,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -58,6 +61,10 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check - - run: cargo test --no-default-features - - run: cargo test + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} diff --git a/.github/workflows/whirlpool.yml b/.github/workflows/whirlpool.yml index 2609dd901..445eedf04 100644 --- a/.github/workflows/whirlpool.yml +++ b/.github/workflows/whirlpool.yml @@ -18,12 +18,18 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + set-msrv: + uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master + with: + msrv: 1.41.0 + build: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable target: - thumbv7em-none-eabi @@ -35,19 +41,16 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - - run: cargo build --no-default-features --target ${{ matrix.target }} - - minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm test: + needs: set-msrv runs-on: ubuntu-latest strategy: matrix: rust: - - 1.41.0 # MSRV + - ${{needs.set-msrv.outputs.msrv}} - stable steps: - uses: actions/checkout@v3 @@ -55,8 +58,10 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo check --all-features - - run: cargo test --no-default-features - - run: cargo test - - run: cargo test --features asm - - run: cargo test --all-features + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo hack test --feature-powerset + + minimal-versions: + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }}