Skip to content

Commit f7ef43f

Browse files
Prototype of CI
1 parent 8688d33 commit f7ef43f

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Sanity checks
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
types:
7+
- opened
8+
- reopened
9+
- synchronize
10+
- ready_for_review
11+
push:
12+
branches:
13+
- main
14+
15+
jobs:
16+
sanity:
17+
name: Sanity check
18+
timeout-minutes: 30
19+
runs-on: ubuntu-24.04
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: dtolnay/rust-toolchain@master
24+
with:
25+
components: rustfmt
26+
# TODO(Matthias): see whether we can keep this in sync with rust-toolchain.toml automatically?
27+
toolchain: nightly-2024-10-03
28+
- name: Cargo cache
29+
uses: actions/cache@v3
30+
with:
31+
# target directorise gotten via
32+
# `find . -name target -type d -not -path '*/src/*' -printf '%P\n' | sort`
33+
# We need to exclude `./circ_blocks/src/target` because it just a source directory with an unfortunate name.
34+
path: |
35+
~/.cargo/bin/
36+
~/.cargo/registry/index/
37+
~/.cargo/registry/cache/
38+
~/.cargo/git/db/
39+
circ_blocks/circ_fields/target
40+
circ_blocks/circ_hc/target
41+
circ_blocks/circ_opt/target
42+
circ_blocks/circ_waksman/target
43+
circ_blocks/target
44+
circ_blocks/third_party/ZoKrates/zokrates_parser/target
45+
circ_blocks/third_party/ZoKrates/zokrates_pest_ast/target
46+
circ_blocks/third_party/ZoKrates/zokrates_stdlib/target
47+
ff/ff_derive/target
48+
ff/target
49+
spartan_parallel/target
50+
zok_tests/poseidon_gen/target
51+
key: sanity-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
52+
53+
- name: Run sanity check
54+
run: |
55+
set -euxo pipefail
56+
57+
for cargo_toml in $(git ls-files '**/Cargo.toml'); do
58+
(
59+
cd "$(dirname ${cargo_toml})"
60+
cargo fmt --check
61+
cargo check --all-targets
62+
cargo test
63+
)
64+
done
65+
66+
./setup.sh
67+
./encode_ceno.sh

0 commit comments

Comments
 (0)