@@ -16,6 +16,9 @@ defaults:
1616env :
1717 CARGO_INCREMENTAL : 0
1818 RUSTFLAGS : " -Dwarnings"
19+ # NOTE: The mirror number changes with each version so keep these in sync
20+ SDE_FULL_VERSION_MIRROR : " 859732"
21+ SDE_FULL_VERSION : " 9.58.0-2025-06-16"
1922
2023# Cancels CI jobs when new commits are pushed to a PR branch
2124concurrency :
7376 env :
7477 CARGO_INCREMENTAL : 0
7578 RUSTDOCFLAGS : " -C target-feature=+aes,+ssse3"
76- RUSTFLAGS : " -Dwarnings -C target-feature=+aes,+ssse3"
79+ RUSTFLAGS : " -Dwarnings -C target-feature=+aes,+ssse3 --cfg aes_avx512_disable --cfg aes_avx256_disable "
7780 strategy :
7881 matrix :
7982 include :
@@ -102,6 +105,85 @@ jobs:
102105 - run : cargo test --target ${{ matrix.target }} --features hazmat
103106 - run : cargo test --target ${{ matrix.target }} --all-features
104107
108+ # Tests for the VAES AVX backend
109+ vaes256 :
110+ runs-on : ubuntu-latest
111+ strategy :
112+ matrix :
113+ include :
114+ - target : x86_64-unknown-linux-gnu
115+ rust : stable
116+ RUSTFLAGS : " -Dwarnings --cfg aes_avx256"
117+ env :
118+ CARGO_INCREMENTAL : 0
119+ RUSTFLAGS : ${{ matrix.RUSTFLAGS }}
120+ steps :
121+ - uses : actions/checkout@v4
122+ - name : Install Intel SDE
123+ run : |
124+ curl -JLO "https://downloadmirror.intel.com/${{ env.SDE_FULL_VERSION_MIRROR }}/sde-external-${{ env.SDE_FULL_VERSION }}-lin.tar.xz"
125+ tar xvf sde-external-${{ env.SDE_FULL_VERSION }}-lin.tar.xz -C /opt
126+ echo "/opt/sde-external-${{ env.SDE_FULL_VERSION }}-lin" >> $GITHUB_PATH
127+ - uses : RustCrypto/actions/cargo-cache@master
128+ - uses : dtolnay/rust-toolchain@master
129+ with :
130+ toolchain : ${{ matrix.rust }}
131+ targets : ${{ matrix.target }}
132+ # NOTE: Write a `.cargo/config.toml` to configure the target for VAES
133+ # NOTE: We use intel-sde as the runner since not all GitHub CI hosts support AVX512
134+ - name : write .cargo/config.toml
135+ shell : bash
136+ run : |
137+ cd ../aes/..
138+ mkdir -p .cargo
139+ echo '[target.${{ matrix.target }}]' > .cargo/config.toml
140+ echo 'runner = "sde64 -future --"' >> .cargo/config.toml
141+ - run : ${{ matrix.deps }}
142+ - run : cargo test --target ${{ matrix.target }}
143+ - run : cargo test --target ${{ matrix.target }} --features hazmat
144+ - run : cargo test --target ${{ matrix.target }} --all-features
145+
146+ # Tests for the VAES AVX512 backend
147+ vaes512 :
148+ runs-on : ubuntu-latest
149+ strategy :
150+ matrix :
151+ include :
152+ - target : x86_64-unknown-linux-gnu
153+ rust : stable
154+ RUSTFLAGS : " -Dwarnings --cfg aes_avx512"
155+ - target : x86_64-unknown-linux-gnu
156+ rust : stable
157+ RUSTFLAGS : " -Dwarnings --cfg aes_avx256 --cfg aes_avx512"
158+ env :
159+ CARGO_INCREMENTAL : 0
160+ RUSTFLAGS : ${{ matrix.RUSTFLAGS }}
161+ steps :
162+ - uses : actions/checkout@v4
163+ - name : Install Intel SDE
164+ run : |
165+ curl -JLO "https://downloadmirror.intel.com/${{ env.SDE_FULL_VERSION_MIRROR }}/sde-external-${{ env.SDE_FULL_VERSION }}-lin.tar.xz"
166+ tar xvf sde-external-${{ env.SDE_FULL_VERSION }}-lin.tar.xz -C /opt
167+ echo "/opt/sde-external-${{ env.SDE_FULL_VERSION }}-lin" >> $GITHUB_PATH
168+ - uses : RustCrypto/actions/cargo-cache@master
169+ - uses : dtolnay/rust-toolchain@master
170+ with :
171+ toolchain : ${{ matrix.rust }}
172+ targets : ${{ matrix.target }}
173+ # NOTE: Write a `.cargo/config.toml` to configure the target for VAES
174+ # NOTE: We use intel-sde as the runner since not all GitHub CI hosts support AVX512
175+ - name : write .cargo/config.toml
176+ shell : bash
177+ run : |
178+ cd ../aes/..
179+ mkdir -p .cargo
180+ echo '[target.${{ matrix.target }}]' > .cargo/config.toml
181+ echo 'runner = "sde64 -future --"' >> .cargo/config.toml
182+ - run : ${{ matrix.deps }}
183+ - run : cargo test --target ${{ matrix.target }}
184+ - run : cargo test --target ${{ matrix.target }} --features hazmat
185+ - run : cargo test --target ${{ matrix.target }} --all-features
186+
105187 # Tests for CPU feature autodetection with fallback to portable software implementation
106188 autodetect :
107189 runs-on : ubuntu-latest
@@ -165,7 +247,6 @@ jobs:
165247 - run : cargo test --target ${{ matrix.target }}
166248 - run : cargo test --target ${{ matrix.target }} --all-features
167249
168-
169250 # Cross-compiled tests
170251 cross :
171252 strategy :
0 commit comments