Skip to content

chore: explicit type imports #2212

chore: explicit type imports

chore: explicit type imports #2212

Workflow file for this run

name: Earthly CI
on:
push:
branches: [master]
pull_request: {}
workflow_dispatch: {}
jobs:
# there's a lot of x86 tasks - let's split out the build step
build-x86:
runs-on: ubuntu-latest
outputs:
e2e_list: ${{ steps.e2e_list.outputs.list }}
env:
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
# cancel if reran on same PR if exists, otherwise if on same commit
concurrency:
group: build-${{ github.event.pull_request.number || github.ref_name }}-x86
cancel-in-progress: ${{ github.ref_name != 'master' }}
steps:
- uses: earthly/actions-setup@v1
with:
version: v0.8.5
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Setup
working-directory: ./scripts
run: ./setup_env.sh ${{ secrets.DOCKERHUB_PASSWORD }} ${{ github.actor }}
- name: Test
working-directory: ./yarn-project
run: |
# push to registry
earthly-cloud build x86 --push +build-end-to-end
# We base our e2e list used in e2e-x86 off the targets in ./yarn-project/end-to-end
# (Note ARM uses just 2 tests as a smoketest)
- id: e2e_list
working-directory: ./yarn-project/end-to-end
run: |
echo "list=$(earthly ls | grep -v '+base' | sed 's/+//' | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT
# all the end-to-end integration tests for aztec
e2e-arm:
runs-on: ubuntu-latest
env:
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
strategy:
fail-fast: false
matrix:
test:
- e2e-card-game
- e2e-crowdfunding-and-claim
# cancel if reran on same PR if exists, otherwise if on same commit
concurrency:
group: ${{ matrix.test }}-${{ github.event.pull_request.number || github.ref_name }}-arm
cancel-in-progress: ${{ github.ref_name != 'master' }}
steps:
- uses: earthly/actions-setup@v1
with:
version: v0.8.5
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Setup
working-directory: ./scripts
run: ./setup_env.sh ${{ secrets.DOCKERHUB_PASSWORD }} ${{ github.actor }}
- name: Test
working-directory: ./yarn-project/end-to-end/
# We don't do much on arm, just run it on their builder
run:
# Flags:
# - e2e_build=true to get images from a local build, not a dockerhub registry strategy
earthly-cloud build arm --no-output +${{ matrix.test }} --e2e_build=true
# all the end-to-end integration tests for aztec
e2e-x86:
needs: build-x86
runs-on: ubuntu-latest
env:
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
strategy:
fail-fast: false
matrix:
test: ${{ fromJson( needs.build-x86.outputs.e2e_list )}}
# cancel if reran on same PR if exists, otherwise if on same commit
concurrency:
group: ${{ matrix.test }}-${{ github.event.pull_request.number || github.ref_name }}-x86
cancel-in-progress: ${{ github.ref_name != 'master' }}
steps:
- uses: earthly/actions-setup@v1
with:
version: v0.8.5
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Setup
working-directory: ./scripts
run: ./setup_env.sh ${{ secrets.DOCKERHUB_PASSWORD }} ${{ github.actor }}
- name: Pull E2E Images
working-directory: ./barretenberg/cpp/
run: |
docker pull aztecprotocol/aztec-cache:$(git rev-parse HEAD)
docker pull aztecprotocol/end-to-end-cache:$(git rev-parse HEAD)
docker tag aztecprotocol/aztec-cache:$(git rev-parse HEAD) aztecprotocol/aztec:latest
docker tag aztecprotocol/end-to-end-cache:$(git rev-parse HEAD) aztecprotocol/end-to-end:latest
- name: Test
working-directory: ./yarn-project/end-to-end/
run: |
earthly-cloud build x86 --no-output +${{ matrix.test }}
# barretenberg (prover) native tests
bb-native-tests:
runs-on: ubuntu-latest
env:
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
strategy:
fail-fast: false
matrix:
environment: [x86]
# pending fix fot intermittent test
# environment: [x86, arm]
# cancel if reran on same PR if exists, otherwise if on same commit
concurrency:
group: bb-native-tests-${{ github.event.pull_request.number || github.ref_name }}-${{ matrix.environment }}
cancel-in-progress: ${{ github.ref_name != 'master' }}
steps:
- uses: earthly/actions-setup@v1
with:
version: v0.8.5
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Setup
working-directory: ./scripts
run: ./setup_env.sh ${{ secrets.DOCKERHUB_PASSWORD }} ${{ github.actor }}
- name: Test
working-directory: ./barretenberg/cpp/
run: |
earthly-cloud build ${{ matrix.environment }} --no-output +test
# All benchmarks, purposefully ran sequential on a machine
# they should use parallelism within the benchmark, but only one thing should run at a time
# for accurate results
# We don't depend on 'build' as we use a different runner and will build components on the fist step that uses them.
bench:
runs-on: ubuntu-latest
env:
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
# cancel if reran on same PR if exists, otherwise if on same commit
concurrency:
# TODO no longer exclusive.. revisit this
group: ${{ github.actor }}-x86
cancel-in-progress: ${{ github.ref_name != 'master' }}
steps:
- uses: earthly/actions-setup@v1
with:
version: v0.8.5
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Setup
working-directory: ./scripts
run: ./setup_env.sh ${{ secrets.DOCKERHUB_PASSWORD }} ${{ github.actor }}
- name: Client IVC Bench
working-directory: ./barretenberg/cpp/
run: earthly-cloud bench x86 --no-output +bench-client-ivc
- name: Ultrahonk Bench
working-directory: ./barretenberg/cpp/
run: earthly-cloud bench x86 --no-output +bench-ultra-honk