From 449544abb9b170f5557ff14e898eac225bc01281 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Thu, 28 Dec 2023 14:09:27 +0100 Subject: [PATCH] add support for multiarch platforms amd64 and arm64 #58 [ci skip] --- .github/workflows/feelpp-env.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/feelpp-env.yml b/.github/workflows/feelpp-env.yml index 9af527f36..ed7261045 100644 --- a/.github/workflows/feelpp-env.yml +++ b/.github/workflows/feelpp-env.yml @@ -25,6 +25,10 @@ on: description: 'Dockerfile to use' required: false default: Dockerfile + platforms: + description: 'Platforms to build' + required: false + default: linux/amd64,linux/arm64 @@ -47,16 +51,16 @@ jobs: max-parallel: 4 matrix: include: - - {service: feelpp-env, dist: focal, flavor: ubuntu, version: "20.04", tag: ubuntu-20.04, experimental: false, dockerfile: Dockerfile } - - {service: feelpp-env, dist: mantic, flavor: ubuntu, version: "23.10", tag: ubuntu-23.10, experimental: false, dockerfile: Dockerfile } - - {service: feelpp-env, dist: jammy, flavor: ubuntu, version: "22.04", tag: ubuntu-22.04, experimental: false, dockerfile: Dockerfile } - - {service: feelpp-env, dist: noble, flavor: ubuntu, version: "24.04", tag: ubuntu-24.04, experimental: true, dockerfile: Dockerfile } -# - {service: feelpp-env, dist: buster, flavor: debian, version: 10, tag: debian-10, experimental: false, dockerfile: Dockerfile } - - {service: feelpp-env, dist: bullseye, flavor: debian, version: "11", tag: debian-11, experimental: false, dockerfile: Dockerfile } - - {service: feelpp-env, dist: bookworm, flavor: debian, version: "12", tag: debian-12, experimental: false, dockerfile: Dockerfile } - - {service: feelpp-env, dist: debian-testing, flavor: debian, version: "testing", tag: debian-testing, experimental: true, dockerfile: Dockerfile } - - {service: feelpp-env, dist: debian-sid, flavor: debian, version: "sid", tag: debian-sid, experimental: true, dockerfile: Dockerfile } - - {service: feelpp-env, dist: fedora-39, flavor: fedora, version: "39", tag: fedora-39, experimental: false, dockerfile: Dockerfile } + - {service: feelpp-env, dist: focal, flavor: ubuntu, version: "20.04", tag: ubuntu-20.04, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: mantic, flavor: ubuntu, version: "23.10", tag: ubuntu-23.10, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: jammy, flavor: ubuntu, version: "22.04", tag: ubuntu-22.04, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: noble, flavor: ubuntu, version: "24.04", tag: ubuntu-24.04, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } +# - {service: feelpp-env, dist: buster, flavor: debian, version: 10, tag: debian-10, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } +# - {service: feelpp-env, dist: bullseye, flavor: debian, version: "11", tag: debian-11, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: bookworm, flavor: debian, version: "12", tag: debian-12, experimental: false, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: debian-testing, flavor: debian, version: "testing", tag: debian-testing, experimental: true, platforms: "linux/amd64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: debian-sid, flavor: debian, version: "sid", tag: debian-sid, experimental: true, platforms: "linux/amd64,linux/arm64", dockerfile: Dockerfile } + - {service: feelpp-env, dist: fedora-39, flavor: fedora, version: "39", tag: fedora-39, experimental: false, platforms: "linux/amd64", dockerfile: Dockerfile } runs-on: self-docker needs: activate name: ${{ matrix.flavor }}-${{ matrix.version }} @@ -96,6 +100,7 @@ jobs: tags: ghcr.io/feelpp/${{ matrix.service }}:${{ matrix.tag }} file: ./${{ steps.generate.outputs.context }}/${{ matrix.dockerfile }} push: ${{ github.event_name != 'pull_request' }} + platforms: ${{ matrix.platforms }} - name: Trigger build runner:${{ matrix.tag }} uses: peter-evans/repository-dispatch@v2 @@ -148,6 +153,7 @@ jobs: tags: ghcr.io/feelpp/${{ env.service }}:${{ env.tag }} file: ./${{ steps.generate.outputs.context }}/${{ inputs.dockerfile }} push: ${{ github.event_name != 'pull_request' }} + platforms: ${{ inputs.platforms }} - name: Trigger build runner:${{ env.tag }} uses: peter-evans/repository-dispatch@v2