Skip to content

chore: Skip foundry install if possible #1218

chore: Skip foundry install if possible

chore: Skip foundry install if possible #1218

Workflow file for this run

name: Earthly CI
on:
push:
branches: [master]
pull_request: {}
workflow_dispatch: {}
jobs:
e2e:
runs-on: ubuntu-latest
env:
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
# TODO currently names are coupled to platform
strategy: { matrix: { environment: [x86, arm], test: [e2e-escrow-contract, e2e-account-contracts] } }
# cancel if reran on same PR if exists, otherwise if on same commit
concurrency:
group: ${{ matrix.test }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.environment }}
cancel-in-progress: true
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 ${{ matrix.environment }} ${{ secrets.DOCKERHUB_PASSWORD }} ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
- name: Test
working-directory: ./yarn-project/end-to-end
if: github.actor == 'ludamad' || github.actor == 'charlielye' || github.actor == 'sklppy88' || github.actor == 'alexghr'
run: |
# TODO put in script
if [ "${{ matrix.environment }}" == "arm" ]; then
PLATFORM=linux/arm64
elif [ "${{ matrix.environment }}" == "x86" ]; then
PLATFORM=linux/amd64
fi
earthly sat --org aztec launch --size 4xlarge --platform $PLATFORM build-${{github.actor}}-${{ matrix.environment }} || true
if [ ${{ github.ref_name }} = master ] ; then
# update the remote cache
export EARTHLY_PUSH=true
fi
# TODO need to use more SAVE IMAGE --cache-hint and explicit BUILD statements for remote-cache to work well but then it should read artifacts from master done by all runners
earthly -P --no-output --org aztec --remote-cache=aztecprotocol/cache:${{matrix.test}} --sat build-${{github.actor}}-${{ matrix.environment }} +${{ matrix.test }}
bb-native-tests:
runs-on: ubuntu-latest
env:
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }}
# run for both x86_64 and arm64
# TODO currently names are coupled to platform
strategy: { matrix: { environment: [x86, arm] } }
# cancel if reran on same PR if exists, otherwise if on same commit
concurrency:
group: bb-native-tests-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ matrix.environment }}
cancel-in-progress: true
steps:
- 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 ${{ matrix.environment }} ${{ secrets.DOCKERHUB_PASSWORD }} ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
- name: Build and test
working-directory: ./barretenberg/cpp
if: github.actor == 'ludamad' || github.actor == 'charlielye' || github.actor == 'sklppy88' || github.actor == 'alexghr'
run: |
# TODO put in script
if [ "${{ matrix.environment }}" == "arm" ]; then
PLATFORM=linux/arm64
elif [ "${{ matrix.environment }}" == "x86" ]; then
PLATFORM=linux/amd64
fi
earthly sat --org aztec launch --size 4xlarge --platform $PLATFORM build-${{github.actor}}-${{ matrix.environment }} || true
if [ ${{ github.ref_name }} = master ] ; then
# update the remote cache
export EARTHLY_PUSH=true
fi
# TODO need to use more SAVE IMAGE --cache-hint and explicit BUILD statements for remote-cache to work well but then it should read artifacts from master done by all runners
earthly -P --no-output --org aztec --remote-cache=aztecprotocol/cache:bb-native-tests --sat build-${{github.actor}}-${{ matrix.environment }} +test