@@ -16,6 +16,7 @@ defaults:
16
16
env :
17
17
CARGO_INCREMENTAL : 0
18
18
RUSTFLAGS : " -Dwarnings"
19
+ SDE_FULL_VERSION : " 9.53.0-2025-03-16"
19
20
20
21
# Cancels CI jobs when new commits are pushed to a PR branch
21
22
concurrency :
73
74
env :
74
75
CARGO_INCREMENTAL : 0
75
76
RUSTDOCFLAGS : " -C target-feature=+aes,+ssse3"
76
- RUSTFLAGS : " -Dwarnings -C target-feature=+aes,+ssse3"
77
+ RUSTFLAGS : " -Dwarnings -C target-feature=+aes,+ssse3 --cfg aes_avx512_disable --cfg aes_avx256_disable "
77
78
strategy :
78
79
matrix :
79
80
include :
@@ -102,6 +103,85 @@ jobs:
102
103
- run : cargo test --target ${{ matrix.target }} --features hazmat
103
104
- run : cargo test --target ${{ matrix.target }} --all-features
104
105
106
+ # Tests for the VAES AVX backend
107
+ vaes256 :
108
+ runs-on : ubuntu-latest
109
+ strategy :
110
+ matrix :
111
+ include :
112
+ - target : x86_64-unknown-linux-gnu
113
+ rust : stable
114
+ RUSTFLAGS : " -Dwarnings --cfg aes_avx256"
115
+ env :
116
+ CARGO_INCREMENTAL : 0
117
+ RUSTFLAGS : ${{ matrix.RUSTFLAGS }}
118
+ steps :
119
+ - uses : actions/checkout@v4
120
+ - name : Install Intel SDE
121
+ run : |
122
+ curl -JLO "https://downloadmirror.intel.com/850782/sde-external-${{ env.SDE_FULL_VERSION }}-lin.tar.xz"
123
+ tar xvf sde-external-${{ env.SDE_FULL_VERSION }}-lin.tar.xz -C /opt
124
+ echo "/opt/sde-external-${{ env.SDE_FULL_VERSION }}-lin" >> $GITHUB_PATH
125
+ - uses : RustCrypto/actions/cargo-cache@master
126
+ - uses : dtolnay/rust-toolchain@master
127
+ with :
128
+ toolchain : ${{ matrix.rust }}
129
+ targets : ${{ matrix.target }}
130
+ # NOTE: Write a `.cargo/config.toml` to configure the target for VAES
131
+ # NOTE: We use intel-sde as the runner since not all GitHub CI hosts support AVX512
132
+ - name : write .cargo/config.toml
133
+ shell : bash
134
+ run : |
135
+ cd ../aes/..
136
+ mkdir -p .cargo
137
+ echo '[target.${{ matrix.target }}]' > .cargo/config.toml
138
+ echo 'runner = "sde64 -future --"' >> .cargo/config.toml
139
+ - run : ${{ matrix.deps }}
140
+ - run : cargo test --target ${{ matrix.target }}
141
+ - run : cargo test --target ${{ matrix.target }} --features hazmat
142
+ - run : cargo test --target ${{ matrix.target }} --all-features
143
+
144
+ # Tests for the VAES AVX512 backend
145
+ vaes512 :
146
+ runs-on : ubuntu-latest
147
+ strategy :
148
+ matrix :
149
+ include :
150
+ - target : x86_64-unknown-linux-gnu
151
+ rust : stable
152
+ RUSTFLAGS : " -Dwarnings --cfg aes_avx512"
153
+ - target : x86_64-unknown-linux-gnu
154
+ rust : stable
155
+ RUSTFLAGS : " -Dwarnings --cfg aes_avx256 --cfg aes_avx512"
156
+ env :
157
+ CARGO_INCREMENTAL : 0
158
+ RUSTFLAGS : ${{ matrix.RUSTFLAGS }}
159
+ steps :
160
+ - uses : actions/checkout@v4
161
+ - name : Install Intel SDE
162
+ run : |
163
+ curl -JLO "https://downloadmirror.intel.com/850782/sde-external-${{ env.SDE_FULL_VERSION }}-lin.tar.xz"
164
+ tar xvf sde-external-${{ env.SDE_FULL_VERSION }}-lin.tar.xz -C /opt
165
+ echo "/opt/sde-external-${{ env.SDE_FULL_VERSION }}-lin" >> $GITHUB_PATH
166
+ - uses : RustCrypto/actions/cargo-cache@master
167
+ - uses : dtolnay/rust-toolchain@master
168
+ with :
169
+ toolchain : ${{ matrix.rust }}
170
+ targets : ${{ matrix.target }}
171
+ # NOTE: Write a `.cargo/config.toml` to configure the target for VAES
172
+ # NOTE: We use intel-sde as the runner since not all GitHub CI hosts support AVX512
173
+ - name : write .cargo/config.toml
174
+ shell : bash
175
+ run : |
176
+ cd ../aes/..
177
+ mkdir -p .cargo
178
+ echo '[target.${{ matrix.target }}]' > .cargo/config.toml
179
+ echo 'runner = "sde64 -future --"' >> .cargo/config.toml
180
+ - run : ${{ matrix.deps }}
181
+ - run : cargo test --target ${{ matrix.target }}
182
+ - run : cargo test --target ${{ matrix.target }} --features hazmat
183
+ - run : cargo test --target ${{ matrix.target }} --all-features
184
+
105
185
# Tests for CPU feature autodetection with fallback to portable software implementation
106
186
autodetect :
107
187
runs-on : ubuntu-latest
@@ -165,7 +245,6 @@ jobs:
165
245
- run : cargo test --target ${{ matrix.target }}
166
246
- run : cargo test --target ${{ matrix.target }} --all-features
167
247
168
-
169
248
# Cross-compiled tests
170
249
cross :
171
250
strategy :
0 commit comments