Skip to content

Commit

Permalink
Add arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Dec 13, 2024
1 parent ff45067 commit 55a7974
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 12 deletions.
61 changes: 51 additions & 10 deletions .github/workflows/docker-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,40 @@ on:
push:
branches: [ dev ]
jobs:
linux:
linux-amd64:
if: ${{ !contains(github.event.head_commit.message, '[skip.all]') }}
runs-on: self-hosted
timeout-minutes: 60
strategy:
matrix:
arch: [ amd64 ]
steps:
- name: Clone
uses: actions/checkout@v4
- name: Login Docker
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: Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v6
with:
context: .
file: ./Script/amd64/Rocky.Dockerfile
provenance: false
push: true
tags: |
tlcfem/suanpan:amd64
ghcr.io/tlcfem/suanpan:latest
linux-arm64:
if: ${{ !contains(github.event.head_commit.message, '[skip.all]') }}
runs-on: self-hosted
timeout-minutes: 600
steps:
- name: Clone
uses: actions/checkout@v4
Expand All @@ -25,17 +52,31 @@ jobs:
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 ${{ matrix.arch }}
- name: Build
uses: docker/build-push-action@v6
with:
context: .
file: ./Script/${{ matrix.arch }}/Rocky.Dockerfile
platforms: linux/${{ matrix.arch }}
file: ./Script/arm64/Rocky.Dockerfile
platforms: linux/arm64
provenance: false
push: true
tags: |
tlcfem/suanpan:latest
ghcr.io/tlcfem/suanpan:latest
tlcfem/suanpan:arm64
linux-combine:
needs: [ linux-amd64, linux-arm64 ]
runs-on: ubuntu-24.04
steps:
- name: Login Docker
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:latest --amend tlcfem/suanpan:amd64 tlcfem/suanpan:arm64
docker manifest push tlcfem/suanpan:latest
2 changes: 1 addition & 1 deletion .github/workflows/docker-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
ide-image-base:
runs-on: self-hosted
timeout-minutes: 600
timeout-minutes: 6000
strategy:
matrix:
arch: [ amd64, arm64 ]
Expand Down
2 changes: 1 addition & 1 deletion Script/arm64/Rocky.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM tlcfem/suanpan-env:latest AS build
# part 3: suanpan
RUN git clone --depth 1 --branch dev https://github.com/TLCFEM/suanPan.git

RUN cd suanPan && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYS_LIB=ON -DCUSTOM_OPENBLAS=/OpenBLAS -DBUILD_MULTITHREAD=ON -DUSE_HDF5=ON -DUSE_VTK=OFF -DUSE_AVX2=OFF .. && make -j"$(nproc)"
RUN cd suanPan && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYS_LIB=ON -DCUSTOM_OPENBLAS=/OpenBLAS -DBUILD_MULTITHREAD=ON -DUSE_HDF5=ON -DUSE_VTK=ON -DUSE_AVX2=OFF .. && make -j"$(nproc)"

FROM rockylinux:9 AS runtime

Expand Down

0 comments on commit 55a7974

Please sign in to comment.