Cut release candidate (#216) #385
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: polyval | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/polyval.yml" | |
- "polyval/**" | |
- "Cargo.*" | |
push: | |
branches: master | |
paths: | |
- "polyval/**" | |
- "Cargo.*" | |
defaults: | |
run: | |
working-directory: polyval | |
env: | |
CARGO_INCREMENTAL: 0 | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- 1.65.0 # MSRV | |
- stable | |
target: | |
- thumbv7em-none-eabi | |
- wasm32-unknown-unknown | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
targets: ${{ matrix.target }} | |
- run: cargo build --target ${{ matrix.target }} --release | |
- run: cargo build --target ${{ matrix.target }} --release --features zeroize | |
# Tests with CPU feature detection enabled | |
autodetect: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
# 32-bit Linux | |
- target: i686-unknown-linux-gnu | |
rust: 1.65.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.65.0 # MSRV | |
- target: x86_64-unknown-linux-gnu | |
rust: stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
targets: ${{ matrix.target }} | |
- run: ${{ matrix.deps }} | |
- run: cargo check --target ${{ matrix.target }} --all-features | |
- run: cargo test --target ${{ matrix.target }} --release | |
- run: cargo test --target ${{ matrix.target }} --release --features std | |
- run: cargo test --target ${{ matrix.target }} --release --features zeroize | |
- run: cargo test --target ${{ matrix.target }} --release --features std,zeroize | |
# Tests for the CLMUL backend (forced) | |
clmul: | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -Ctarget-cpu=haswell -Ctarget-feature=+sse2,+sse4.1 | |
strategy: | |
matrix: | |
include: | |
# 32-bit Linux | |
- target: i686-unknown-linux-gnu | |
rust: 1.65.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.65.0 # MSRV | |
- target: x86_64-unknown-linux-gnu | |
rust: stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
targets: ${{ matrix.target }} | |
- run: ${{ matrix.deps }} | |
- run: cargo check --target ${{ matrix.target }} --all-features | |
- run: cargo test --target ${{ matrix.target }} --release | |
- run: cargo test --target ${{ matrix.target }} --release --features std | |
- run: cargo test --target ${{ matrix.target }} --release --features zeroize | |
- run: cargo test --target ${{ matrix.target }} --release --all-features | |
# Tests for the portable software backend (forced) | |
soft: | |
env: | |
RUSTFLAGS: "-Dwarnings --cfg polyval_force_soft" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
# 32-bit Linux | |
- target: i686-unknown-linux-gnu | |
rust: 1.65.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.65.0 # MSRV | |
- target: x86_64-unknown-linux-gnu | |
rust: stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
targets: ${{ matrix.target }} | |
- run: ${{ matrix.deps }} | |
- run: cargo check --target ${{ matrix.target }} --all-features | |
- run: cargo test --target ${{ matrix.target }} --release | |
- run: cargo test --target ${{ matrix.target }} --release --features std | |
- run: cargo test --target ${{ matrix.target }} --release --features zeroize | |
- run: cargo test --target ${{ matrix.target }} --release --all-features | |
# Cross-compiled tests | |
cross: | |
strategy: | |
matrix: | |
include: | |
- target: aarch64-unknown-linux-gnu | |
- target: powerpc-unknown-linux-gnu | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ${{ matrix.deps }} | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
targets: ${{ matrix.target }} | |
- run: cargo install cross | |
- run: cross test --target ${{ matrix.target }} --release | |
- run: cross test --target ${{ matrix.target }} --release --features std | |
- run: cross test --target ${{ matrix.target }} --release --features zeroize | |
- run: cross test --target ${{ matrix.target }} --release --all-features | |
# ARMv8 cross-compiled tests for PMULL intrinsics (nightly-only) | |
armv8: | |
env: | |
RUSTFLAGS: "-Dwarnings --cfg polyval_armv8" | |
strategy: | |
matrix: | |
include: | |
- target: aarch64-unknown-linux-gnu | |
rust: nightly | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ${{ matrix.deps }} | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
targets: ${{ matrix.target }} | |
- run: cargo install cross | |
- run: cross test --target ${{ matrix.target }} --release | |
- run: cross test --target ${{ matrix.target }} --release --features std | |
- run: cross test --target ${{ matrix.target }} --release --features zeroize | |
- run: cross test --target ${{ matrix.target }} --release --all-features |