Skip to content

Commit

Permalink
chore: Migrate acir tests to earthly (#6142)
Browse files Browse the repository at this point in the history
This PR migrate the acir-tests from CCI to Earthly and GA. 4 jobs have
been migrated, the acir tests runs using bb, bb.js and the solidity
verifier and finally the bb.js tests.
  • Loading branch information
PhilWindle authored May 3, 2024
1 parent abe8875 commit 18c8ea8
Show file tree
Hide file tree
Showing 8 changed files with 324 additions and 149 deletions.
90 changes: 0 additions & 90 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,6 @@ jobs:
command: build bb.js
aztec_manifest_key: bb.js

bb-js-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build and test"
command: cond_spot_run_test bb.js 32 ./scripts/run_tests
aztec_manifest_key: bb.js

# Noir
noir-x86_64:
docker:
Expand Down Expand Up @@ -278,18 +266,6 @@ jobs:
command: cond_spot_run_build noir-packages-tests 32
aztec_manifest_key: noir-packages-tests

noir-compile-acir-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir-compile-acir-tests 32
aztec_manifest_key: noir-compile-acir-tests

avm-transpiler:
docker:
- image: aztecprotocol/alpine-build-image
Expand All @@ -302,42 +278,6 @@ jobs:
command: cond_spot_run_build avm-transpiler 32
aztec_manifest_key: avm-transpiler

barretenberg-acir-tests-bb:
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 32
aztec_manifest_key: barretenberg-acir-tests-bb

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
aztec_manifest_key: barretenberg-acir-tests-bb-sol

bb-js-acir-tests:
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.js 32
aztec_manifest_key: barretenberg-acir-tests-bb.js

l1-contracts:
machine:
image: default
Expand Down Expand Up @@ -532,12 +472,6 @@ defaults: &defaults
event: fail
branch_pattern: "master"

bb_acir_tests: &bb_acir_tests
requires:
- barretenberg-x86_64-linux-clang-assert
- noir-compile-acir-tests
<<: *defaults

defaults_yarn_project_pre_join: &defaults_yarn_project_pre_join
requires:
- yarn-project-pre-join
Expand Down Expand Up @@ -593,10 +527,6 @@ workflows:
- noir-ecr-manifest
- noir-packages
<<: *defaults
- noir-compile-acir-tests:
requires:
- noir-ecr-manifest
<<: *defaults

# Transpiler
- avm-transpiler: *defaults
Expand All @@ -607,28 +537,11 @@ workflows:
- barretenberg-x86_64-linux-clang-assert: *defaults
- barretenberg-x86_64-linux-clang-fuzzing: *defaults
- barretenberg-wasm-linux-clang: *defaults
- barretenberg-x86_64-linux-clang-sol: *defaults
- barretenberg-acir-tests-bb: *bb_acir_tests
- barretenberg-acir-tests-bb-sol:
requires:
- barretenberg-x86_64-linux-clang-assert
- barretenberg-x86_64-linux-clang-sol
- noir-compile-acir-tests
<<: *bb_acir_tests
- barretenberg-docs: *defaults
- bb-js:
requires:
- barretenberg-wasm-linux-clang
<<: *defaults
- bb-js-tests:
requires:
- bb-js
<<: *defaults
- bb-js-acir-tests:
requires:
- bb-js
- noir-compile-acir-tests
<<: *defaults

- l1-contracts: *defaults

Expand Down Expand Up @@ -674,9 +587,6 @@ workflows:
- barretenberg-x86_64-linux-clang-assert
- barretenberg-x86_64-linux-clang-fuzzing
- barretenberg-wasm-linux-clang
- barretenberg-x86_64-linux-clang-sol
- barretenberg-acir-tests-bb
- barretenberg-acir-tests-bb-sol
- barretenberg-docs
- noir-packages-tests
- e2e-join
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,23 @@ jobs:
# limit our parallelism to half our cores
run: earthly-ci --no-output +test --hardware_concurrency=64

bb-js-test:
needs: setup
runs-on: ${{ github.actor }}-x86
steps:
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
concurrency_key: bb-js-test-${{ github.actor }}-x86
- name: "bb.js Tests"
working-directory: ./barretenberg/ts/
timeout-minutes: 25
run: earthly-ci --no-output ./+test

noir-projects:
needs: setup
runs-on: ${{ inputs.username || github.actor }}-x86
Expand Down Expand Up @@ -194,6 +211,73 @@ jobs:
timeout-minutes: 25
run: earthly-ci --no-output ./yarn-project/+prover-client-test

build-acir-tests:
needs: build
runs-on: ${{ github.actor }}-x86
steps:
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
concurrency_key: build-acir-tests-${{ github.actor }}-x86
- name: "Build Acir Tests"
timeout-minutes: 25
run: earthly-ci --no-output ./noir/+build-acir-tests

barretenberg-acir-tests-bb:
needs: build-acir-tests
runs-on: ${{ github.actor }}-x86
steps:
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
concurrency_key: barretenberg-acir-tests-bb-${{ github.actor }}-x86
- name: "BB Native Acir Tests"
working-directory: ./noir/
timeout-minutes: 25
run: earthly-ci --no-output ./+barretenberg-acir-tests-bb

barretenberg-acir-tests-sol:
needs: build-acir-tests
runs-on: ${{ github.actor }}-x86
steps:
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
concurrency_key: barretenberg-acir-tests-sol-${{ github.actor }}-x86
- name: "BB Solidity Acir Tests"
working-directory: ./noir/
timeout-minutes: 25
run: earthly-ci --no-output ./+barretenberg-acir-tests-sol

barretenberg-acir-tests-bb-js:
needs: build-acir-tests
runs-on: ${{ github.actor }}-x86
steps:
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
concurrency_key: barretenberg-acir-tests-bb-js-${{ github.actor }}-x86
- name: "BB JS Acir Tests"
working-directory: ./noir/
timeout-minutes: 25
run: earthly-ci --no-output ./+barretenberg-acir-tests-bb.js

docs-preview:
needs: setup
runs-on: ${{ inputs.username || github.actor }}-x86
Expand Down
14 changes: 14 additions & 0 deletions barretenberg/Earthfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
VERSION 0.8

acir-tests:
FROM ../build-images+build
WORKDIR /usr/src/barretenberg
COPY ./acir_tests .
SAVE ARTIFACT ./*

sol:
FROM ../build-images+build
WORKDIR /usr/src/barretenberg
COPY ./sol .
SAVE ARTIFACT ./*

Loading

0 comments on commit 18c8ea8

Please sign in to comment.