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