forked from powdr-labs/powdr
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathconfig.yml
192 lines (155 loc) · 5.63 KB
/
config.yml
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
version: 2.1
executors:
executor:
machine:
image: ubuntu-2004:current
resource_class: large
jobs:
build:
executor: executor
steps:
- checkout
- run:
name: Install dependencies
command: sudo apt update -qqy && sudo apt install libclang-dev git nodejs -qqy
- run:
name: Install Rustup
command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run:
name: Install Rust
command: |
rustup toolchain install 1.72-x86_64-unknown-linux-gnu
rustup component add clippy --toolchain 1.72-x86_64-unknown-linux-gnu
rustup component add rustfmt --toolchain 1.72-x86_64-unknown-linux-gnu
- run:
name: Install pilcom
command: git clone https://github.com/0xPolygonHermez/pilcom.git
- restore_cache:
name: Restore pilcom modules cache
keys:
- v5-pilcom-node-modules-{{ checksum "pilcom/package-lock.json" }}
- run:
name: Install pilcom node modules if cache miss
command: |
if [ ! -d "pilcom/node_modules" ]; then
(cd pilcom && npm install)
fi
- save_cache:
name: Save pilcom modules cache
key: v5-pilcom-node-modules-{{ checksum "pilcom/package-lock.json" }}
paths:
- pilcom/node_modules
- restore_cache:
name: Restore Rust cache
keys:
- v5-cargo-pr-tests-{{ .Branch }}
- run:
name: Check without Halo2
command: cargo check --all --no-default-features --profile pr-tests
- run:
name: Build
command: cargo build --bins --tests --benches --all --all-features --profile pr-tests
- save_cache:
name: Save Rust cache
key: v5-cargo-pr-tests-{{ .Branch }}
paths:
- ~/.cargo/registry
- ~/.cargo/git
- target
- persist_to_workspace:
root: .
paths:
- target/pr-tests
- pilcom
test:
executor: executor
parallelism: 4
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Install dependencies
command: sudo apt update -qqy && sudo apt install libclang-dev git nodejs -qqy
- run:
name: Install Rustup
command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run:
name: Install Rust
command: |
rustup toolchain install 1.72-x86_64-unknown-linux-gnu
rustup toolchain install nightly-2023-01-03-x86_64-unknown-linux-gnu
rustup target add riscv32imac-unknown-none-elf --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu
- run:
name: Determine which tests to run
command: |
cargo test --all --all-features --profile pr-tests -- --list 2> /dev/null | grep ': test' | sed -e 's/: test//' | \
circleci tests split --split-by=timings | tee tests_to_run.txt
- run:
name: Run default tests
command: |
PILCOM=$(pwd)/pilcom/ cargo test --no-fail-fast --all --all-features --profile pr-tests --verbose -- --exact $(cat tests_to_run.txt)
- run:
name: Check benches compile without running them
command: cargo bench --all --all-features --profile pr-tests --no-run
slow_test:
executor: executor
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Install dependencies
command: sudo apt update -qqy && sudo apt install libclang-dev git nodejs -qqy
- run:
name: Install Rustup
command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run:
name: Install Rust
command: |
rustup toolchain install 1.72-x86_64-unknown-linux-gnu
rustup toolchain install nightly-2023-01-03-x86_64-unknown-linux-gnu
rustup target add riscv32imac-unknown-none-elf --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu
- run:
name: Run slow tests
command: PILCOM=$(pwd)/pilcom/ cargo test --all --all-features --profile pr-tests --verbose -- --ignored --nocapture --test-threads=2 --exact test_keccak test_vec_median instruction_tests::addi
lint:
executor: executor
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Install dependencies
command: sudo apt update -qqy && sudo apt install libclang-dev git nodejs -qqy
- run:
name: Install Rustup
command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run:
name: Install Rust
command: |
rustup toolchain install 1.72-x86_64-unknown-linux-gnu
rustup component add clippy --toolchain 1.72-x86_64-unknown-linux-gnu
rustup component add rustfmt --toolchain 1.72-x86_64-unknown-linux-gnu
- run:
name: Lint
command: cargo clippy --all --all-features -- -D warnings
- run:
name: Format
command: cargo fmt --all --check --verbose
workflows:
version: 2
build-and-test:
jobs:
- build
- lint:
requires:
- build
- test:
requires:
- build
- slow_test:
requires:
- build