Skip to content

Commit

Permalink
chore(ci): optimize e2e build (#6202)
Browse files Browse the repository at this point in the history
We were wasting minutes saving the images redundantly
  • Loading branch information
ludamad authored May 6, 2024
1 parent 00156b5 commit 4614059
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ jobs:
- name: Test
working-directory: ./yarn-project/end-to-end/
timeout-minutes: 25
run: earthly-ci -P --secret AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} --secret AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} --no-output +${{ matrix.test }}
run: earthly-ci -P \
--secret AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \
--secret AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \
--no-output \
+${{ matrix.test }} --skip_build=true

# bench-summary:
# needs: e2e
Expand Down Expand Up @@ -108,7 +112,7 @@ jobs:
# barretenberg (prover) native and AVM (public VM) tests
# only ran on x86 for resource reasons (memory intensive)
bb-native-tests:
needs: setup
needs: build
runs-on: ${{ inputs.username || github.actor }}-x86
steps:
- {
Expand Down Expand Up @@ -326,7 +330,7 @@ jobs:

# push benchmarking binaries to dockerhub registry
bb-bench-binaries:
needs: setup
needs: build
runs-on: ${{ inputs.username || github.actor }}-x86
steps:
- {
Expand Down
13 changes: 8 additions & 5 deletions yarn-project/end-to-end/Earthfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
VERSION 0.8
ARG --global skip_build=false

E2E_COMPOSE_TEST:
FUNCTION
ARG test
ARG compose_file=./scripts/docker-compose.yml
ARG debug="aztec:*"
ARG EARTHLY_TARGET_NAME
ARG prover_agents=10
LOCALLY
ENV TEST=$test
ENV DEBUG=$debug
ENV PROVER_AGENTS=$prover_agents
LET project_name=$(echo $test | sed 's/\./_/g')
IF docker compose > /dev/null 2>&1
LET CMD="docker compose"
ELSE
LET CMD="docker-compose"
END
WAIT
BUILD ../+export-e2e-test-images
# In CI, we do an optimization to push these images to docker once
# We still want the default code path to work with no faff locally
# To not rebuild unnecessarily, we pass --skip_build=true in CI
IF [ $skip_build != "true" ]
WAIT
BUILD ../+export-e2e-test-images
END
END
# Let docker compose know about the pushed tags above
ENV AZTEC_DOCKER_TAG=$(git rev-parse HEAD)
Expand Down

0 comments on commit 4614059

Please sign in to comment.