diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a6b129d..50827cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,6 +49,8 @@ jobs: run: | assigner --version clang-zkllvm --version + proof-generator-multi-threaded --version + proof-generator-single-threaded --version - name: Clone zkllvm repository run: git clone https://github.com/NilFoundation/zkLLVM.git @@ -67,9 +69,14 @@ jobs: - name: Generate main.cpp proof run: proof-generator-single-threaded --circuit="template.crct" --assignment-table="template.tbl" --proof="proof.bin" - - name: Generate main.cpp proof + - name: Generate main.cpp proof single-threaded + run: proof-generator-single-threaded --circuit="template.crct" --assignment-table="template.tbl" --proof="proof.bin" + + - name: Generate main.cpp proof multi-threaded run: proof-generator-single-threaded --circuit="template.crct" --assignment-table="template.tbl" --proof="proof.bin" + - name: Run run.sh + run: bash scripts/run.sh - name: Compile arithmetics example run: make -C ${ZKLLVM_BUILD:-build} arithmetics_cpp_example diff --git a/README.md b/README.md index 137e14d..9f4e68f 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,13 @@ proof-generator-multi-threaded --version proof-generator-single-threaded --version ``` +## Steps 1-3: Let script perform steps 1-3 + +```bash +bash scripts/run.sh +``` +or run them manually: + ## Step 1: Configure the project and compile the circuit In `./src/main.cpp`, we have a function starting with `[[circuit]]`. diff --git a/scripts/run.sh b/scripts/run.sh index 69b4af9..1573585 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -91,11 +91,9 @@ compile() { sh -c "bash ./scripts/run.sh compile" cd - else - rm -rf "$REPO_ROOT/build" - mkdir -p "$REPO_ROOT/build" - cd "$REPO_ROOT/build" - cmake -DCIRCUIT_ASSEMBLY_OUTPUT=TRUE .. - VERBOSE=1 make template + cd "$REPO_ROOT" + cmake cmake -G "Unix Makefiles" -B ${ZKLLVM_BUILD:-build} -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang-zkllvm . + VERBOSE=1 make -C ${ZKLLVM_BUILD:-build} template cd - check_file_exists "$REPO_ROOT/build/src/template.ll" fi