Bump MSRV to 1.81 (#221) #388
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: poly1305 | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/poly1305.yml" | |
- "poly1305/**" | |
- "Cargo.*" | |
push: | |
branches: master | |
paths: | |
- "poly1305/**" | |
- "Cargo.*" | |
defaults: | |
run: | |
working-directory: poly1305 | |
env: | |
CARGO_INCREMENTAL: 0 | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- 1.81.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 for runtime AVX2 detection | |
autodetect: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
# 32-bit Linux | |
- target: i686-unknown-linux-gnu | |
rust: 1.81.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.81.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 AVX2 backend | |
avx2: | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -Ctarget-cpu=haswell -Dwarnings # Enables `avx2` target feature | |
strategy: | |
matrix: | |
include: | |
# 32-bit Linux | |
- target: i686-unknown-linux-gnu | |
rust: 1.81.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.81.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 | |
soft: | |
env: | |
RUSTFLAGS: "-Dwarnings --cfg poly1305_force_soft" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
# 32-bit Linux | |
- target: i686-unknown-linux-gnu | |
rust: 1.81.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.81.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 --all-features |