Skip to content

Commit

Permalink
Fix path for builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dmirgaleev committed Aug 18, 2024
1 parent f668d65 commit 6f2515a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linux-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
- name: Rename binaries
run: |
echo "Renaming binaries to include architecture"
mv /app/build/bazelbin/src/starkware/main/cpu/cpu_air_prover ./cpu_air_prover-linux-${TARGET_ARCH}
mv /app/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier ./cpu_air_verifier-linux-${TARGET_ARCH}
mv /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_prover ./cpu_air_prover-linux-${TARGET_ARCH}
mv /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier ./cpu_air_verifier-linux-${TARGET_ARCH}
mv /tmp/stone-prover/stone-prover.deb /tmp/stone-prover/stone-prover-linux-${TARGET_ARCH}.deb
Expand Down
10 changes: 5 additions & 5 deletions build_and_test.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

git clone https://github.com/baking-bad/stone-prover.git /app
git clone https://github.com/baking-bad/stone-prover.git /tmp/stone-prover

cd /app || exit
cd /tmp/stone-prover || exit

./install_deps.sh

Expand All @@ -11,10 +11,10 @@ bazelisk build //...
bazelisk test //...

# Create symbolic links for cpu_air_prover and cpu_air_verifier
ln -s /app/build/bazelbin/src/starkware/main/cpu/cpu_air_prover /bin/cpu_air_prover
ln -s /app/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier /bin/cpu_air_verifier
ln -s /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_prover /bin/cpu_air_prover
ln -s /tmp/stone-prover/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier /bin/cpu_air_verifier

cd /app/e2e_test/CairoZero || exit
cd /tmp/stone-prover/e2e_test/CairoZero || exit

cairo-compile fibonacci.cairo --output fibonacci_compiled.json --proof_mode

Expand Down
35 changes: 5 additions & 30 deletions build_mac.sh
Original file line number Diff line number Diff line change
@@ -1,39 +1,14 @@
#!/bin/bash

git clone https://github.com/baking-bad/stone-prover.git /app
brew install gmp

cd /app || exit
python3 -m pip install cpplint pytest numpy sympy==1.12.1 cairo-lang==0.12.0

./install_deps.sh
git clone https://github.com/baking-bad/stone-prover.git /tmp/stone-prover

cd /tmp/stone-prover || exit

bazelisk build //...

bazelisk test //...

# Create symbolic links for cpu_air_prover and cpu_air_verifier
ln -s /app/build/bazelbin/src/starkware/main/cpu/cpu_air_prover /bin/cpu_air_prover
ln -s /app/build/bazelbin/src/starkware/main/cpu/cpu_air_verifier /bin/cpu_air_verifier

cd /app/e2e_test/CairoZero || exit

cairo-compile fibonacci.cairo --output fibonacci_compiled.json --proof_mode

cairo-run \
--program=fibonacci_compiled.json \
--layout=small \
--program_input=fibonacci_input.json \
--air_public_input=fibonacci_public_input.json \
--air_private_input=fibonacci_private_input.json \
--trace_file=fibonacci_trace.json \
--memory_file=fibonacci_memory.json \
--print_output \
--proof_mode

cpu_air_prover \
--out_file=fibonacci_proof.json \
--private_input_file=fibonacci_private_input.json \
--public_input_file=fibonacci_public_input.json \
--prover_config_file=cpu_air_prover_config.json \
--parameter_file=cpu_air_params.json

cpu_air_verifier --in_file=fibonacci_proof.json && echo "Successfully verified example proof."

0 comments on commit 6f2515a

Please sign in to comment.