-
-
Notifications
You must be signed in to change notification settings - Fork 0
149 lines (115 loc) · 3.47 KB
/
Copy pathci.yml
File metadata and controls
149 lines (115 loc) · 3.47 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
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@v6
- name: Install Rust toolchain
shell: bash
run: scripts/ci_install_rust.sh
- name: Cache Rust build output
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install security tools
uses: taiki-e/install-action@v2
with:
tool: cargo-deny,cargo-audit,cargo-sbom
- name: Install cargo-license
run: cargo install --locked cargo-license --version 0.7.0
- name: Run checks
run: scripts/checks.sh
- name: Check fuzz-only dependencies
run: scripts/check_fuzz.sh
- name: Check performance harness dependencies
run: scripts/check_perf.sh
- name: Generate SBOM
run: scripts/generate-sbom.sh
- name: Reproducible package/build check
run: scripts/reproducible_build_check.sh
- name: Check x86 SIMD feature bundles
run: scripts/check_simd_feature_bundles.sh
platform:
name: Platform tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust toolchain
shell: bash
run: scripts/ci_install_rust.sh
- name: Cache Rust build output
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Test default features
run: cargo test --all-targets
- name: Test all features
run: cargo test --all-targets --all-features
- name: Check no_std library build
run: cargo check --no-default-features --lib
- name: Test no default features
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@v6
- 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@v2
with:
cache-on-failure: true
- name: Check no_std simd-reserved build
run: scripts/check_targets.sh ${{ matrix.target }}
miri:
name: Miri
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v6
- 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: cargo +nightly miri test --no-default-features