Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ci action #42

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: CI Checks
on:
push:
branches: [main, develop]
pull_request:
pull_request:
branches: [main, develop]
jobs:
cargo-test:
name: cargo test
Expand Down Expand Up @@ -84,3 +85,49 @@ jobs:
run: cargo install cargo-audit
- name: cargo audit
run: cargo audit
fibonacci-square:
name: Test fibonacci square
runs-on: ubuntu-latest
steps:
- name: Modify git config
run: |
git config --global url.https://github.com/.insteadOf git://github.com/
- name: Install pil2-components
run: |
bash -c 'cd .. && git clone https://github.com/0xPolygonHermez/pil2-components.git pil2-components && cd pil2-components && git checkout fix/dependencies_proofman && npm install && cd ..'
- name: Install pil2-compiler
run: |
bash -c 'git clone https://github.com/0xPolygonHermez/pil2-compiler.git pil2-compiler && cd pil2-compiler && npm install && cd ..'
- name: Install pil2-proofman-js
run: |
bash -c 'git clone https://github.com/0xPolygonHermez/pil2-proofman-js.git pil2-proofman-js && cd pil2-proofman-js && git checkout feature/setup && npm install && cd ..'
- name: Install zkevm-prover
run: |
bash -c 'git clone https://github.com/0xPolygonHermez/zkevm-prover.git zkevm-prover && cd zkevm-prover && git checkout develop_rust_lib && git submodule init && git submodule update && make clean && make starks_lib -j && make -j bctree && cd ..'
- name: Compile PIL
run: |
bash -c 'cd pil2-proofman && node ../pil2-compiler/src/pil.js ../pil2-components/test/fibonacci/pil/build.pil -I ../pil2-components/lib/std/pil -o ./examples/fibonacci-square/pil/build.pilout'
- name: Generate setup
run: |
bash -c 'node ../pil2-proofman-js/src/main_setup.js -a ./examples/fibonacci-square/pil/build.pilout -b ./examples/fibonacci-square/build'
- name: Generate PIL Helpers
run: |
cargo run --bin proofman-cli pil-helpers --pilout ./examples/fibonacci-square/pil/build.pilout --path ./examples/fibonacci-square/src -o

- name: Modify Cargo.toml
run: |
sed -i 's/# examples\/fibonacci-square/examples\/fibonacci-square/g' ./Cargo.toml
- name: Modify stark-prover-lib
run: |
sed -i 's/default = \["no_lib_link"\]/default = \[\]/g' ./provers/starks-lib-c/Cargo.toml
- name: Cargo build
run: cargo build
- name: Verify constraints
run: |
cargo run --bin proofman-cli verify-constraints --witness-lib ./target/debug/libfibonacci_square.so --proving-key examples/fibonacci-square/build/provingKey/ --public-inputs examples/fibonacci-square/src/inputs.json
- name: Generate proof
run: |
cargo run --bin proofman-cli prove --witness-lib ./target/debug/libfibonacci_square.so --proving-key examples/fibonacci-square/build/provingKey/ --public-inputs examples/fibonacci-square/src/inputs.json --output-dir examples/fibonacci-square/build/proofs
- name: Verify proof
run: |
node ../pil2-proofman-js/src/main_verify -k examples/fibonacci-square/build -p examples/fibonacci-square/build/proofs
Loading