-
-
Notifications
You must be signed in to change notification settings - Fork 0
219 lines (173 loc) · 5.92 KB
/
Copy pathci.yml
File metadata and controls
219 lines (173 loc) · 5.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
name: Rust CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
checks:
name: Format, lint, test, and audit
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Rust toolchain
shell: bash
run: scripts/ci_install_rust.sh
- name: Cache Rust build output
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
cache-on-failure: true
- name: Install security and test tools
uses: taiki-e/install-action@c7eb1735f09259a5035e8e5d44b1406b1cddc0fb # v2.83.0
with:
tool: cargo-audit@0.22.2,cargo-nextest@0.9.140
fallback: none
- name: Install crates.io release tools
run: |
cargo install --locked cargo-deny --version 0.20.2
cargo install --locked cargo-license --version 0.7.0
cargo install --locked cargo-sbom --version 0.10.0
- name: Run checks
run: scripts/checks.sh
- name: Run nextest
run: cargo nextest run --all-features
- name: Check fuzz-only dependencies
run: scripts/check_fuzz.sh
- name: Check performance harness dependencies
run: scripts/check_perf.sh
- name: Check dudect timing harness dependencies
run: scripts/check_dudect.sh
- name: Generate constant-time assembly evidence
run: scripts/generate_ct_asm_evidence.sh
- name: Generate SBOM
run: scripts/generate-sbom.sh
- name: Reproducible package/build check
run: scripts/reproducible_build_check.sh
- name: Install SIMD feature-bundle targets
run: rustup target add aarch64-unknown-linux-gnu wasm32-unknown-unknown
- name: Check SIMD feature bundles
run: scripts/check_simd_feature_bundles.sh
rust-version-compat:
name: Rust compatibility (${{ matrix.toolchain }})
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
toolchain:
- 1.90.0
- 1.91.0
- 1.92.0
- 1.93.0
- 1.94.0
- 1.95.0
- 1.96.0
- 1.96.1
- 1.97.0
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Rust toolchain
run: rustup toolchain install ${{ matrix.toolchain }}
- name: Cache Rust build output
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
cache-on-failure: true
key: rust-${{ matrix.toolchain }}
- name: Check all features
run: cargo +${{ matrix.toolchain }} check --all-features
- name: Check no-default-features library
run: cargo +${{ matrix.toolchain }} check --no-default-features --lib
platform:
name: Platform tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- macos-15
- macos-26
- macos-15-intel
- windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Rust toolchain
shell: bash
run: scripts/ci_install_rust.sh
- name: Cache Rust build output
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
cache-on-failure: true
- name: Run macOS verification
if: startsWith(matrix.os, 'macos')
run: scripts/check_macos.sh
- name: Test default features
if: ${{ !startsWith(matrix.os, 'macos') }}
run: cargo test --all-targets
- name: Test all features
if: ${{ !startsWith(matrix.os, 'macos') }}
run: cargo test --all-targets --all-features
- name: Check no_std library build
if: ${{ !startsWith(matrix.os, 'macos') }}
run: cargo check --no-default-features --lib
- name: Test no default features
if: ${{ !startsWith(matrix.os, 'macos') }}
run: cargo test --no-default-features --all-targets
target-build:
name: no_std target build (${{ matrix.target }})
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- x86_64-unknown-freebsd
- wasm32-unknown-unknown
- thumbv7em-none-eabihf
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Rust toolchain
shell: bash
run: scripts/ci_install_rust.sh
- name: Install Rust target
run: rustup target add ${{ matrix.target }}
- name: Cache Rust build output
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
cache-on-failure: true
- name: Check no_std simd-reserved build
run: scripts/check_targets.sh ${{ matrix.target }}
- name: Check no-alloc portability smoke
run: scripts/check_no_alloc_smoke.sh ${{ matrix.target }}
miri:
name: Miri
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Rust toolchain
shell: bash
run: scripts/ci_install_rust.sh
- name: Install nightly with Miri
run: |
rustup toolchain install nightly --component miri
cargo +nightly miri setup
- name: Run Miri tests
run: scripts/check_miri.sh