Skip to content
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

Merged
merged 5 commits into from
Aug 22, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 121 additions & 9 deletions .github/workflows/devnet-deploys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,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
Expand Down Expand Up @@ -237,16 +244,51 @@ jobs:
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 }}
earthly-ci --no-output --push ./yarn-project+export-aztec-arch --DIST_TAG=${{ github.sha }}
earthly-ci --no-output --push ./yarn-project+export-aztec-arch --DIST_TAG=${{ github.sha }} --ARCH=amd64
earthly-ci --no-output --push ./yarn-project+export-aztec-arch --DIST_TAG=${{ env.DEPLOY_TAG }} --ARCH=amd64
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note for self (and others), the +export-aztec-arch target tags the image with the tag and arch combination


- 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 }}
docker pull aztecprotocol/aztec:${{ env.DEPLOY_TAG }}-amd64
docker tag aztecprotocol/aztec:${{ env.DEPLOY_TAG }}-amd64 aztecprotocol/aztec:${{ github.sha }}-amd64
docker push aztecprotocol/aztec:${{ github.sha }}-amd64

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=${{ github.sha }} --ARCH=arm64
earthly-ci --no-output --push ./yarn-project+export-aztec-arch --DIST_TAG=${{ env.DEPLOY_TAG }} --ARCH=arm64

- name: "Re-tag Aztec image"
if: ${{ github.event.inputs.no_rebuild_images == 'true' }}
run: |
env
docker pull aztecprotocol/aztec:${{ env.DEPLOY_TAG }}-arm64
docker tag aztecprotocol/aztec:${{ env.DEPLOY_TAG }}-arm64 aztecprotocol/aztec:${{ github.sha }}-arm64
docker push aztecprotocol/aztec:${{ github.sha }}-arm64

build-aztec-nargo:
needs: [set-network, build-aztec]
Expand All @@ -271,8 +313,79 @@ jobs:
- 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 }}
earthly-ci --no-output --push ./aztec-nargo+export-aztec-nargo --DIST_TAG=${{ github.sha }}
earthly-ci --no-output --push ./aztec-nargo+export-aztec-nargo --DIST_TAG=${{ github.sha }} --ARCH=amd64
earthly-ci --no-output --push ./aztec-nargo+export-aztec-nargo --DIST_TAG=${{ env.DEPLOY_TAG }} --ARCH=amd64

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=${{ github.sha }} --ARCH=arm64
earthly-ci --no-output --push ./aztec-nargo+export-aztec-nargo --DIST_TAG=${{ env.DEPLOY_TAG }} --ARCH=arm64

publish-aztec-manifests:
needs:
[build-aztec, build-aztec-arm, build-aztec-nargo, build-aztec-nargo-arm]
runs-on: ${{ github.actor }}-x86
steps:
- uses: actions/checkout@v4
with:
ref: "${{ env.GIT_COMMIT }}"
fetch-depth: 0
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ env.DOCKERHUB_PASSWORD }}"

- name: "Publish aztec manifests"
run: |
env
docker pull aztecprotocol/aztec:${{ github.sha }}-amd64
docker pull aztecprotocol/aztec:${{ github.sha }}-arm64

docker manifest create aztecprotocol/aztec:${{ env.DEPLOY_TAG }} \
aztecprotocol/aztec:${{ github.sha }}-amd64 \
aztecprotocol/aztec:${{ github.sha }}-arm64
docker manifest create aztecprotocol/aztec:${{ github.sha }} \
aztecprotocol/aztec:${{ github.sha }}-amd64 \
aztecprotocol/aztec:${{ github.sha }}-arm64

docker manifest push aztecprotocol/aztec:${{ env.DEPLOY_TAG }}
docker manifest push aztecprotocol/aztec:${{ github.sha }}

- name: "Publish aztec-nargo manifests"
if: ${{ github.event.inputs.no_rebuild_images == 'false' }}
run: |
docker pull aztecprotocol/aztec-nargo:${{ env.DEPLOY_TAG }}-amd64
docker pull aztecprotocol/aztec-nargo:${{ env.DEPLOY_TAG }}-arm64

docker manifest create aztecprotocol/aztec-nargo:${{ env.DEPLOY_TAG }} \
aztecprotocol/aztec-nargo:${{ github.sha }}-amd64 \
aztecprotocol/aztec-nargo:${{ github.sha }}-arm64
docker manifest create aztecprotocol/aztec-nargo:${{ github.sha }} \
aztecprotocol/aztec-nargo:${{ github.sha }}-amd64 \
aztecprotocol/aztec-nargo:${{ github.sha }}-arm64

docker manifest push aztecprotocol/aztec-nargo:${{ env.DEPLOY_TAG }}
docker manifest push aztecprotocol/aztec-nargo:${{ github.sha }}

build-faucet:
needs: [set-network, build-aztec]
Expand Down Expand Up @@ -340,12 +453,11 @@ jobs:
runs-on: ubuntu-latest
needs:
[
build-aztec,
build-faucet,
build-cli-wallet,
build-mainnet-fork,
build-aztec-nargo,
set-network,
publish-aztec-manifests,
]
env:
BRANCH_NAME: ${{ needs.set-network.outputs.branch_name }}
Expand Down