-
Notifications
You must be signed in to change notification settings - Fork 270
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
feat: build for arm #7994
feat: build for arm #7994
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,6 +90,13 @@ jobs: | |
runner_type: builder-x86 | ||
secrets: inherit | ||
|
||
setup-arm: | ||
uses: ./.github/workflows/setup-runner.yml | ||
with: | ||
username: ${{ github.actor }} | ||
runner_type: builder-arm | ||
secrets: inherit | ||
|
||
# Set network specific variables as outputs from this job to be referenced in later jobs | ||
set-network: | ||
needs: setup | ||
|
@@ -234,6 +241,41 @@ jobs: | |
docker tag aztecprotocol/aztec:${{ env.DEPLOY_TAG }} aztecprotocol/aztec:${{ github.sha }} | ||
docker push aztecprotocol/aztec:${{ github.sha }} | ||
|
||
build-aztec-arm: | ||
needs: [set-network, setup-arm] | ||
env: | ||
BRANCH_NAME: ${{ needs.set-network.outputs.branch_name }} | ||
DEPLOY_TAG: ${{ needs.set-network.outputs.deploy_tag }} | ||
TF_VAR_DEPLOY_TAG: ${{ needs.set-network.outputs.deploy_tag }} | ||
API_KEY: ${{ secrets[needs.set-network.outputs.network_api_key] }} | ||
TF_VAR_API_KEY: ${{ secrets[needs.set-network.outputs.network_api_key] }} | ||
API_KEY_NAME: ${{ needs.set-network.outputs.network_api_key }} | ||
runs-on: ${{ github.actor }}-arm | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "${{ env.GIT_COMMIT }}" | ||
fetch-depth: 0 | ||
- uses: ./.github/ci-setup-action | ||
with: | ||
concurrency_key: build-aztec-${{ github.actor }} | ||
dockerhub_password: "${{ env.DOCKERHUB_PASSWORD }}" | ||
- name: "Build & Push aztec images" | ||
timeout-minutes: 40 | ||
if: ${{ github.event.inputs.no_rebuild_images == 'false' }} | ||
run: | | ||
env | ||
earthly-ci --no-output --push ./yarn-project+export-aztec-arch --DIST_TAG=${{ env.DEPLOY_TAG }} --ARCH=linux/arm64 | ||
earthly-ci --no-output --push ./yarn-project+export-aztec-arch --DIST_TAG=${{ github.sha }} --ARCH=linux/arm64 | ||
|
||
- name: "Re-tag Aztec image" | ||
if: ${{ github.event.inputs.no_rebuild_images == 'true' }} | ||
run: | | ||
env | ||
docker pull aztecprotocol/aztec:${{ env.DEPLOY_TAG }} | ||
docker tag aztecprotocol/aztec:${{ env.DEPLOY_TAG }} aztecprotocol/aztec:${{ github.sha }} | ||
docker push aztecprotocol/aztec:${{ github.sha }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should'nt we be specifying the arch here somehow? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIUC the only the current arch gets pulled and retagged, which shoul be okay as long as this runs on the arm runner? |
||
|
||
build-aztec-nargo: | ||
needs: [set-network, build-aztec] | ||
env: | ||
|
@@ -260,6 +302,32 @@ jobs: | |
earthly-ci --no-output --push ./aztec-nargo+export-aztec-nargo --DIST_TAG=${{ env.DEPLOY_TAG }} | ||
earthly-ci --no-output --push ./aztec-nargo+export-aztec-nargo --DIST_TAG=${{ github.sha }} | ||
|
||
build-aztec-nargo-arm: | ||
needs: [set-network, setup-arm, build-aztec-arm] | ||
env: | ||
BRANCH_NAME: ${{ needs.set-network.outputs.branch_name }} | ||
DEPLOY_TAG: ${{ needs.set-network.outputs.deploy_tag }} | ||
TF_VAR_DEPLOY_TAG: ${{ needs.set-network.outputs.deploy_tag }} | ||
API_KEY: ${{ secrets[needs.set-network.outputs.network_api_key] }} | ||
TF_VAR_API_KEY: ${{ secrets[needs.set-network.outputs.network_api_key] }} | ||
API_KEY_NAME: ${{ needs.set-network.outputs.network_api_key }} | ||
runs-on: ${{ github.actor }}-arm | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "${{ env.GIT_COMMIT }}" | ||
fetch-depth: 0 | ||
- uses: ./.github/ci-setup-action | ||
with: | ||
concurrency_key: build-aztec-nargo-${{ github.actor }} | ||
dockerhub_password: "${{ env.DOCKERHUB_PASSWORD }}" | ||
|
||
- name: Build & push aztec nargo image | ||
if: ${{ github.event.inputs.no_rebuild_images == 'false' }} | ||
run: | | ||
earthly-ci --no-output --push ./aztec-nargo+export-aztec-nargo --DIST_TAG=${{ env.DEPLOY_TAG }} --ARCH=linux/arm64 | ||
earthly-ci --no-output --push ./aztec-nargo+export-aztec-nargo --DIST_TAG=${{ github.sha }} --ARCH=linux/arm64 | ||
|
||
build-faucet: | ||
needs: [set-network, build-aztec] | ||
env: | ||
|
@@ -327,10 +395,12 @@ jobs: | |
needs: | ||
[ | ||
build-aztec, | ||
build-aztec-arm, | ||
build-faucet, | ||
build-cli-wallet, | ||
build-mainnet-fork, | ||
build-aztec-nargo, | ||
build-aztec-nargo-arm, | ||
set-network, | ||
] | ||
env: | ||
|
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.
I don't think it's as simple as this. We will need to publish all images with the appropriate arch and then build and publish a manifest. The manifest means when you do
docker pull aztecprotocol/aztec:devnet
it automagically gives you the image for your architecture.We do this in CCI hence why it works for the sandbox etc.
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.
Hmm, looking at the Earthly docs, it's possible that it is already reating a manifest as we don't specify
--no-manifest-list
. So maybe we do just need to specify the arch, but presumably we need to do it on all builds.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.
Exactly, I was under the impression Earthly creates a manifest all the time