1
+ name : Check
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - master
8
+
9
+ jobs :
10
+ style :
11
+ name : Check Style
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+
17
+ - name : Install rust
18
+ run : rustup update
19
+
20
+ - name : Rustfmt Check
21
+ run : cargo fmt --all --check
22
+
23
+ clippy :
24
+ name : Clippy Check of ${{ matrix.impl.name }}
25
+ runs-on : ubuntu-latest
26
+
27
+ strategy :
28
+ fail-fast : false
29
+ matrix :
30
+ impl :
31
+ - name : AES-NI
32
+ target : x86_64-unknown-linux-gnu
33
+ caps : X86_64_UNKNOWN_LINUX_GNU
34
+ target-features : +sse4.1,+aes
35
+ - name : AES-NI with VAES
36
+ target : x86_64-unknown-linux-gnu
37
+ caps : X86_64_UNKNOWN_LINUX_GNU
38
+ target-features : +vaes
39
+ - name : AES-NI with VAES and AVX-512
40
+ target : x86_64-unknown-linux-gnu
41
+ caps : X86_64_UNKNOWN_LINUX_GNU
42
+ target-features : +vaes,+avx512f
43
+ - name : Neon
44
+ target : aarch64-unknown-linux-gnu
45
+ caps : AARCH64_UNKNOWN_LINUX_GNU
46
+ target-features : +aes
47
+ - name : RV64
48
+ target : riscv64gc-unknown-linux-gnu
49
+ caps : RISCV64GC_UNKNOWN_LINUX_GNU
50
+ target-features : +zkne,+zknd
51
+ - name : RV32
52
+ target : riscv32i-unknown-none-elf
53
+ caps : RISCV32I_UNKNOWN_NONE_ELF
54
+ target-features : +zkne,+zknd
55
+ - name : Software
56
+ target : x86_64-unknown-linux-gnu
57
+ caps : X86_64_UNKNOWN_LINUX_GNU
58
+ target-features : ' '
59
+ steps :
60
+ - uses : actions/checkout@v3
61
+
62
+ - run : ${{ format('echo "CARGO_TARGET_{0}_RUSTFLAGS=-C target-feature={1}" >> $GITHUB_ENV', matrix.impl.caps, matrix.impl.target-features) }}
63
+
64
+ - name : Install Rust
65
+ uses : actions-rs/toolchain@v1
66
+ with :
67
+ toolchain : nightly
68
+ target : ${{ matrix.impl.target }}
69
+ components : clippy
70
+ profile : minimal
71
+ override : true
72
+
73
+ - name : Clippy Check
74
+ run : cargo clippy --target ${{ matrix.impl.target }} --features=nightly --no-deps -- -D clippy::pedantic
75
+
76
+ test-aesni :
77
+ strategy :
78
+ matrix :
79
+ channel : [ stable, beta, nightly ]
80
+ name : Test of AESNI with ${{ matrix.channel }}
81
+ uses : ./.github/workflows/runtest.yml
82
+ with :
83
+ target : x86_64-unknown-linux-gnu
84
+ channel : ${{ matrix.channel }}
85
+ env-vars : CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS=-C target-feature=+sse4.1,+aes
86
+
87
+ test-aesni-vaes :
88
+ name : Test of AESNI with VAES
89
+ uses : ./.github/workflows/runtest.yml
90
+ with :
91
+ target : x86_64-unknown-linux-gnu
92
+ channel : nightly
93
+ env-vars : CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS=-C target-feature=+vaes
94
+
95
+ test-aesni-vaes-avx512 :
96
+ name : Test of AESNI with VAES and AVX512F
97
+ runs-on : ubuntu-latest
98
+ steps :
99
+ - uses : actions/checkout@v4
100
+
101
+ - name : Install Rust
102
+ run : |
103
+ rustup update nightly --no-self-update
104
+ rustup default nightly
105
+
106
+ - name : Download SDE
107
+ run : |
108
+ wget https://downloadmirror.intel.com/813591/sde-external-9.33.0-2024-01-07-lin.tar.xz
109
+ tar -xJf sde-external-9.33.0-2024-01-07-lin.tar.xz
110
+ echo "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER=./sde-external-9.33.0-2024-01-07-lin/sde64 -future --" >> $GITHUB_ENV
111
+
112
+ - name : Test
113
+ run : |
114
+ echo "RUSTFLAGS=-C target-feature=+avx512f,+vaes" >> $GITHUB_ENV
115
+ cargo test --features=nightly
116
+
117
+ test-neon :
118
+ strategy :
119
+ matrix :
120
+ channel : [ stable, beta, nightly ]
121
+ name : Test of Neon on AArch64 with ${{ matrix.channel }}
122
+ uses : ./.github/workflows/runtest.yml
123
+ with :
124
+ target : aarch64-unknown-linux-gnu
125
+ channel : ${{ matrix.channel }}
126
+ env-vars : CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUSTFLAGS=-C target-feature=+aes
127
+
128
+ test-armv8 :
129
+ name : Test of Neon on ${{ matrix.target.triple }}
130
+ strategy :
131
+ fail-fast : false
132
+ matrix :
133
+ target :
134
+ - triple : armv7-linux-androideabi
135
+ caps : ARMV7_LINUX_ANDROIDEABI
136
+ - triple : armv7-unknown-linux-gnueabihf
137
+ caps : ARMV7_UNKNOWN_LINUX_GNUEABIHF
138
+ - triple : thumbv7neon-linux-androideabi
139
+ caps : THUMBV7NEON_LINUX_ANDROIDEABI
140
+ - triple : thumbv7neon-unknown-linux-gnueabihf
141
+ caps : THUMBV7NEON_UNKNOWN_LINUX_GNUEABIHF
142
+ uses : ./.github/workflows/runtest.yml
143
+ with :
144
+ target : ${{ matrix.target.triple }}
145
+ channel : nightly
146
+ env-vars : ${{ format('CARGO_TARGET_{0}_RUSTFLAGS=-C target-feature=+v8,+aes', matrix.target.caps) }}
147
+
148
+ test-riscv64 :
149
+ name : Test of RV64
150
+ uses : ./.github/workflows/runtest.yml
151
+ with :
152
+ target : riscv64gc-unknown-linux-gnu
153
+ channel : nightly
154
+ env-vars : |
155
+ CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_RUSTFLAGS=-C target-feature=+zkne,+zknd
156
+ CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_RUNNER=qemu-riscv64 -cpu max
157
+
158
+ test-software :
159
+ strategy :
160
+ matrix :
161
+ channel : [ stable, beta, nightly ]
162
+ target :
163
+ - x86_64-unknown-linux-gnu
164
+ - powerpc64-unknown-linux-gnu
165
+ name : Test of Software AES on ${{ matrix.target }} with ${{ matrix.channel }} Rust
166
+ uses : ./.github/workflows/runtest.yml
167
+ with :
168
+ target : ${{ matrix.target }}
169
+ channel : ${{ matrix.channel }}
0 commit comments