File tree Expand file tree Collapse file tree 3 files changed +128
-0
lines changed
Expand file tree Collapse file tree 3 files changed +128
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Circom Setup"
2+
3+ description : Install Circom
4+
5+ runs :
6+ using : composite
7+ steps :
8+ - name : Setup NodeJS
9+ id : cache-npm
10+ uses : actions/setup-node@v3
11+ with :
12+ node-version : " 16.18.x"
13+ cache : npm
14+
15+ - name : Install NPM Packages
16+ if : ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
17+ shell : bash
18+ run : npm install
19+
20+ - name : Install SnarkJS
21+ if : ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
22+ shell : bash
23+ run : npm install -g snarkjs
24+
25+ - name : Cache Circom
26+ id : cache-circom
27+ uses : actions/cache@v3
28+ with :
29+ path : |
30+ /usr/local/bin/circom
31+ key : ${{ runner.os }}-circom
32+
33+ - name : Install Circom
34+ if : ${{ steps.cache-circom.outputs.cache-hit != 'true' }}
35+ shell : bash
36+ working-directory : /usr/local/bin
37+ run : |
38+ wget "https://github.com/iden3/circom/releases/download/v2.1.7/circom-linux-amd64"
39+ chmod +x "./circom-linux-amd64"
40+ mv ./circom-linux-amd64 ./circom
Original file line number Diff line number Diff line change 1+ name : " Circom Circuits Compiling"
2+
3+ on :
4+ push :
5+ branches : ["main", "develop"]
6+ pull_request :
7+ branches : ["main", "develop"]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v3
14+
15+ - name : Circom Setup
16+ uses : ./.github/actions/circom-setup
17+
18+ - name : Caching Circuits
19+ id : cache-circuits
20+ env :
21+ cache-name : cache-circuits
22+ uses : actions/cache@v3
23+ with :
24+ path : |
25+ ./circuits
26+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./circuits') }}
27+
28+ - name : Circuits Compiling
29+ if : ${{ steps.cache-circuits.outputs.cache-hit != 'true' }}
30+ run : ./scripts/compile-circuit.sh main
Original file line number Diff line number Diff line change 1+ name : " Rust Check, Test, Lint CI"
2+
3+ on :
4+ push :
5+ branches : ["main", "develop"]
6+ pull_request :
7+ branches : ["main", "develop"]
8+
9+ env :
10+ CARGO_TERM_COLOR : always
11+ RUSTDOCFLAGS : -D warnings
12+ RUSTFLAGS : " -Dwarnings"
13+
14+ jobs :
15+ lints :
16+ name : Lints
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Checkout sources
20+ uses : actions/checkout@v2
21+
22+ - name : Cache
23+ uses : Swatinem/rust-cache@v2
24+
25+ - name : Install stable toolchain
26+ uses : dtolnay/rust-toolchain@stable
27+ with :
28+ components : " rustfmt, clippy"
29+ toolchain : 1.72.0
30+
31+ - name : Run cargo check
32+ run : cargo check
33+
34+ - name : Run cargo check on release version
35+ run : cargo check --release
36+
37+ - name : Run cargo fmt
38+ run : cargo fmt --all -- --check
39+
40+ - name : Run Clippy
41+ run : cargo clippy --all-targets
42+
43+ doctests :
44+ needs : [lints]
45+ name : Check Documentation
46+ runs-on : ubuntu-latest
47+ steps :
48+ - name : Checkout sources
49+ uses : actions/checkout@v2
50+
51+ - name : Cache
52+ uses : Swatinem/rust-cache@v2
53+
54+ - name : Install stable toolchain
55+ uses : dtolnay/rust-toolchain@stable
56+
57+ - name : Run cargo doc
58+ run : cargo doc --no-deps
You can’t perform that action at this time.
0 commit comments