From acd8d7c85c56b31ec65e908414da05fead907ab7 Mon Sep 17 00:00:00 2001 From: Aleksandr Cherenkov Date: Fri, 16 Feb 2024 16:39:19 +0000 Subject: [PATCH] update readme and use run.sh in the CI --- .github/workflows/main.yml | 9 ++++++++- README.md | 7 +++++++ scripts/run.sh | 8 +++----- 3 files changed, 18 insertions(+), 6 deletions(-) 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..9675ae7 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 to 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