diff --git a/.github/workflows/aes.yml b/.github/workflows/aes.yml index f9edc7cb..40adfd62 100644 --- a/.github/workflows/aes.yml +++ b/.github/workflows/aes.yml @@ -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 @@ -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: @@ -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 @@ -159,7 +197,6 @@ jobs: - run: cargo test --target ${{ matrix.target }} - run: cargo test --target ${{ matrix.target }} --all-features - # Cross-compiled tests cross: strategy: