Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): switch to pulling ACIR from artifacts #3043

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ version: 2.1

orbs:
slack: circleci/slack@4.12.1
gh: circleci/github-cli@2.0

parameters:
workflow:
Expand Down Expand Up @@ -246,6 +247,8 @@ jobs:
steps:
- *checkout
- *setup_env
- gh/setup:
token: $AZTEC_BOT_COMMENTER_GITHUB_TOKEN
- run:
name: "Build and test"
command: cond_spot_run_build barretenberg-acir-tests-bb 32
Expand Down Expand Up @@ -279,6 +282,8 @@ jobs:
steps:
- *checkout
- *setup_env
- gh/setup:
token: $AZTEC_BOT_COMMENTER_GITHUB_TOKEN
- run:
name: "Build and test"
command: cond_spot_run_build barretenberg-acir-tests-bb.js 32
Expand Down
28 changes: 18 additions & 10 deletions barretenberg/acir_tests/run_acir_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ set -eu
BIN=${BIN:-../cpp/build/bin/bb}
FLOW=${FLOW:-prove_and_verify}
CRS_PATH=~/.bb-crs
BRANCH=master
NOIR_REPO="https://github.com/noir-lang/noir.git"
BRANCH=tf/acir-artifact
VERBOSE=${VERBOSE:-}
TEST_NAMES=("$@")

Expand All @@ -26,15 +27,22 @@ if [ ! -d acir_tests ]; then
if [ -n "${TEST_SRC:-}" ]; then
cp -R $TEST_SRC acir_tests
else
rm -rf noir
git clone -b $BRANCH --filter=blob:none --no-checkout https://github.com/noir-lang/noir.git
cd noir
git sparse-checkout init --cone
git sparse-checkout set tooling/nargo_cli/tests/acir_artifacts
git checkout
cd ..
mv noir/tooling/nargo_cli/tests/acir_artifacts acir_tests
rm -rf noir
# Search for successful workflow runs on the specified branch
WORKFLOW_RUNS=$(gh run list -b $BRANCH -w "Rebuild ACIR artifacts" --repo $NOIR_REPO --json databaseId --json conclusion)
WORKFLOW_RUNS=$(echo $WORKFLOW_RUNS | jq 'map(select(.conclusion == "success")) | map(.databaseId)' | jq @sh | xargs echo)

# Iterate through workflow runs until we find one with ACIR artifacts
set +eu
for WORKFLOW_RUN in $WORKFLOW_RUNS; do

echo "Checking workflow run $WORKFLOW_RUN"
gh run download $WORKFLOW_RUN --dir acir_tests --repo $NOIR_REPO -n acir-artifacts
if [[ $? -eq "0" ]]; then
break;
fi
done
set -eu

fi
fi

Expand Down