Skip to content

Commit ca07d23

Browse files
authored
Use cargo-hack in CI jobs (#485)
1 parent d174ad7 commit ca07d23

20 files changed

+332
-243
lines changed

.github/workflows/ascon-hash.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ jobs:
4141
with:
4242
toolchain: ${{ matrix.rust }}
4343
targets: ${{ matrix.target }}
44-
- run: cargo build --no-default-features --target ${{ matrix.target }}
44+
- uses: RustCrypto/actions/cargo-hack-install@master
45+
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std
4546

4647
minimal-versions:
4748
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
@@ -62,7 +63,5 @@ jobs:
6263
- uses: dtolnay/rust-toolchain@master
6364
with:
6465
toolchain: ${{ matrix.rust }}
65-
- run: cargo check --all-features
66-
- run: cargo test --no-default-features
67-
- run: cargo test
68-
- run: cargo test --all-features
66+
- uses: RustCrypto/actions/cargo-hack-install@master
67+
- run: cargo hack test --feature-powerset

.github/workflows/belt-hash.yml

+18-12
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ env:
1818
RUSTFLAGS: "-Dwarnings"
1919

2020
jobs:
21+
set-msrv:
22+
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
23+
with:
24+
msrv: 1.57.0
25+
2126
build:
27+
needs: set-msrv
2228
runs-on: ubuntu-latest
2329
strategy:
2430
matrix:
2531
rust:
26-
- 1.57.0 # MSRV
32+
- ${{needs.set-msrv.outputs.msrv}}
2733
- stable
2834
target:
2935
- thumbv7em-none-eabi
@@ -35,27 +41,27 @@ jobs:
3541
with:
3642
toolchain: ${{ matrix.rust }}
3743
targets: ${{ matrix.target }}
38-
- run: cargo build --no-default-features --target ${{ matrix.target }}
39-
40-
minimal-versions:
41-
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
42-
with:
43-
working-directory: ${{ github.workflow }}
44+
- uses: RustCrypto/actions/cargo-hack-install@master
45+
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std
4446

4547
test:
48+
needs: set-msrv
4649
runs-on: ubuntu-latest
4750
strategy:
4851
matrix:
4952
rust:
50-
- 1.57.0 # MSRV
53+
- ${{needs.set-msrv.outputs.msrv}}
5154
- stable
5255
steps:
5356
- uses: actions/checkout@v3
5457
- uses: RustCrypto/actions/cargo-cache@master
5558
- uses: dtolnay/rust-toolchain@master
5659
with:
5760
toolchain: ${{ matrix.rust }}
58-
- run: cargo check --all-features
59-
- run: cargo test --no-default-features
60-
- run: cargo test
61-
- run: cargo test --all-features
61+
- uses: RustCrypto/actions/cargo-hack-install@master
62+
- run: cargo hack test --feature-powerset
63+
64+
minimal-versions:
65+
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
66+
with:
67+
working-directory: ${{ github.workflow }}

.github/workflows/blake2.yml

+20-11
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ env:
1818
RUSTFLAGS: "-Dwarnings"
1919

2020
jobs:
21+
set-msrv:
22+
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
23+
with:
24+
msrv: 1.41.0
25+
2126
build:
27+
needs: set-msrv
2228
runs-on: ubuntu-latest
2329
strategy:
2430
matrix:
2531
rust:
26-
- 1.41.0 # MSRV
32+
- ${{needs.set-msrv.outputs.msrv}}
2733
- stable
2834
target:
2935
- thumbv7em-none-eabi
@@ -35,29 +41,32 @@ jobs:
3541
with:
3642
toolchain: ${{ matrix.rust }}
3743
targets: ${{ matrix.target }}
38-
- run: cargo build --no-default-features --target ${{ matrix.target }}
39-
40-
minimal-versions:
41-
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
42-
with:
43-
working-directory: ${{ github.workflow }}
44+
- uses: RustCrypto/actions/cargo-hack-install@master
45+
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,simd,simd_asm,simd_opt
4446

4547
test:
48+
needs: set-msrv
4649
runs-on: ubuntu-latest
4750
strategy:
4851
matrix:
4952
rust:
50-
- 1.41.0 # MSRV
53+
- ${{needs.set-msrv.outputs.msrv}}
5154
- stable
5255
steps:
5356
- uses: actions/checkout@v3
5457
- uses: RustCrypto/actions/cargo-cache@master
5558
- uses: dtolnay/rust-toolchain@master
5659
with:
5760
toolchain: ${{ matrix.rust }}
58-
- run: cargo test --no-default-features
59-
- run: cargo test
60-
- run: cargo test --features reset
61+
- uses: RustCrypto/actions/cargo-hack-install@master
62+
- run: cargo hack test --feature-powerset --exclude-features simd,simd_asm,simd_opt
63+
64+
65+
minimal-versions:
66+
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
67+
with:
68+
working-directory: ${{ github.workflow }}
69+
6170
simd:
6271
runs-on: ubuntu-latest
6372
steps:

.github/workflows/fsb.yml

+18-12
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ env:
1818
RUSTFLAGS: "-Dwarnings"
1919

2020
jobs:
21+
set-msrv:
22+
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
23+
with:
24+
msrv: 1.41.0
25+
2126
build:
27+
needs: set-msrv
2228
runs-on: ubuntu-latest
2329
strategy:
2430
matrix:
2531
rust:
26-
- 1.41.0 # MSRV
32+
- ${{needs.set-msrv.outputs.msrv}}
2733
- stable
2834
target:
2935
- thumbv7em-none-eabi
@@ -35,27 +41,27 @@ jobs:
3541
with:
3642
toolchain: ${{ matrix.rust }}
3743
targets: ${{ matrix.target }}
38-
- run: cargo build --no-default-features --target ${{ matrix.target }}
39-
40-
minimal-versions:
41-
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
42-
with:
43-
working-directory: ${{ github.workflow }}
44+
- uses: RustCrypto/actions/cargo-hack-install@master
45+
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std
4446

4547
test:
48+
needs: set-msrv
4649
runs-on: ubuntu-latest
4750
strategy:
4851
matrix:
4952
rust:
50-
- 1.41.0 # MSRV
53+
- ${{needs.set-msrv.outputs.msrv}}
5154
- stable
5255
steps:
5356
- uses: actions/checkout@v3
5457
- uses: RustCrypto/actions/cargo-cache@master
5558
- uses: dtolnay/rust-toolchain@master
5659
with:
5760
toolchain: ${{ matrix.rust }}
58-
- run: cargo check --all-features
59-
- run: cargo test --no-default-features
60-
- run: cargo test
61-
- run: cargo test --all-features
61+
- uses: RustCrypto/actions/cargo-hack-install@master
62+
- run: cargo hack test --feature-powerset
63+
64+
minimal-versions:
65+
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
66+
with:
67+
working-directory: ${{ github.workflow }}

.github/workflows/gost94.yml

+18-12
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ env:
1818
RUSTFLAGS: "-Dwarnings"
1919

2020
jobs:
21+
set-msrv:
22+
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
23+
with:
24+
msrv: 1.57.0
25+
2126
build:
27+
needs: set-msrv
2228
runs-on: ubuntu-latest
2329
strategy:
2430
matrix:
2531
rust:
26-
- 1.41.0 # MSRV
32+
- ${{needs.set-msrv.outputs.msrv}}
2733
- stable
2834
target:
2935
- thumbv7em-none-eabi
@@ -35,30 +41,30 @@ jobs:
3541
with:
3642
toolchain: ${{ matrix.rust }}
3743
targets: ${{ matrix.target }}
38-
- run: cargo build --no-default-features --target ${{ matrix.target }}
39-
40-
minimal-versions:
41-
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
42-
with:
43-
working-directory: ${{ github.workflow }}
44+
- uses: RustCrypto/actions/cargo-hack-install@master
45+
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std
4446

4547
test:
48+
needs: set-msrv
4649
runs-on: ubuntu-latest
4750
strategy:
4851
matrix:
4952
rust:
50-
- 1.57.0 # MSRV
53+
- ${{needs.set-msrv.outputs.msrv}}
5154
- stable
5255
steps:
5356
- uses: actions/checkout@v3
5457
- uses: RustCrypto/actions/cargo-cache@master
5558
- uses: dtolnay/rust-toolchain@master
5659
with:
5760
toolchain: ${{ matrix.rust }}
58-
- run: cargo check --all-features
59-
- run: cargo test --no-default-features
60-
- run: cargo test
61-
- run: cargo test --all-features
61+
- uses: RustCrypto/actions/cargo-hack-install@master
62+
- run: cargo hack test --feature-powerset
63+
64+
minimal-versions:
65+
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
66+
with:
67+
working-directory: ${{ github.workflow }}
6268

6369
# TODO: merge with test on MSRV bump to 1.57 or higher
6470
test-msrv-41:

.github/workflows/groestl.yml

+18-12
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ env:
1818
RUSTFLAGS: "-Dwarnings"
1919

2020
jobs:
21+
set-msrv:
22+
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
23+
with:
24+
msrv: 1.41.0
25+
2126
build:
27+
needs: set-msrv
2228
runs-on: ubuntu-latest
2329
strategy:
2430
matrix:
2531
rust:
26-
- 1.41.0 # MSRV
32+
- ${{needs.set-msrv.outputs.msrv}}
2733
- stable
2834
target:
2935
- thumbv7em-none-eabi
@@ -35,27 +41,27 @@ jobs:
3541
with:
3642
toolchain: ${{ matrix.rust }}
3743
targets: ${{ matrix.target }}
38-
- run: cargo build --no-default-features --target ${{ matrix.target }}
39-
40-
minimal-versions:
41-
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
42-
with:
43-
working-directory: ${{ github.workflow }}
44+
- uses: RustCrypto/actions/cargo-hack-install@master
45+
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std
4446

4547
test:
48+
needs: set-msrv
4649
runs-on: ubuntu-latest
4750
strategy:
4851
matrix:
4952
rust:
50-
- 1.41.0 # MSRV
53+
- ${{needs.set-msrv.outputs.msrv}}
5154
- stable
5255
steps:
5356
- uses: actions/checkout@v3
5457
- uses: RustCrypto/actions/cargo-cache@master
5558
- uses: dtolnay/rust-toolchain@master
5659
with:
5760
toolchain: ${{ matrix.rust }}
58-
- run: cargo check --all-features
59-
- run: cargo test --no-default-features
60-
- run: cargo test
61-
- run: cargo test --all-features
61+
- uses: RustCrypto/actions/cargo-hack-install@master
62+
- run: cargo hack test --feature-powerset
63+
64+
minimal-versions:
65+
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
66+
with:
67+
working-directory: ${{ github.workflow }}

.github/workflows/k12.yml

+18-12
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ env:
1818
RUSTFLAGS: "-Dwarnings"
1919

2020
jobs:
21+
set-msrv:
22+
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
23+
with:
24+
msrv: 1.41.0
25+
2126
build:
27+
needs: set-msrv
2228
runs-on: ubuntu-latest
2329
strategy:
2430
matrix:
2531
rust:
26-
- 1.41.0 # MSRV
32+
- ${{needs.set-msrv.outputs.msrv}}
2733
- stable
2834
target:
2935
# - thumbv7em-none-eabi # TODO: no_std w/o liballoc
@@ -35,27 +41,27 @@ jobs:
3541
with:
3642
toolchain: ${{ matrix.rust }}
3743
targets: ${{ matrix.target }}
38-
- run: cargo build --no-default-features --target ${{ matrix.target }}
39-
40-
minimal-versions:
41-
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
42-
with:
43-
working-directory: ${{ github.workflow }}
44+
- uses: RustCrypto/actions/cargo-hack-install@master
45+
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std
4446

4547
test:
48+
needs: set-msrv
4649
runs-on: ubuntu-latest
4750
strategy:
4851
matrix:
4952
rust:
50-
- 1.41.0 # MSRV
53+
- ${{needs.set-msrv.outputs.msrv}}
5154
- stable
5255
steps:
5356
- uses: actions/checkout@v3
5457
- uses: RustCrypto/actions/cargo-cache@master
5558
- uses: dtolnay/rust-toolchain@master
5659
with:
5760
toolchain: ${{ matrix.rust }}
58-
- run: cargo check --all-features
59-
- run: cargo test --no-default-features
60-
- run: cargo test
61-
- run: cargo test --all-features
61+
- uses: RustCrypto/actions/cargo-hack-install@master
62+
- run: cargo hack test --feature-powerset
63+
64+
minimal-versions:
65+
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
66+
with:
67+
working-directory: ${{ github.workflow }}

0 commit comments

Comments
 (0)