Skip to content

Commit

Permalink
add linux arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
Bishop-333 committed Dec 27, 2024
1 parent 3515966 commit 6f12f6a
Showing 1 changed file with 60 additions and 18 deletions.
78 changes: 60 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
workflow_dispatch:

jobs:
windows-msys:
windows:
name: ${{ matrix.btype }} Windows ${{ matrix.arch }}
runs-on: windows-2019
strategy:
Expand Down Expand Up @@ -63,17 +63,57 @@ jobs:
- name: Build
run: |
make clean ARCH=${{ matrix.arch }}
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin RENDERER_DEFAULT=opengl QUAKE3=1
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin RENDERER_DEFAULT=opengl
make clean ARCH=${{ matrix.arch }}
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin RENDERER_DEFAULT=vulkan QUAKE3=1
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin RENDERER_DEFAULT=vulkan
- uses: actions/upload-artifact@v4
if: matrix.cc == 'gcc' && matrix.btype == 'release'
with:
name: release-mingw64-${{ matrix.arch }}
path: bin
if-no-files-found: error
retention-days: 5

ubuntu-arm:
name: ${{ matrix.btype }} Unix ${{ matrix.arch }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
arch: [aarch64]
cc: [gcc]
btype: [Release]
include:
- btype: Release
rule: install

steps:

- uses: actions/checkout@v4
with:
submodules: recursive

- name: Build ${{ matrix.arch }}
uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.arch }}
distro: ubuntu20.04
githubToken: ${{ github.token }}
shell: /bin/sh
run: |
apt-get -qq update
apt-get install -y make gcc g++
apt-get -y install libcurl4-openssl-dev mesa-common-dev libxxf86dga-dev libxrandr-dev libxxf86vm-dev libasound-dev
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_SDL=0 RENDERER_DEFAULT=vulkan
make clean ARCH=${{ matrix.arch }}
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_SDL=0 RENDERER_DEFAULT=opengl
- uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.arch }}
path: bin
if-no-files-found: error
retention-days: 5

ubuntu-x86:
name: ${{ matrix.btype }} Unix ${{ matrix.arch }}
Expand All @@ -94,6 +134,9 @@ jobs:
- arch: x86_64
use_sdl: USE_SDL=1

- arch: aarch64
use_sdl: USE_SDL=1

steps:

- name: Install tools
Expand All @@ -113,12 +156,11 @@ jobs:

- name: Build
run: |
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin ${{ matrix.use_sdl }} RENDERER_DEFAULT=opengl QUAKE3=1
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin ${{ matrix.use_sdl }} RENDERER_DEFAULT=opengl
make clean ARCH=${{ matrix.arch }}
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin ${{ matrix.use_sdl }} RENDERER_DEFAULT=vulkan QUAKE3=1
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin ${{ matrix.use_sdl }} RENDERER_DEFAULT=vulkan
- uses: actions/upload-artifact@v4
if: matrix.cc == 'gcc' && matrix.btype == 'release'
with:
name: release-linux-${{ matrix.arch }}
path: bin
Expand Down Expand Up @@ -149,10 +191,9 @@ jobs:

- name: Build
run: |
make ${{ matrix.rule }} -j$(sysctl -n hw.logicalcpu) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin INSTALL=ginstall STRIP=echo QUAKE3=1
make ${{ matrix.rule }} -j$(sysctl -n hw.logicalcpu) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin INSTALL=ginstall STRIP=echo
- uses: actions/upload-artifact@v4
if: matrix.cc == 'gcc' && matrix.btype == 'release'
with:
name: release-darwin-${{ matrix.arch }}
path: bin
Expand All @@ -161,7 +202,7 @@ jobs:

create-testing:
if: github.ref == 'refs/heads/master' && github.event_name == 'push' || github.event_name == 'workflow_dispatch'
needs: [windows-msys, ubuntu-x86, macos]
needs: [windows, ubuntu-arm, ubuntu-x86, macos]
runs-on: ubuntu-20.04
steps:
- name: Download Artifacts
Expand All @@ -170,18 +211,19 @@ jobs:
- name: Create binary archives
run: |
chmod -R +x *
7z a -r q3-omega-engine-linux-x86.zip ./release-linux-x86
7z a -r q3-omega-engine-linux-x86_64.zip ./release-linux-x86_64
7z a -r q3-omega-engine-windows-x86.zip ./release-mingw64-x86
7z a -r q3-omega-engine-windows-x86_64.zip ./release-mingw64-x86_64
7z a -r q3-omega-engine-macos-x86_64.zip ./release-darwin-x86_64
7z a -r q3-omega-engine-macos-arm64.zip ./release-darwin-arm64
7z a -r omega-engine-linux-x86.zip ./release-linux-x86
7z a -r omega-engine-linux-x86_64.zip ./release-linux-x86_64
7z a -r omega-engine-linux-arm64.zip ./release-linux-arm64
7z a -r omega-engine-windows-x86.zip ./release-mingw64-x86
7z a -r omega-engine-windows-x86_64.zip ./release-mingw64-x86_64
7z a -r omega-engine-macos-x86_64.zip ./release-darwin-x86_64
7z a -r omega-engine-macos-arm64.zip ./release-darwin-arm64
- name: Create latest build
uses: czietz/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: "q3-omega"
automatic_release_tag: "omega-dev"
prerelease: true
title: Development Build (Quake3 as default)
title: Development Build
files: |
*.zip

0 comments on commit 6f12f6a

Please sign in to comment.