-
Notifications
You must be signed in to change notification settings - Fork 310
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): recover from earthly bug with --no-cache, build images from registry #7462
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
355eae8
try verify client ivc
ludamad a4655b4
it should just work now?
ludamad b54e7fa
recovery
ludamad 6a694aa
fix secret passing
ludamad b933406
fix substitution
ludamad 0a58bf4
small opt
ludamad cde25c0
Revert "try verify client ivc"
ludamad ee38a5d
env var passing
ludamad da8b8d2
fix ci
ludamad 811b80d
fix ci
ludamad 5f232ad
fix cache recovery
ludamad 13c98e4
fix
ludamad 0eaa969
try with no cache instead
ludamad 53d8003
no-cache for earthly ci fix
ludamad 1e57632
remove use inline cache
ludamad f292e57
no-cache
ludamad 35c306c
no-cache fix
ludamad e981faa
kludge
ludamad 491e35e
perms
ludamad 14b95e0
perms
ludamad 464a585
bundle disable
ludamad f89db78
format fix
ludamad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,58 +22,112 @@ env: | |
# kludge until we move away from runners | ||
WAIT_FOR_RUNNERS: false | ||
jobs: | ||
setup: | ||
uses: ./.github/workflows/setup-runner.yml | ||
with: | ||
username: ${{ github.event.pull_request.user.login || github.actor }} | ||
runner_type: builder-arm | ||
secrets: inherit | ||
|
||
changes: | ||
runs-on: ubuntu-20.04 | ||
# Required permissions. | ||
permissions: | ||
pull-requests: read | ||
# Set job outputs to values from filter step | ||
outputs: | ||
build-images: ${{ steps.filter.outputs.build-images }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: { ref: "${{ env.GIT_COMMIT }}" } | ||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 | ||
id: filter | ||
with: | ||
filters: | | ||
build-images: | ||
- 'build-images/**' | ||
|
||
build-images: | ||
needs: [setup, changes] | ||
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-arm | ||
steps: | ||
# permission kludge before checkout, see https://github.com/actions/checkout/issues/211#issuecomment-611986243 | ||
- run: sudo chown -R $USER:$USER /home/ubuntu/ | ||
- uses: actions/checkout@v4 | ||
with: { ref: "${{ env.GIT_COMMIT }}" } | ||
- uses: ./.github/ci-setup-action | ||
with: | ||
concurrency_key: build-images-arm | ||
- name: "Push Build Images If Changed" | ||
if: ${{ needs.changes.outputs.build-images }} | ||
timeout-minutes: 40 | ||
run: | | ||
earthly-ci --push ./build-images/+build | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: [build-images] | ||
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-arm | ||
steps: | ||
# permission kludge before checkout, see https://github.com/actions/checkout/issues/211#issuecomment-611986243 | ||
- run: sudo chown -R $USER:$USER /home/ubuntu/ | ||
- uses: actions/checkout@v4 | ||
with: { ref: "${{ github.event.pull_request.head.sha }}" } | ||
with: { ref: "${{ env.GIT_COMMIT }}" } | ||
- uses: ./.github/ci-setup-action | ||
with: | ||
concurrency_key: build-arm | ||
# prepare images locally, tagged by commit hash | ||
- name: "Build E2E Image" | ||
timeout-minutes: 40 | ||
uses: ./.github/ensure-builder | ||
with: | ||
runner_type: builder-arm | ||
run: | | ||
set -eux | ||
git submodule update --init --recursive --recommend-shallow | ||
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u aztecprotocolci --password-stdin | ||
scripts/earthly-ci \ | ||
--secret AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \ | ||
--secret AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \ | ||
./yarn-project+export-e2e-test-images | ||
run: | | ||
earthly-ci ./yarn-project+export-e2e-test-images | ||
|
||
# all the end-to-end integration tests for aztec | ||
# all the non-bench end-to-end integration tests for aztec | ||
e2e: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-arm | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: { ref: "${{ github.event.pull_request.head.sha }}" } | ||
- name: "Test" | ||
timeout-minutes: 25 | ||
uses: ./.github/ensure-builder | ||
with: { ref: "${{ env.GIT_COMMIT }}" } | ||
- uses: ./.github/ci-setup-action | ||
with: | ||
runner_type: builder-arm | ||
run: | | ||
sudo shutdown -P 25 # hack until core part of the scripts | ||
set -eux | ||
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u aztecprotocolci --password-stdin | ||
scripts/earthly-ci \ | ||
--secret AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \ | ||
--secret AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \ | ||
--no-output ./yarn-project/end-to-end/+uniswap-trade-on-l1-from-l2 | ||
concurrency_key: e2e-arm | ||
# prepare images locally, tagged by commit hash | ||
- name: "Build E2E Image" | ||
timeout-minutes: 40 | ||
run: | | ||
earthly-ci ./yarn-project/end-to-end+uniswap-trade-on-l1-from-l2 | ||
|
||
# not notifying failures right now | ||
# notify: | ||
# needs: [e2e] | ||
# runs-on: ubuntu-latest | ||
# if: ${{ github.ref == 'refs/heads/master' && failure() }} | ||
# steps: | ||
# - name: Send notification to aztec3-ci channel if workflow failed on master | ||
# uses: slackapi/[email protected] | ||
# with: | ||
# payload: | | ||
# { | ||
# "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
# } | ||
# env: | ||
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_WORKFLOW_TRIGGER_URL }} | ||
rerun-check: | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
actions: write | ||
needs: [setup, build-images, build, e2e] | ||
if: ${{ !cancelled() }} | ||
steps: | ||
- name: Check for Rerun | ||
env: | ||
# We treat any skipped or failing jobs as a failure for the workflow as a whole. | ||
HAD_FAILURE: ${{ contains(needs.*.result, 'failure') }} | ||
GH_REPO: ${{ github.repository }} | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
if [[ $HAD_FAILURE == true ]] && [[ $RUN_ATTEMPT -lt 2 ]] ; then | ||
echo "Retrying first workflow failure. This is a stop-gap until things are more stable." | ||
gh workflow run rerun.yml -F run_id=${{ github.run_id }} | ||
fi | ||
|
||
# NOTE: we only notify failures after a rerun has occurred | ||
notify: | ||
needs: [e2e] | ||
runs-on: ubuntu-latest | ||
if: ${{ github.ref == 'refs/heads/master' && failure() && github.run_attempt >= 2 }} | ||
steps: | ||
- name: Send notification to aztec3-ci channel if workflow failed on master | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_WORKFLOW_TRIGGER_URL }} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored to be more like ci.yml