Skip to content

WIP: Build on arm64 #75

WIP: Build on arm64

WIP: Build on arm64 #75

Workflow file for this run

---
name: Docker Images
on:
pull_request:
push:
branches:
- main
tags:
- "v*"
workflow_dispatch:
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-amd64:
uses: ./.github/workflows/build.yml
with:
runsOn: ubuntu-22.04
test-amd64:
needs: build-amd64
strategy:
fail-fast: false
matrix:
target: [base, full-stack] #[base, lab, base-with-services, full-stack]
uses: ./.github/workflows/test.yml
with:
runsOn: ubuntu-22.04
images: ${{ needs.build-amd64.outputs.images }}
target: ${{ matrix.target }}
integration: false
# To save arm64 runner resources, we only try to build once amd64 build and tests succeed
build-arm64:
needs: [build-amd64, test-amd64]
uses: ./.github/workflows/build.yml
with:
runsOn: buildjet-4vcpu-ubuntu-2204-arm
test-arm64:
needs: build-arm64
strategy:
fail-fast: false
matrix:
target: [base, full-stack] #[base, lab, base-with-services, full-stack]
uses: ./.github/workflows/test.yml
with:
runsOn: buildjet-2vcpu-ubuntu-2204-arm
images: ${{ needs.build-arm64.outputs.images }}
target: ${{ matrix.target }}
integration: false
test-integration:
needs: [build-arm64, build-amd64]
strategy:
fail-fast: false
matrix:
runsOn: [ubuntu-22.04, ARM64]
uses: ./.github/workflows/test.yml
with:
runsOn: ${{ matrix.runsOn}}
images: ${{ startsWith(matrix.runsOn, 'ubuntu') && needs.build-amd64.outputs.images || needs.build-arm64.outputs.images }}
target: full-stack
integration: true
publish_ghcr:
if: github.repository == 'aiidalab/aiidalab-docker-stack'
needs: [test-amd64, test-arm64]
uses: ./.github/workflows/publish_ghcr.yml
with:
runsOn: ubuntu-22.04
registry: ghcr.io
images_amd64: ${{ needs.test_amd64.inputs.images }}
images_arm64: ${{ needs.test_arm64.inputs.images }}
secrets:
REGISTRY_USERNAME: ${{ github.actor }}
REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_docker:
if: >-
github.repository == 'aiidalab/aiidalab-docker-stack'
&& (github.ref_type == 'tag' || github.ref_name == 'main')
needs: [publish_ghcr]
uses: ./.github/workflows/publish.yml
with:
runsOn: ubuntu-22.04
registry: docker.io
images: ${{ needs.publish_ghcr.outputs.images }}
secrets:
REGISTRY_USERNAME: ${{ secrets.DOCKER_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.DOCKER_PASSWORD }}