@@ -16,6 +16,9 @@ defaults:
16
16
env :
17
17
CARGO_INCREMENTAL : 0
18
18
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"
19
22
20
23
# Cancels CI jobs when new commits are pushed to a PR branch
21
24
concurrency :
73
76
env :
74
77
CARGO_INCREMENTAL : 0
75
78
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 "
77
80
strategy :
78
81
matrix :
79
82
include :
@@ -102,6 +105,85 @@ jobs:
102
105
- run : cargo test --target ${{ matrix.target }} --features hazmat
103
106
- run : cargo test --target ${{ matrix.target }} --all-features
104
107
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
+
105
187
# Tests for CPU feature autodetection with fallback to portable software implementation
106
188
autodetect :
107
189
runs-on : ubuntu-latest
@@ -165,7 +247,6 @@ jobs:
165
247
- run : cargo test --target ${{ matrix.target }}
166
248
- run : cargo test --target ${{ matrix.target }} --all-features
167
249
168
-
169
250
# Cross-compiled tests
170
251
cross :
171
252
strategy :
0 commit comments