-
Notifications
You must be signed in to change notification settings - Fork 78
218 lines (201 loc) · 5.91 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- dev
pull_request:
types:
- opened
- reopened
- synchronize
- auto_merge_enabled
- edited
merge_group:
types:
- checks_requested
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
components: rustfmt
toolchain: nightly-2024-01-04
- uses: Swatinem/rust-cache@v2
- run: scripts/rust_fmt.sh --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
components: clippy
toolchain: nightly-2024-01-04
- uses: Swatinem/rust-cache@v2
- run: scripts/clippy.sh
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-04
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly-2024-01-04 doc
run-wasm32-wasi-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-04
targets: wasm32-wasi
- uses: taiki-e/install-action@v2
with:
tool: wasmtime
- uses: Swatinem/rust-cache@v2
- run: cargo test --target wasm32-wasi
env:
CARGO_TARGET_WASM32_WASI_RUNNER: "wasmtime run --"
RUSTFLAGS: -C target-feature=+simd128
run-wasm32-unknown-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-04
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- uses: jetli/[email protected]
with:
version: "latest"
- run: cd crates/prover && wasm-pack test --node
env:
RUSTFLAGS: -C target-feature=+simd128
run-neon-tests:
runs-on: macos-latest-xlarge
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-04
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly-2024-01-04 test
env:
RUSTFLAGS: -C target-feature=+neon
run-avx-tests:
strategy:
matrix:
target-feature: [avx512f, avx2]
runs-on: avx
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-04
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly-2024-01-04 test
env:
RUSTFLAGS: -C target-cpu=native -C target-feature=+${{ matrix.target-feature }}
run-avx512-bench:
runs-on: avx
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-04
- name: Run benchmark
run: ./scripts/bench.sh -- --output-format bencher | tee output.txt
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "cargo"
output-file-path: output.txt
external-data-json-path: ./cache/benchmark-data.json
fail-on-alert: true
summary-always: true
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true
alert-comment-cc-users: "@shaharsamocha7"
run-avx512-bench-parallel:
runs-on: avx
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-04
- name: Run benchmark
run: ./scripts/bench.sh --features="parallel" -- --output-format bencher | tee output.txt
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "cargo"
output-file-path: output.txt
external-data-json-path: ./cache/benchmark-data.json
fail-on-alert: true
summary-always: true
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true
alert-comment-cc-users: "@shaharsamocha7"
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-04
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly-2024-01-04 test
run-slow-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-04
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly-2024-01-04 test --release --features="slow-tests"
run-tests-parallel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-04
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly-2024-01-04 test --features="parallel"
machete:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Machete (detect unused dependencies)
uses: bnjbvr/cargo-machete@main
all-tests:
runs-on: ubuntu-latest
needs:
- clippy
- format
- run-tests
- run-avx-tests
- run-neon-tests
- run-wasm32-wasi-tests
- run-slow-tests
- run-tests-parallel
- machete
steps:
- name: Decide whether all the needed jobs succeeded or failed
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}