-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from zkmopro/feat/isolating-msm-functions
init: isolated all the msm out of mopro-core and make it a crate
- Loading branch information
Showing
413 changed files
with
925 additions
and
50,949 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,124 +17,12 @@ env: | |
jobs: | ||
# TODO: Add a job to run clippy | ||
lint: | ||
runs-on: ubuntu-latest | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check formatting | ||
run: cargo fmt --all -- --check | ||
- name: Check template formating | ||
run: cd templates/mopro-example-app && cargo fmt --all -- --check | ||
|
||
test-cli: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: "1.77" | ||
override: true | ||
- name: Install circom | ||
run: | | ||
sudo wget -O ~/.cargo/bin/circom https://github.com/iden3/circom/releases/download/v2.1.9/circom-${{runner.os}}-amd64 | ||
sudo chmod +x ~/.cargo/bin/circom | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
- name: Install snarkjs | ||
run: npm install -g snarkjs | ||
- name: Install mopro-cli | ||
run: (cd mopro-cli && cargo install --path .) | ||
- name: Prepare CI for Core and FFI | ||
run: ./scripts/prepare_ci.sh | ||
- name: Use mopro-cli | ||
run: | | ||
export MOPRO_ROOT=$(PWD) # Export MOPRO_ROOT path | ||
mopro deps # Install mopro dependencies | ||
mopro init --platforms ios android # Initialize mopro-example-app | ||
cd mopro-example-app | ||
mopro prepare # Prepare your circuit artifacts | ||
mopro build --platforms ios android # Build the project | ||
mopro test # Run end-to-end test (in Rust only) | ||
- name: Test the project for iOS | ||
run: | | ||
cd mopro-example-app/ios/ExampleApp | ||
xcodebuild test -scheme ExampleApp -workspace ExampleApp.xcworkspace -destination "platform=iOS Simulator,OS=17.5,name=iPhone 15 Pro" -quiet | ||
- name: Export bindings | ||
run: | | ||
export MOPRO_ROOT=$(PWD) # Export MOPRO_ROOT path | ||
cd mopro-example-app | ||
mopro export-bindings --platforms ios android --destination out | ||
test-core: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: "1.77" | ||
override: true | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Install circom | ||
run: | | ||
sudo wget -O ~/.cargo/bin/circom https://github.com/iden3/circom/releases/download/v2.1.9/circom-${{runner.os}}-amd64 | ||
sudo chmod +x ~/.cargo/bin/circom | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
- name: Install snarkjs | ||
run: npm install -g snarkjs | ||
- name: Prepare CI for Core and FFI | ||
run: ./scripts/prepare_ci.sh | ||
- name: Run circom tests | ||
run: | | ||
cd mopro-core | ||
cargo test -- --nocapture | ||
- name: Run halo2 tests | ||
run: | | ||
cd mopro-core | ||
cargo test --features=halo2 --no-default-features -- --nocapture | ||
test-ffi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: "1.77" | ||
override: true | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Install circom | ||
run: | | ||
sudo wget -O ~/.cargo/bin/circom https://github.com/iden3/circom/releases/download/v2.1.9/circom-${{runner.os}}-amd64 | ||
sudo chmod +x ~/.cargo/bin/circom | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
- name: Install snarkjs | ||
run: npm install -g snarkjs | ||
- name: Prepare CI for Core and FFI | ||
run: ./scripts/prepare_ci.sh | ||
- name: Run FFI circom tests | ||
# TODO: Fix this custom jar thing | ||
run: | | ||
cd mopro-ffi/ | ||
curl -L https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar -o jna-5.13.0.jar | ||
CLASSPATH=jna-5.13.0.jar cargo test -- --nocapture | ||
- name: Run FFI halo2 tests | ||
run: | | ||
cd mopro-ffi/ | ||
cargo test --features halo2 --no-default-features -- halo2 | ||
|
||
gpu-benchmarks: | ||
runs-on: macos-latest | ||
steps: | ||
|
@@ -146,19 +34,7 @@ jobs: | |
override: true | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Install circom | ||
run: | | ||
sudo wget -O ~/.cargo/bin/circom https://github.com/iden3/circom/releases/download/v2.1.9/circom-${{runner.os}}-amd64 | ||
sudo chmod +x ~/.cargo/bin/circom | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
- name: Install snarkjs | ||
run: npm install -g snarkjs | ||
- name: Prepare CI for Core and FFI | ||
run: ./scripts/prepare_ci.sh | ||
- name: Run GPU Benchmarks tests | ||
run: | | ||
cd mopro-core | ||
cargo test --features=gpu-benchmarks test_msm_correctness -- --nocapture | ||
cd mopro-msm | ||
cargo test test_msm_correctness -- --nocapture |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,12 +18,6 @@ jobs: | |
override: true | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Install circom | ||
run: | | ||
sudo wget -O ~/.cargo/bin/circom https://github.com/iden3/circom/releases/download/v2.1.9/circom-macos-amd64 | ||
sudo chmod +x ~/.cargo/bin/circom | ||
- name: Prepare CI for Core and FFI | ||
run: ./scripts/prepare_ci.sh | ||
- name: Build | ||
run: cargo build | ||
- name: Cache build | ||
|
@@ -32,5 +26,4 @@ jobs: | |
key: ${{ github.sha }}-setup-macos | ||
path: | | ||
~/.cargo | ||
./mopro-core/examples | ||
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
.vscode | ||
.DS_Store | ||
target/ | ||
mopro-example-app | ||
!templates/mopro-example-app | ||
vectors/ | ||
graph.bin |
Oops, something went wrong.