From a868aa4fc4f393955ebb9cad2db71de1fdb36e51 Mon Sep 17 00:00:00 2001 From: dm Date: Mon, 19 Aug 2024 01:08:14 +0300 Subject: [PATCH] Split build and test --- .github/workflows/release.yml | 13 ++++++++++--- build_and_test.sh => build.sh | 3 --- test.sh | 17 +++++++++++++++++ 3 files changed, 27 insertions(+), 6 deletions(-) rename build_and_test.sh => build.sh (96%) create mode 100644 test.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5390c7c..f03fc68d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,7 @@ jobs: build: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-22.04, macos-14] arch: [x64, arm64] @@ -26,10 +27,16 @@ jobs: echo "TARGET_ARCH=arm64" >> $GITHUB_ENV fi - - name: Build and Test + - name: Build run: | - chmod +x ./build_and_test.sh - ./build_and_test.sh + chmod +x ./build.sh + ./build.sh + + - name: Test + run: | + chmod +x ./test.sh + ./test.sh + - name: Set output id: vars diff --git a/build_and_test.sh b/build.sh similarity index 96% rename from build_and_test.sh rename to build.sh index eff7ce47..76521419 100644 --- a/build_and_test.sh +++ b/build.sh @@ -5,9 +5,6 @@ set -e os=$(uname | tr '[:upper:]' '[:lower:]') arch=$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) -# Print the current directory -echo "Current directory: $(pwd)" - if [ "$os" == "linux" ]; then export DEBIAN_FRONTEND=noninteractive diff --git a/test.sh b/test.sh new file mode 100644 index 00000000..1a2969a4 --- /dev/null +++ b/test.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Exit immediately if a command exits with a non-zero status +set -e + +# Navigate to the test_files directory, assuming it's in the root of the repository +cd test_files || exit + +# Run the end-to-end tests +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."