Skip to content

Commit

Permalink
ci: Add back compile step
Browse files Browse the repository at this point in the history
Once zkey is integrated can remove this again
  • Loading branch information
oskarth committed Oct 28, 2023
1 parent a9fac38 commit 74182e1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Install circom
run: |
git clone https://github.com/iden3/circom.git
cd circom
cargo build --release
cargo install --path circom
- name: Prepare CI
run: ./scripts/prepare_ci.sh
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ To update bindings, run `./script/update_bindings.sh simulator|device debug|rele

## Acknowledgements

This work is sponsored by a joint grant from [PSE](https://pse.dev/) and [0xPARC](https://0xparc.org/).
This work is sponsored by a joint grant from [PSE](https://pse.dev/) and [0xPARC](https://0xparc.org/).
30 changes: 16 additions & 14 deletions scripts/prepare_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,31 +75,33 @@ download_files() {
local circuit=$2
local target_dir="${CIRCOM_DIR}/${dir}/target"
local js_target_dir="${target_dir}/${circuit}_js"

# Create directories if they don't exist
mkdir -p "$target_dir" "$js_target_dir"

# Download files to the specified directories
wget -P "$target_dir" "https://zkstuff.ams3.cdn.digitaloceanspaces.com/mopro/circom-examples-artifacts/${dir}/${circuit}_final.zkey"
wget -P "$js_target_dir" "https://zkstuff.ams3.cdn.digitaloceanspaces.com/mopro/circom-examples-artifacts/${dir}/${circuit}.wasm"
}

# TODO: Comment out compile_circuit stuff again once zkey is integrated and we don't need r1cs file anymore

# NOTE: On CI instead of compiling circuits and running trusted setup
# We just download test artifacts and use these
# We thus skip all of the below steps that are run locally in `prepare.sh`
print_action "[core/circom] Downloading artifacts for example circuits..."

# # Build Circom circuits in mopro-core and run trusted setup
# print_action "[core/circom] Compiling example circuits..."
# cd $CIRCOM_DIR
#
# # Compile multiplier2
# compile_circuit multiplier2 multiplier2.circom
#
# # Setup and compile keccak256
# npm_install keccak256
# compile_circuit keccak256 keccak256_256_test.circom
#
# Build Circom circuits in mopro-core and run trusted setup
print_action "[core/circom] Compiling example circuits..."
cd $CIRCOM_DIR

# Compile multiplier2
compile_circuit multiplier2 multiplier2.circom

# Setup and compile keccak256
npm_install keccak256
compile_circuit keccak256 keccak256_256_test.circom

# # Run trusted setup for multiplier2
# print_action "[core/circom] Running trusted setup for multiplier2..."
# ./scripts/trusted_setup.sh multiplier2 08 multiplier2
Expand Down Expand Up @@ -135,4 +137,4 @@ else
echo "uniffi-bindgen already installed, skipping."
fi

print_action "Done! Please run ./scripts/buld_ios.sh to build for iOS."
print_action "Done! Please run ./scripts/buld_ios.sh to build for iOS."

0 comments on commit 74182e1

Please sign in to comment.