-
Notifications
You must be signed in to change notification settings - Fork 1
193 lines (139 loc) · 4.87 KB
/
ci.yml
File metadata and controls
193 lines (139 loc) · 4.87 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
test:
name: Test
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --features "bytecode,taylor,laurent,stde,serde,faer,nalgebra,ndarray,parallel,diffop"
- name: Run tests (echidna with all features)
run: cargo test -p echidna --features "bytecode,taylor,laurent,stde,serde,faer,nalgebra,ndarray,parallel,diffop"
- name: Run tests (echidna-optim)
run: cargo test -p echidna-optim
- name: Run tests (echidna-optim with sparse-implicit)
run: cargo test -p echidna-optim --features sparse-implicit
lint:
name: Lint
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy (all non-CUDA features)
run: cargo clippy --features "bytecode,taylor,laurent,stde,serde,faer,nalgebra,ndarray,parallel,diffop,gpu-wgpu" -- -D warnings
- name: Clippy (echidna-optim)
run: cargo clippy -p echidna-optim --all-features -- -D warnings
docs:
name: Documentation
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Build docs (echidna)
run: cargo doc --no-deps --features "bytecode,taylor,laurent,stde,serde,faer,nalgebra,ndarray"
env:
RUSTDOCFLAGS: -D warnings
- name: Build docs (echidna-optim)
run: cargo doc -p echidna-optim --no-deps --all-features
env:
RUSTDOCFLAGS: -D warnings
msrv:
name: MSRV (1.93)
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- name: Install Rust 1.93
uses: dtolnay/rust-toolchain@1.93
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Build (default features)
run: cargo build
- name: Test (default features)
run: cargo test
- name: Build (bytecode)
run: cargo build --features bytecode
- name: Test (bytecode)
run: cargo test --features bytecode
- name: Build (taylor)
run: cargo build --features taylor
- name: Test (taylor)
run: cargo test --features taylor
- name: Build (stde)
run: cargo build --features stde
- name: Test (stde)
run: cargo test --features stde
- name: Build (bytecode,taylor)
run: cargo build --features bytecode,taylor
- name: Test (bytecode,taylor)
run: cargo test --features bytecode,taylor
- name: Build (bytecode,stde)
run: cargo build --features bytecode,stde
- name: Test (bytecode,stde)
run: cargo test --features bytecode,stde
- name: Build (taylor,stde)
run: cargo build --features taylor,stde
- name: Test (taylor,stde)
run: cargo test --features taylor,stde
- name: Build (bytecode,taylor,stde)
run: cargo build --features bytecode,taylor,stde
- name: Test (bytecode,taylor,stde)
run: cargo test --features bytecode,taylor,stde
coverage:
name: Coverage
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Generate coverage
run: cargo tarpaulin --out xml --timeout 300 --features "bytecode,taylor,laurent,stde,serde,faer,nalgebra,ndarray,parallel"
continue-on-error: true
- name: Upload coverage
uses: codecov/codecov-action@v5
with:
files: cobertura.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
security:
name: Security Audit
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Install cargo-audit
run: cargo install cargo-audit --locked
- name: Audit dependencies
run: cargo audit
- name: Install cargo-deny
run: cargo install cargo-deny --locked
- name: Check dependency policies
run: cargo deny check