Skip to content

Commit

Permalink
fix: add ci tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Nov 4, 2023
1 parent 66aa9c1 commit ea049a0
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,17 @@ jobs:
name: "Build and test"
command: cond_spot_run_build barretenberg-acir-tests-bb 32

barretenberg-acir-tests-bb-sol:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: cond_spot_run_build barretenberg-acir-tests-bb-sol 32

bb-js:
machine:
image: ubuntu-2204:2023.07.2
Expand Down Expand Up @@ -1166,6 +1177,10 @@ workflows:
requires:
- barretenberg-x86_64-linux-clang-assert
<<: *defaults
- barretenberg-acir-tests-bb-sol:
requires:
- barretenberg-x86_64-linux-clang-assert
<<: *defaults
- bb-js:
requires:
- barretenberg-wasm-linux-clang
Expand Down
10 changes: 10 additions & 0 deletions barretenberg/acir_tests/Dockerfile.bb.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clang-assert

FROM node:18-alpine
RUN apk update && apk add git bash curl jq
COPY --from=0 /usr/src/barretenberg/cpp/build /usr/src/barretenberg/cpp/build
WORKDIR /usr/src/barretenberg/acir_tests
COPY . .
# Run every acir test through a solidity verifier".
RUN (cd sol-test && yarn)
RUN FLOW=sol ./run_acir_tests.sh
13 changes: 12 additions & 1 deletion barretenberg/acir_tests/run_acir_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
# VERBOSE: to enable logging for each test.
set -eu

# Catch when running in parallel
error_file="/tmp/error.$$"
pids=()
source ./bash_helpers/catch.sh
trap handle_sigchild SIGCHLD

BIN=${BIN:-../cpp/build/bin/bb}
FLOW=${FLOW:-prove_and_verify}
CRS_PATH=~/.bb-crs
Expand Down Expand Up @@ -84,6 +90,11 @@ else
continue
fi

test $TEST_NAME
test $TEST_NAME &
done
fi

wait

# Check for parallel errors
check_error_file
6 changes: 6 additions & 0 deletions build_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ barretenberg-acir-tests-bb:
dependencies:
- barretenberg-x86_64-linux-clang-assert

barretenberg-acir-tests-bb-sol:
buildDir: barretenberg/acir_tests
dockerfile: Dockerfile.bb.sol
dependencies:
- barretenberg-x86_64-linux-clang-assert

barretenberg-acir-tests-bb.js:
buildDir: barretenberg/acir_tests
dockerfile: Dockerfile.bb.js
Expand Down

0 comments on commit ea049a0

Please sign in to comment.