feat: arm64 Linux Docker image

This commit is contained in:
2025-04-13 13:46:57 +02:00
parent b927f4aa01
commit 75d6440776
4 changed files with 104 additions and 23 deletions

View File

@ -19,7 +19,7 @@ env:
PREMAKE_VERSION: "5.0.0-beta6"
jobs:
build-win:
build-windows:
name: Build Windows
runs-on: windows-latest
strategy:
@ -48,7 +48,6 @@ jobs:
with:
submodules: true
fetch-depth: 0
# NOTE - If LFS ever starts getting used during builds, switch this to true!
lfs: false
- name: Add msbuild to PATH
@ -93,7 +92,7 @@ jobs:
- release
arch:
- x86
- x64
- amd64
steps:
- name: Install g++ and multilib
run: |
@ -109,7 +108,6 @@ jobs:
with:
submodules: true
fetch-depth: 0
# NOTE - If LFS ever starts getting used during builds, switch this to true!
lfs: false
- name: Install dependencies (x86)
@ -146,6 +144,86 @@ jobs:
path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master
prebuild-linux-arm64:
name: Prebuild Linux
runs-on: ubuntu-latest
steps:
- name: Check out files
uses: actions/checkout@main
with:
submodules: true
fetch-depth: 0
lfs: false
- name: Install Premake5
uses: diamante0018/setup-premake@master
with:
version: ${{ env.PREMAKE_VERSION }}
- name: Generate project files
run: premake5 --cc=clang gmake
- name: Upload project files
uses: actions/upload-artifact@main
with:
name: linux-project-files
path: |
build/
build-linux-arm64:
name: Build Linux
runs-on: ${{ matrix.os }}
needs: prebuild-linux-arm64
strategy:
fail-fast: false
matrix:
configuration:
- debug
- release
arch:
- arm64
include:
- arch: arm64
os: ubuntu-24.04-arm
steps:
- name: Check out files
uses: actions/checkout@main
with:
submodules: true
fetch-depth: 0
lfs: false
- name: Compress the build directory
run: mkdir -p build
- name: Download project files
uses: actions/download-artifact@main
with:
name: linux-project-files
path: build/
- name: Install LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
- name: Build ${{matrix.arch}} ${{matrix.configuration}} binaries
working-directory: ${{ github.workspace }}
run: |
pushd build
make config=${{matrix.configuration}}_${{matrix.arch}} -j$(nproc)
env:
CC: clang-18
CXX: clang++-18
- name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries
uses: actions/upload-artifact@main
with:
name: linux-${{matrix.arch}}-${{matrix.configuration}}
path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master
build-macos:
name: Build macOS
runs-on: macos-latest
@ -156,7 +234,7 @@ jobs:
- debug
- release
arch:
- x64
- amd64
- arm64
steps:
- name: Check out files
@ -164,7 +242,6 @@ jobs:
with:
submodules: true
fetch-depth: 0
# NOTE - If LFS ever starts getting used during builds, switch this to true!
lfs: false
- name: Install Premake5
@ -192,7 +269,7 @@ jobs:
deploy:
name: Deploy artifacts
needs: [build-win, build-linux, build-macos]
needs: [build-windows, build-linux, build-linux-arm64, build-macos]
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
steps:
@ -202,7 +279,7 @@ jobs:
- name: Download Release binaries
uses: actions/download-artifact@main
with:
name: linux-x64-release
name: linux-amd64-release
- name: Install SSH key
uses: shimataro/ssh-key-action@v2.7.0
@ -221,7 +298,7 @@ jobs:
docker:
name: Create Docker Image
needs: [build-win, build-linux, build-macos]
needs: [build-windows, build-linux, build-linux-arm64, build-macos]
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
steps:
@ -247,6 +324,9 @@ jobs:
done
shell: bash
- name: Setup QEMU
uses: docker/setup-qemu-action@v3.6.0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.10.0
@ -270,7 +350,7 @@ jobs:
uses: docker/build-push-action@v6.15.0
with:
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}