Skip to content

Commit f48afcd

Browse files
authored
CI: run tests as debug builds with --lib (#754)
- Runs tests with `--lib` and adds separate `--doc` step - Run tests with debug builds and adds a separate `--release` step This should test more combinations (both debug and release builds), but largely serves as a workaround for the weirdness happening in #752 where feature-gating seems to be working incorrectly in the doctests.
1 parent 80dbc5b commit f48afcd

File tree

11 files changed

+114
-51
lines changed

11 files changed

+114
-51
lines changed

.github/workflows/aes-gcm-siv.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ jobs:
6767
toolchain: ${{ matrix.rust }}
6868
targets: ${{ matrix.target }}
6969
- run: ${{ matrix.deps }}
70-
- run: cargo test --target ${{ matrix.target }} --release --no-default-features
71-
- run: cargo test --target ${{ matrix.target }} --release
72-
- run: cargo test --target ${{ matrix.target }} --release --all-features
73-
- run: cargo build --target ${{ matrix.target }} --benches
70+
- run: cargo test --target ${{ matrix.target }} --lib --no-default-features
71+
- run: cargo test --target ${{ matrix.target }} --lib
72+
- run: cargo test --target ${{ matrix.target }} --lib --features zeroize
73+
- run: cargo test --target ${{ matrix.target }} --all-features --lib
74+
- run: cargo test --target ${{ matrix.target }} --all-features --release
75+
- run: cargo test --target ${{ matrix.target }} --all-features --doc

.github/workflows/aes-gcm.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ jobs:
6767
toolchain: ${{ matrix.rust }}
6868
targets: ${{ matrix.target }}
6969
- run: ${{ matrix.deps }}
70-
- run: cargo test --target ${{ matrix.target }} --release --no-default-features --lib
71-
- run: cargo test --target ${{ matrix.target }} --release
72-
- run: cargo test --target ${{ matrix.target }} --release --features zeroize
73-
- run: cargo test --target ${{ matrix.target }} --release --all-features
74-
- run: cargo build --target ${{ matrix.target }} --benches
70+
- run: cargo test --target ${{ matrix.target }} --lib --no-default-features
71+
- run: cargo test --target ${{ matrix.target }} --lib
72+
- run: cargo test --target ${{ matrix.target }} --lib --features zeroize
73+
- run: cargo test --target ${{ matrix.target }} --all-features --lib
74+
- run: cargo test --target ${{ matrix.target }} --all-features --release
75+
- run: cargo test --target ${{ matrix.target }} --all-features --doc

.github/workflows/aes-siv.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,30 @@ jobs:
4646
runs-on: ubuntu-latest
4747
strategy:
4848
matrix:
49-
rust:
50-
- 1.85.0 # MSRV
51-
- stable
49+
include:
50+
# 32-bit Linux
51+
- target: i686-unknown-linux-gnu
52+
rust: 1.85.0 # MSRV
53+
deps: sudo apt update && sudo apt install gcc-multilib
54+
- target: i686-unknown-linux-gnu
55+
rust: stable
56+
deps: sudo apt update && sudo apt install gcc-multilib
57+
58+
# 64-bit Linux
59+
- target: x86_64-unknown-linux-gnu
60+
rust: 1.85.0 # MSRV
61+
- target: x86_64-unknown-linux-gnu
62+
rust: stable
5263
steps:
5364
- uses: actions/checkout@v6
5465
- uses: dtolnay/rust-toolchain@master
5566
with:
5667
toolchain: ${{ matrix.rust }}
57-
- run: cargo test --release --no-default-features
58-
- run: cargo test --release
59-
- run: cargo test --release --all-features
68+
targets: ${{ matrix.target }}
69+
- run: ${{ matrix.deps }}
70+
- run: cargo test --target ${{ matrix.target }} --lib --no-default-features
71+
- run: cargo test --target ${{ matrix.target }} --lib
72+
- run: cargo test --target ${{ matrix.target }} --lib --features zeroize
73+
- run: cargo test --target ${{ matrix.target }} --all-features --lib
74+
- run: cargo test --target ${{ matrix.target }} --all-features --release
75+
- run: cargo test --target ${{ matrix.target }} --all-features --doc

.github/workflows/ascon-aead128.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ jobs:
6767
toolchain: ${{ matrix.rust }}
6868
targets: ${{ matrix.target }}
6969
- run: ${{ matrix.deps }}
70-
- run: cargo test --target ${{ matrix.target }} --release --no-default-features
71-
- run: cargo test --target ${{ matrix.target }} --release
72-
- run: cargo test --target ${{ matrix.target }} --release --features zeroize
73-
- run: cargo test --target ${{ matrix.target }} --release --all-features
70+
- run: cargo test --target ${{ matrix.target }} --lib --no-default-features
71+
- run: cargo test --target ${{ matrix.target }} --lib
72+
- run: cargo test --target ${{ matrix.target }} --lib --features zeroize
73+
- run: cargo test --target ${{ matrix.target }} --all-features --lib
74+
- run: cargo test --target ${{ matrix.target }} --all-features --release
75+
- run: cargo test --target ${{ matrix.target }} --all-features --doc

.github/workflows/belt-dwp.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ jobs:
7676
toolchain: ${{ matrix.rust }}
7777
targets: ${{ matrix.target }}
7878
- run: ${{ matrix.deps }}
79-
- run: cargo test --target ${{ matrix.target }} --release --no-default-features --lib
80-
- run: cargo test --target ${{ matrix.target }} --release
81-
- run: cargo test --target ${{ matrix.target }} --release --all-features
79+
- run: cargo test --target ${{ matrix.target }} --lib --no-default-features
80+
- run: cargo test --target ${{ matrix.target }} --lib
81+
- run: cargo test --target ${{ matrix.target }} --lib --features zeroize
82+
- run: cargo test --target ${{ matrix.target }} --all-features --lib
83+
- run: cargo test --target ${{ matrix.target }} --all-features --release
84+
- run: cargo test --target ${{ matrix.target }} --all-features --doc

.github/workflows/ccm.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ jobs:
6666
toolchain: ${{ matrix.rust }}
6767
targets: ${{ matrix.target }}
6868
- run: ${{ matrix.deps }}
69-
- run: cargo test --target ${{ matrix.target }} --release --no-default-features
70-
- run: cargo test --target ${{ matrix.target }} --release
71-
- run: cargo test --target ${{ matrix.target }} --release --all-features
72-
- run: cargo build --target ${{ matrix.target }} --benches
69+
- run: cargo test --target ${{ matrix.target }} --lib --no-default-features
70+
- run: cargo test --target ${{ matrix.target }} --lib
71+
#- run: cargo test --target ${{ matrix.target }} --lib --features zeroize
72+
- run: cargo test --target ${{ matrix.target }} --all-features --lib
73+
- run: cargo test --target ${{ matrix.target }} --all-features --release
74+
- run: cargo test --target ${{ matrix.target }} --all-features --doc

.github/workflows/chacha20poly1305.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ jobs:
6868
toolchain: ${{ matrix.rust }}
6969
targets: ${{ matrix.target }}
7070
- run: ${{ matrix.deps }}
71-
- run: cargo test --target ${{ matrix.target }} --release --no-default-features
72-
- run: cargo test --target ${{ matrix.target }} --release
73-
- run: cargo test --target ${{ matrix.target }} --release --features reduced-round
74-
- run: cargo test --target ${{ matrix.target }} --release --all-features
75-
- run: cargo build --target ${{ matrix.target }} --benches
71+
- run: cargo test --target ${{ matrix.target }} --lib --no-default-features
72+
- run: cargo test --target ${{ matrix.target }} --lib
73+
- run: cargo test --target ${{ matrix.target }} --lib --features zeroize
74+
- run: cargo test --target ${{ matrix.target }} --all-features --lib
75+
- run: cargo test --target ${{ matrix.target }} --all-features --release
76+
- run: cargo test --target ${{ matrix.target }} --all-features --doc
7677

.github/workflows/deoxys.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,30 @@ jobs:
4646
runs-on: ubuntu-latest
4747
strategy:
4848
matrix:
49-
rust:
50-
- 1.85.0 # MSRV
51-
- stable
49+
include:
50+
# 32-bit Linux
51+
- target: i686-unknown-linux-gnu
52+
rust: 1.85.0 # MSRV
53+
deps: sudo apt update && sudo apt install gcc-multilib
54+
- target: i686-unknown-linux-gnu
55+
rust: stable
56+
deps: sudo apt update && sudo apt install gcc-multilib
57+
58+
# 64-bit Linux
59+
- target: x86_64-unknown-linux-gnu
60+
rust: 1.85.0 # MSRV
61+
- target: x86_64-unknown-linux-gnu
62+
rust: stable
5263
steps:
5364
- uses: actions/checkout@v6
5465
- uses: dtolnay/rust-toolchain@master
5566
with:
5667
toolchain: ${{ matrix.rust }}
57-
- run: cargo test --release --no-default-features --lib
58-
- run: cargo test --release
59-
- run: cargo test --release --all-features
68+
targets: ${{ matrix.target }}
69+
- run: ${{ matrix.deps }}
70+
- run: cargo test --target ${{ matrix.target }} --lib --no-default-features
71+
- run: cargo test --target ${{ matrix.target }} --lib
72+
- run: cargo test --target ${{ matrix.target }} --lib --features zeroize
73+
- run: cargo test --target ${{ matrix.target }} --all-features --lib
74+
- run: cargo test --target ${{ matrix.target }} --all-features --release
75+
- run: cargo test --target ${{ matrix.target }} --all-features --doc

.github/workflows/eax.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,30 @@ jobs:
4545
runs-on: ubuntu-latest
4646
strategy:
4747
matrix:
48-
rust:
49-
- 1.85.0 # MSRV
50-
- stable
48+
include:
49+
# 32-bit Linux
50+
- target: i686-unknown-linux-gnu
51+
rust: 1.85.0 # MSRV
52+
deps: sudo apt update && sudo apt install gcc-multilib
53+
- target: i686-unknown-linux-gnu
54+
rust: stable
55+
deps: sudo apt update && sudo apt install gcc-multilib
56+
57+
# 64-bit Linux
58+
- target: x86_64-unknown-linux-gnu
59+
rust: 1.85.0 # MSRV
60+
- target: x86_64-unknown-linux-gnu
61+
rust: stable
5162
steps:
5263
- uses: actions/checkout@v6
5364
- uses: dtolnay/rust-toolchain@master
5465
with:
5566
toolchain: ${{ matrix.rust }}
56-
- run: cargo test --release --no-default-features
57-
- run: cargo test --release
58-
- run: cargo test --release --all-features
67+
targets: ${{ matrix.target }}
68+
- run: ${{ matrix.deps }}
69+
- run: cargo test --target ${{ matrix.target }} --lib --no-default-features
70+
- run: cargo test --target ${{ matrix.target }} --lib
71+
#- run: cargo test --target ${{ matrix.target }} --lib --features zeroize
72+
- run: cargo test --target ${{ matrix.target }} --all-features --lib
73+
- run: cargo test --target ${{ matrix.target }} --all-features --release
74+
- run: cargo test --target ${{ matrix.target }} --all-features --doc

.github/workflows/ocb3.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ jobs:
6767
toolchain: ${{ matrix.rust }}
6868
targets: ${{ matrix.target }}
6969
- run: ${{ matrix.deps }}
70-
- run: cargo test --target ${{ matrix.target }} --release
71-
- run: cargo test --target ${{ matrix.target }} --release --features zeroize
72-
- run: cargo test --target ${{ matrix.target }} --release --all-features
73-
- run: cargo build --target ${{ matrix.target }} --benches
70+
- run: cargo test --target ${{ matrix.target }} --lib --no-default-features
71+
- run: cargo test --target ${{ matrix.target }} --lib
72+
- run: cargo test --target ${{ matrix.target }} --lib --features zeroize
73+
- run: cargo test --target ${{ matrix.target }} --all-features --lib
74+
- run: cargo test --target ${{ matrix.target }} --all-features --release
75+
- run: cargo test --target ${{ matrix.target }} --all-features --doc

0 commit comments

Comments
 (0)