Skip to content

Commit

Permalink
Use cargo-hack in CI jobs (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov authored Jun 9, 2023
1 parent d174ad7 commit ca07d23
Show file tree
Hide file tree
Showing 20 changed files with 332 additions and 243 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/ascon-hash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
30 changes: 18 additions & 12 deletions .github/workflows/belt-hash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,27 +41,27 @@ 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
- uses: RustCrypto/actions/cargo-cache@master
- 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 }}
31 changes: 20 additions & 11 deletions .github/workflows/blake2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,29 +41,32 @@ 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
- uses: RustCrypto/actions/cargo-cache@master
- 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:
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/fsb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,27 +41,27 @@ 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
- uses: RustCrypto/actions/cargo-cache@master
- 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 }}
30 changes: 18 additions & 12 deletions .github/workflows/gost94.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,30 +41,30 @@ 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
- uses: RustCrypto/actions/cargo-cache@master
- 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:
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/groestl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,27 +41,27 @@ 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
- uses: RustCrypto/actions/cargo-cache@master
- 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 }}
30 changes: 18 additions & 12 deletions .github/workflows/k12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -35,27 +41,27 @@ 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
- uses: RustCrypto/actions/cargo-cache@master
- 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 }}
Loading

0 comments on commit ca07d23

Please sign in to comment.