From 6f2515a55551929dac20d2fec0be7d726dbc8999 Mon Sep 17 00:00:00 2001 From: dm Date: Sun, 18 Aug 2024 22:25:37 +0300 Subject: [PATCH] Fix path for builds --- .github/workflows/linux-release.yml | 4 ++-- build_and_test.sh | 10 ++++----- build_mac.sh | 35 +++++------------------------ 3 files changed, 12 insertions(+), 37 deletions(-) diff --git a/.github/workflows/linux-release.yml b/.github/workflows/linux-release.yml index 8666a94c..c019e2a7 100644 --- a/.github/workflows/linux-release.yml +++ b/.github/workflows/linux-release.yml @@ -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 diff --git a/build_and_test.sh b/build_and_test.sh index 8729337f..cd4af313 100644 --- a/build_and_test.sh +++ b/build_and_test.sh @@ -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 @@ -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 diff --git a/build_mac.sh b/build_mac.sh index 8729337f..1f5c2139 100644 --- a/build_mac.sh +++ b/build_mac.sh @@ -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."