Skip to content

Commit

Permalink
Add VAES job to aes CI
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanshade committed Feb 11, 2024
1 parent 266b7a5 commit 83f590f
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions .github/workflows/aes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ defaults:
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"
SDE_FULL_VERSION: "9.33.0-2024-01-07"

jobs:
# Builds for no_std platforms
Expand Down Expand Up @@ -59,7 +60,7 @@ jobs:
minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}
working-directory: ${{ github.workflow }}

# Tests for the AES-NI backend
aesni:
Expand Down Expand Up @@ -96,6 +97,43 @@ jobs:
- run: cargo test --target ${{ matrix.target }} --features hazmat
- run: cargo test --target ${{ matrix.target }} --all-features

# Tests for the VAES
vaes:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
rust: nightly-2024-02-07
steps:
- uses: actions/checkout@v4
- uses: silvanshade/rustcrypto-actions/intel-sde-install@master
with:
sde-full-version: ${{ env.SDE_FULL_VERSION }}
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
# NOTE: Write a `.cargo/config.toml` to configure the target for VAES
# NOTE: We use intel-sde as the runner since not all GitHub CI hosts support AVX512
- name: write .cargo/config.toml
shell: bash
run: |
cd ../aes/..
mkdir -p .cargo
echo '[target.${{ matrix.target }}]' > .cargo/config.toml
echo 'runner = "sde64 -future --"' >> .cargo/config.toml
echo 'rustflags = [' >> .cargo/config.toml
echo ' "-C", "target-feature=+aes,+sse3,+vaes",' >> .cargo/config.toml
echo ']' >> .cargo/config.toml
- run: ${{ matrix.deps }}
- run: cargo test --target ${{ matrix.target }}
- run: cargo test --target ${{ matrix.target }} --features hazmat
- run: cargo test --target ${{ matrix.target }} --all-features

# Tests for CPU feature autodetection with fallback to portable software implementation
autodetect:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -159,7 +197,6 @@ jobs:
- run: cargo test --target ${{ matrix.target }}
- run: cargo test --target ${{ matrix.target }} --all-features


# Cross-compiled tests
cross:
strategy:
Expand Down

0 comments on commit 83f590f

Please sign in to comment.