Skip to content

Commit

Permalink
update readme and use run.sh in the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
CblPOK-git committed Feb 19, 2024
1 parent f4fa674 commit d5f639f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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-multi-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
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]]`.
Expand Down
8 changes: 3 additions & 5 deletions scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d5f639f

Please sign in to comment.