From a2616ed9ae5333c9ff92d8b28fcd523b868191b3 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Fri, 26 Dec 2025 10:00:46 -0700 Subject: [PATCH] CI: run tests as debug builds with `--lib` - 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. --- .github/workflows/aes-gcm-siv.yml | 10 +++++---- .github/workflows/aes-gcm.yml | 11 +++++----- .github/workflows/aes-siv.yml | 28 ++++++++++++++++++++------ .github/workflows/ascon-aead128.yml | 10 +++++---- .github/workflows/belt-dwp.yml | 9 ++++++--- .github/workflows/ccm.yml | 10 +++++---- .github/workflows/chacha20poly1305.yml | 11 +++++----- .github/workflows/deoxys.yml | 28 ++++++++++++++++++++------ .github/workflows/eax.yml | 28 ++++++++++++++++++++------ .github/workflows/ocb3.yml | 10 +++++---- .github/workflows/xaes-256-gcm.yml | 10 +++++---- 11 files changed, 114 insertions(+), 51 deletions(-) diff --git a/.github/workflows/aes-gcm-siv.yml b/.github/workflows/aes-gcm-siv.yml index 3eb60844..a13e76a9 100644 --- a/.github/workflows/aes-gcm-siv.yml +++ b/.github/workflows/aes-gcm-siv.yml @@ -67,7 +67,9 @@ jobs: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - run: ${{ matrix.deps }} - - run: cargo test --target ${{ matrix.target }} --release --no-default-features - - run: cargo test --target ${{ matrix.target }} --release - - run: cargo test --target ${{ matrix.target }} --release --all-features - - run: cargo build --target ${{ matrix.target }} --benches + - run: cargo test --target ${{ matrix.target }} --lib --no-default-features + - run: cargo test --target ${{ matrix.target }} --lib + - run: cargo test --target ${{ matrix.target }} --lib --features zeroize + - run: cargo test --target ${{ matrix.target }} --all-features --lib + - run: cargo test --target ${{ matrix.target }} --all-features --release + - run: cargo test --target ${{ matrix.target }} --all-features --doc diff --git a/.github/workflows/aes-gcm.yml b/.github/workflows/aes-gcm.yml index be0b8740..4610e58c 100644 --- a/.github/workflows/aes-gcm.yml +++ b/.github/workflows/aes-gcm.yml @@ -67,8 +67,9 @@ jobs: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - run: ${{ matrix.deps }} - - run: cargo test --target ${{ matrix.target }} --release --no-default-features --lib - - run: cargo test --target ${{ matrix.target }} --release - - run: cargo test --target ${{ matrix.target }} --release --features zeroize - - run: cargo test --target ${{ matrix.target }} --release --all-features - - run: cargo build --target ${{ matrix.target }} --benches + - run: cargo test --target ${{ matrix.target }} --lib --no-default-features + - run: cargo test --target ${{ matrix.target }} --lib + - run: cargo test --target ${{ matrix.target }} --lib --features zeroize + - run: cargo test --target ${{ matrix.target }} --all-features --lib + - run: cargo test --target ${{ matrix.target }} --all-features --release + - run: cargo test --target ${{ matrix.target }} --all-features --doc diff --git a/.github/workflows/aes-siv.yml b/.github/workflows/aes-siv.yml index 78f5522e..29c7dc2d 100644 --- a/.github/workflows/aes-siv.yml +++ b/.github/workflows/aes-siv.yml @@ -46,14 +46,30 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rust: - - 1.85.0 # MSRV - - stable + include: + # 32-bit Linux + - target: i686-unknown-linux-gnu + rust: 1.85.0 # MSRV + deps: sudo apt update && sudo apt install gcc-multilib + - target: i686-unknown-linux-gnu + rust: stable + deps: sudo apt update && sudo apt install gcc-multilib + + # 64-bit Linux + - target: x86_64-unknown-linux-gnu + rust: 1.85.0 # MSRV + - target: x86_64-unknown-linux-gnu + rust: stable steps: - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo test --release --no-default-features - - run: cargo test --release - - run: cargo test --release --all-features + targets: ${{ matrix.target }} + - run: ${{ matrix.deps }} + - run: cargo test --target ${{ matrix.target }} --lib --no-default-features + - run: cargo test --target ${{ matrix.target }} --lib + - run: cargo test --target ${{ matrix.target }} --lib --features zeroize + - run: cargo test --target ${{ matrix.target }} --all-features --lib + - run: cargo test --target ${{ matrix.target }} --all-features --release + - run: cargo test --target ${{ matrix.target }} --all-features --doc diff --git a/.github/workflows/ascon-aead128.yml b/.github/workflows/ascon-aead128.yml index 0233bb0a..a21c8f12 100644 --- a/.github/workflows/ascon-aead128.yml +++ b/.github/workflows/ascon-aead128.yml @@ -67,7 +67,9 @@ jobs: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - run: ${{ matrix.deps }} - - run: cargo test --target ${{ matrix.target }} --release --no-default-features - - run: cargo test --target ${{ matrix.target }} --release - - run: cargo test --target ${{ matrix.target }} --release --features zeroize - - run: cargo test --target ${{ matrix.target }} --release --all-features + - run: cargo test --target ${{ matrix.target }} --lib --no-default-features + - run: cargo test --target ${{ matrix.target }} --lib + - run: cargo test --target ${{ matrix.target }} --lib --features zeroize + - run: cargo test --target ${{ matrix.target }} --all-features --lib + - run: cargo test --target ${{ matrix.target }} --all-features --release + - run: cargo test --target ${{ matrix.target }} --all-features --doc diff --git a/.github/workflows/belt-dwp.yml b/.github/workflows/belt-dwp.yml index dc097685..c95e4382 100644 --- a/.github/workflows/belt-dwp.yml +++ b/.github/workflows/belt-dwp.yml @@ -76,6 +76,9 @@ jobs: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - run: ${{ matrix.deps }} - - run: cargo test --target ${{ matrix.target }} --release --no-default-features --lib - - run: cargo test --target ${{ matrix.target }} --release - - run: cargo test --target ${{ matrix.target }} --release --all-features + - run: cargo test --target ${{ matrix.target }} --lib --no-default-features + - run: cargo test --target ${{ matrix.target }} --lib + - run: cargo test --target ${{ matrix.target }} --lib --features zeroize + - run: cargo test --target ${{ matrix.target }} --all-features --lib + - run: cargo test --target ${{ matrix.target }} --all-features --release + - run: cargo test --target ${{ matrix.target }} --all-features --doc diff --git a/.github/workflows/ccm.yml b/.github/workflows/ccm.yml index 85b996cd..1ca160b9 100644 --- a/.github/workflows/ccm.yml +++ b/.github/workflows/ccm.yml @@ -66,7 +66,9 @@ jobs: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - run: ${{ matrix.deps }} - - run: cargo test --target ${{ matrix.target }} --release --no-default-features - - run: cargo test --target ${{ matrix.target }} --release - - run: cargo test --target ${{ matrix.target }} --release --all-features - - run: cargo build --target ${{ matrix.target }} --benches + - run: cargo test --target ${{ matrix.target }} --lib --no-default-features + - run: cargo test --target ${{ matrix.target }} --lib + #- run: cargo test --target ${{ matrix.target }} --lib --features zeroize + - run: cargo test --target ${{ matrix.target }} --all-features --lib + - run: cargo test --target ${{ matrix.target }} --all-features --release + - run: cargo test --target ${{ matrix.target }} --all-features --doc diff --git a/.github/workflows/chacha20poly1305.yml b/.github/workflows/chacha20poly1305.yml index 8b8d785b..8c45dfa3 100644 --- a/.github/workflows/chacha20poly1305.yml +++ b/.github/workflows/chacha20poly1305.yml @@ -68,9 +68,10 @@ jobs: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - run: ${{ matrix.deps }} - - run: cargo test --target ${{ matrix.target }} --release --no-default-features - - run: cargo test --target ${{ matrix.target }} --release - - run: cargo test --target ${{ matrix.target }} --release --features reduced-round - - run: cargo test --target ${{ matrix.target }} --release --all-features - - run: cargo build --target ${{ matrix.target }} --benches + - run: cargo test --target ${{ matrix.target }} --lib --no-default-features + - run: cargo test --target ${{ matrix.target }} --lib + - run: cargo test --target ${{ matrix.target }} --lib --features zeroize + - run: cargo test --target ${{ matrix.target }} --all-features --lib + - run: cargo test --target ${{ matrix.target }} --all-features --release + - run: cargo test --target ${{ matrix.target }} --all-features --doc diff --git a/.github/workflows/deoxys.yml b/.github/workflows/deoxys.yml index eb5ce9fc..bb931396 100644 --- a/.github/workflows/deoxys.yml +++ b/.github/workflows/deoxys.yml @@ -46,14 +46,30 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rust: - - 1.85.0 # MSRV - - stable + include: + # 32-bit Linux + - target: i686-unknown-linux-gnu + rust: 1.85.0 # MSRV + deps: sudo apt update && sudo apt install gcc-multilib + - target: i686-unknown-linux-gnu + rust: stable + deps: sudo apt update && sudo apt install gcc-multilib + + # 64-bit Linux + - target: x86_64-unknown-linux-gnu + rust: 1.85.0 # MSRV + - target: x86_64-unknown-linux-gnu + rust: stable steps: - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo test --release --no-default-features --lib - - run: cargo test --release - - run: cargo test --release --all-features + targets: ${{ matrix.target }} + - run: ${{ matrix.deps }} + - run: cargo test --target ${{ matrix.target }} --lib --no-default-features + - run: cargo test --target ${{ matrix.target }} --lib + - run: cargo test --target ${{ matrix.target }} --lib --features zeroize + - run: cargo test --target ${{ matrix.target }} --all-features --lib + - run: cargo test --target ${{ matrix.target }} --all-features --release + - run: cargo test --target ${{ matrix.target }} --all-features --doc diff --git a/.github/workflows/eax.yml b/.github/workflows/eax.yml index 2d837b50..81a8c905 100644 --- a/.github/workflows/eax.yml +++ b/.github/workflows/eax.yml @@ -45,14 +45,30 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rust: - - 1.85.0 # MSRV - - stable + include: + # 32-bit Linux + - target: i686-unknown-linux-gnu + rust: 1.85.0 # MSRV + deps: sudo apt update && sudo apt install gcc-multilib + - target: i686-unknown-linux-gnu + rust: stable + deps: sudo apt update && sudo apt install gcc-multilib + + # 64-bit Linux + - target: x86_64-unknown-linux-gnu + rust: 1.85.0 # MSRV + - target: x86_64-unknown-linux-gnu + rust: stable steps: - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: cargo test --release --no-default-features - - run: cargo test --release - - run: cargo test --release --all-features + targets: ${{ matrix.target }} + - run: ${{ matrix.deps }} + - run: cargo test --target ${{ matrix.target }} --lib --no-default-features + - run: cargo test --target ${{ matrix.target }} --lib + #- run: cargo test --target ${{ matrix.target }} --lib --features zeroize + - run: cargo test --target ${{ matrix.target }} --all-features --lib + - run: cargo test --target ${{ matrix.target }} --all-features --release + - run: cargo test --target ${{ matrix.target }} --all-features --doc diff --git a/.github/workflows/ocb3.yml b/.github/workflows/ocb3.yml index 420bdd02..7dad11d6 100644 --- a/.github/workflows/ocb3.yml +++ b/.github/workflows/ocb3.yml @@ -67,7 +67,9 @@ jobs: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - run: ${{ matrix.deps }} - - run: cargo test --target ${{ matrix.target }} --release - - run: cargo test --target ${{ matrix.target }} --release --features zeroize - - run: cargo test --target ${{ matrix.target }} --release --all-features - - run: cargo build --target ${{ matrix.target }} --benches + - run: cargo test --target ${{ matrix.target }} --lib --no-default-features + - run: cargo test --target ${{ matrix.target }} --lib + - run: cargo test --target ${{ matrix.target }} --lib --features zeroize + - run: cargo test --target ${{ matrix.target }} --all-features --lib + - run: cargo test --target ${{ matrix.target }} --all-features --release + - run: cargo test --target ${{ matrix.target }} --all-features --doc diff --git a/.github/workflows/xaes-256-gcm.yml b/.github/workflows/xaes-256-gcm.yml index 472ba96e..67027fbc 100644 --- a/.github/workflows/xaes-256-gcm.yml +++ b/.github/workflows/xaes-256-gcm.yml @@ -67,7 +67,9 @@ jobs: toolchain: ${{ matrix.rust }} targets: ${{ matrix.target }} - run: ${{ matrix.deps }} - - run: cargo test --target ${{ matrix.target }} --release --no-default-features --lib - - run: cargo test --target ${{ matrix.target }} --release - - run: cargo test --target ${{ matrix.target }} --release --all-features - - run: cargo build --target ${{ matrix.target }} --benches + - run: cargo test --target ${{ matrix.target }} --lib --no-default-features + - run: cargo test --target ${{ matrix.target }} --lib + #- run: cargo test --target ${{ matrix.target }} --lib --features zeroize + - run: cargo test --target ${{ matrix.target }} --all-features --lib + - run: cargo test --target ${{ matrix.target }} --all-features --release + - run: cargo test --target ${{ matrix.target }} --all-features --doc