From 3a6c88a631b7e8d9ce26cb3e1a9bae052882bcf8 Mon Sep 17 00:00:00 2001 From: Theodore Chang Date: Fri, 13 Dec 2024 16:34:28 +0100 Subject: [PATCH] Minor update --- .github/workflows/docker-master.yml | 42 ++++++++++++++++++++--------- Script/arm64/Rocky.Dockerfile | 2 +- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-master.yml b/.github/workflows/docker-master.yml index 17b2117d..b7d60f99 100644 --- a/.github/workflows/docker-master.yml +++ b/.github/workflows/docker-master.yml @@ -3,31 +3,47 @@ on: push: branches: [ master ] jobs: - linux: + linux-base: if: ${{ !contains(github.event.head_commit.message, '[skip.all]') }} runs-on: self-hosted - timeout-minutes: 60 + timeout-minutes: 600 + strategy: + matrix: + arch: [ amd64, arm64 ] steps: - name: Clone uses: actions/checkout@v4 - - name: Login Docker + - name: Login uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Login GitHub - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + - name: QEMU + if: ${{ matrix.arch == 'arm64' }} + uses: docker/setup-qemu-action@v3 - name: Buildx uses: docker/setup-buildx-action@v3 - - name: Build + - name: Base ${{ matrix.arch }} uses: docker/build-push-action@v6 with: context: . - file: ./Script/amd64/Rocky.Dockerfile + file: ./Script/${{ matrix.arch }}/Rocky.Dockerfile + platforms: linux/${{ matrix.arch }} + provenance: false push: true - tags: | - tlcfem/suanpan:stable + tags: tlcfem/suanpan:stable-${{ matrix.arch }} + linux-combine: + needs: linux-base + runs-on: self-hosted + steps: + - name: Login + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Buildx + uses: docker/setup-buildx-action@v3 + - name: Combine + run: | + docker manifest create tlcfem/suanpan:stable --amend tlcfem/suanpan:stable-amd64 tlcfem/suanpan:stable-arm64 + docker manifest push tlcfem/suanpan:stable diff --git a/Script/arm64/Rocky.Dockerfile b/Script/arm64/Rocky.Dockerfile index 126d1330..ec0e8383 100644 --- a/Script/arm64/Rocky.Dockerfile +++ b/Script/arm64/Rocky.Dockerfile @@ -8,7 +8,7 @@ RUN cd suanPan && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -D FROM rockylinux:9 AS runtime RUN dnf install -y epel-release && crb enable -RUN dnf install -y libgomp hdf5 libglvnd +RUN dnf install -y libgomp hdf5 libX11 COPY --from=build /tbb-build /tbb-build