From 5b380fb2ee6917cd5ea3aa39db9416cc44670813 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Sun, 4 May 2025 12:34:10 +0200 Subject: [PATCH 1/4] CI: test/build on ubuntu aarch64 This does not include AppImage nor release builds yet. --- .github/workflows/binaries.yaml | 18 +++++++++++++----- .github/workflows/test.yaml | 6 +++++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/binaries.yaml b/.github/workflows/binaries.yaml index e4261686..ce9a16cc 100644 --- a/.github/workflows/binaries.yaml +++ b/.github/workflows/binaries.yaml @@ -40,9 +40,17 @@ env: jobs: build-ubuntu: - runs-on: ubuntu-22.04 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-22.04 + - ubuntu-22.04-arm steps: + - name: Set env + shell: bash + run: echo "ARCH=`uname -m`" >> $GITHUB_ENV - name: Install dependencies run: | sudo apt-get update -y -qq @@ -56,8 +64,8 @@ jobs: run: make test CONF=RELEASE - name: Get version run: | - echo "POP_VERSION=`./build/linux-x86_64/poptracker --version`" >> $GITHUB_ENV - echo "POP_NAME=poptracker_`./build/linux-x86_64/poptracker --version | tr '.' '-'`" >> $GITHUB_ENV + echo "POP_VERSION=`./build/linux-${{ env.ARCH }}/poptracker --version`" >> $GITHUB_ENV + echo "POP_NAME=poptracker_`./build/linux-${{ env.ARCH }}/poptracker --version | tr '.' '-'`" >> $GITHUB_ENV - name: Build DIST # this builds a release ZIP, maybe .deb in the future run: make CONF=DIST - name: Attest Build and Archive @@ -65,12 +73,12 @@ jobs: uses: actions/attest-build-provenance@v2 with: subject-path: | - build/linux-x86_64/poptracker + build/linux-${{ env.ARCH }}/poptracker dist/* - name: Store DIST uses: actions/upload-artifact@v4 with: - name: ubuntu-22-04-dist + name: ${{ matrix.os }}-dist path: dist build-appimage: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a2f1be1a..43ed3f45 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,11 @@ jobs: test: strategy: matrix: - os: [ubuntu-latest, macos-latest] # , macos-13 # for tests, only do special macos-13 build below + os: + - ubuntu-latest + - ubuntu-24.04-arm + - macos-latest + # - macos-13 # for tests, only do special macos-13 build below shell: [bash] extra_make_args: [''] # default build include: From 7559be5434922635b2369eb32e4a3b0a3f960c5b Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Sun, 4 May 2025 14:34:12 +0200 Subject: [PATCH 2/4] CI: test on windows arm --- .github/workflows/test.yaml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 43ed3f45..1d375be2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -40,6 +40,9 @@ jobs: - os: windows-latest shell: msys2 {0} extra_make_args: '' + - os: windows-11-arm + shell: msys2 {0} + extra_make_args: '' - os: macos-13 shell: bash # we now require 10.15 by default, but 10.13 should work with an extra dependency @@ -66,8 +69,8 @@ jobs: if: ${{ startsWith(matrix.os, 'macos') && contains(matrix.extra_make_args, 'MACOS_DEPLOYMENT_TARGET') }} run: | brew install boost || true - - name: Install dependencies (msys2) - if: ${{ startsWith(matrix.os, 'windows') }} + - name: Install dependencies (msys2, x86_64) + if: ${{ startsWith(matrix.os, 'windows') && !endsWith(matrix.os, 'arm')}} uses: msys2/setup-msys2@v2 with: release: false @@ -84,6 +87,25 @@ jobs: mingw64/mingw-w64-x86_64-openssl mingw64/mingw-w64-x86_64-gtest p7zip + - name: Install dependencies (msys2, arm) + if: ${{ startsWith(matrix.os, 'windows') && endsWith(matrix.os, 'arm')}} + uses: msys2/setup-msys2@v2 + with: + msystem: CLANGARM64 + update: true + install: >- + base-devel + coreutils + make + mingw-w64-clang-aarch64-toolchain + clangarm64/mingw-w64-clang-aarch64-gcc-compat + clangarm64/mingw-w64-clang-aarch64-SDL2 + clangarm64/mingw-w64-clang-aarch64-SDL2_image + clangarm64/mingw-w64-clang-aarch64-SDL2_ttf + clangarm64/mingw-w64-clang-aarch64-freetype + clangarm64/mingw-w64-clang-aarch64-openssl + clangarm64/mingw-w64-clang-aarch64-gtest + p7zip - uses: actions/checkout@v4 with: submodules: recursive From 88b95fb23dfbe50b81f62f1e12b437e6891e36c2 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Wed, 14 May 2025 21:08:01 +0200 Subject: [PATCH 3/4] Docs: mention ARM64 Linux build in README --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 867b85b3..597aa2d3 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,9 @@ should compile on most unix-like OS (see [Building from source](#building-from-s Nix users can install [`poptracker`](https://search.nixos.org/packages?show=poptracker&type=packages&query=poptracker) from nixpkgs. +Raspberry Pis can run the Linux ARM64 builds on the 64bit OS (available for Pi 3 and newer). 32bit OS may still work, +but you need to build yourself. Only Pi 5 with 64bit OS is tested. + [WASM](https://wikipedia.org/wiki/WebAssembly) support still needs a lot of work. Check From 95ca66f13dd257d656d39d7514aac3e7f2577da0 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Sat, 28 Jun 2025 12:23:42 +0200 Subject: [PATCH 4/4] CI: make paths more generic and fail on error echo ... >> ... does not return 1 if a sub command fails --- .github/workflows/binaries.yaml | 69 +++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 20 deletions(-) diff --git a/.github/workflows/binaries.yaml b/.github/workflows/binaries.yaml index ce9a16cc..1f130029 100644 --- a/.github/workflows/binaries.yaml +++ b/.github/workflows/binaries.yaml @@ -50,7 +50,12 @@ jobs: steps: - name: Set env shell: bash - run: echo "ARCH=`uname -m`" >> $GITHUB_ENV + run: | + OS=`uname -s | tr A-Z a-z` + ARCH=`uname -m` + echo "OS=$OS" >> $GITHUB_ENV + echo "ARCH=$ARCH" >> $GITHUB_ENV + echo "UNAME=$OS-$ARCH" >> $GITHUB_ENV - name: Install dependencies run: | sudo apt-get update -y -qq @@ -64,8 +69,10 @@ jobs: run: make test CONF=RELEASE - name: Get version run: | - echo "POP_VERSION=`./build/linux-${{ env.ARCH }}/poptracker --version`" >> $GITHUB_ENV - echo "POP_NAME=poptracker_`./build/linux-${{ env.ARCH }}/poptracker --version | tr '.' '-'`" >> $GITHUB_ENV + POP_VERSION=`./build/${{ env.UNAME }}/poptracker --version` + POP_NAME=poptracker_`./build/${{ env.UNAME }}/poptracker --version | tr '.' '-'` + echo "POP_VERSION=$POP_VERSION" >> $GITHUB_ENV + echo "POP_NAME=$POP_NAME" >> $GITHUB_ENV - name: Build DIST # this builds a release ZIP, maybe .deb in the future run: make CONF=DIST - name: Attest Build and Archive @@ -73,7 +80,7 @@ jobs: uses: actions/attest-build-provenance@v2 with: subject-path: | - build/linux-${{ env.ARCH }}/poptracker + build/${{ env.UNAME }}/poptracker dist/* - name: Store DIST uses: actions/upload-artifact@v4 @@ -85,6 +92,13 @@ jobs: runs-on: ubuntu-22.04 steps: + - name: Set env + run: | + OS=`uname -s | tr A-Z a-z` + ARCH=`uname -m` + echo "OS=$OS" >> $GITHUB_ENV + echo "ARCH=$ARCH" >> $GITHUB_ENV + echo "UNAME=$OS-$ARCH" >> $GITHUB_ENV - name: Install dependencies run: | sudo apt-get update -y -qq @@ -147,7 +161,7 @@ jobs: uses: actions/attest-build-provenance@v2 with: subject-path: | - appimage-build/linux-x86_64/poptracker + appimage-build/${{ env.UNAME }}/poptracker *.AppImage* - name: Store AppImage uses: actions/upload-artifact@v4 @@ -160,6 +174,14 @@ jobs: runs-on: macos-13 steps: + - name: Set env + shell: bash + run: | + OS=darwin + ARCH=x86_64 + echo "OS=$OS" >> $GITHUB_ENV + echo "ARCH=$ARCH" >> $GITHUB_ENV + echo "UNAME=$OS-$ARCH" >> $GITHUB_ENV - name: Install dependencies run: | brew install coreutils SDL2 sdl2_ttf sdl2_image openssl@3.0 automake libtool autoconf googletest || true @@ -179,14 +201,16 @@ jobs: run: make test CONF=RELEASE - name: Get version run: | - echo "POP_VERSION=`./build/darwin-x86_64/poptracker --version`" >> $GITHUB_ENV - echo "POP_NAME=poptracker_`./build/darwin-x86_64/poptracker --version | tr '.' '-'`" >> $GITHUB_ENV + POP_VERSION=`./build/${{ env.UNAME }}/poptracker --version` + POP_NAME=poptracker_`./build/${{ env.UNAME }}/poptracker --version | tr '.' '-'` + echo "POP_VERSION=$POP_VERSION" >> $GITHUB_ENV + echo "POP_NAME=$POP_NAME" >> $GITHUB_ENV - name: Build DIST # this builds the app bundle, zips it and maybe .dmg in the future run: make CONF=DIST - name: Check DIST run: | - du -sh ./build/darwin-x86_64/poptracker.app - cd ./build/darwin-x86_64/poptracker.app/Contents/MacOS + du -sh ./build/${{ env.UNAME }}/poptracker.app + cd ./build/${{ env.UNAME }}/poptracker.app/Contents/MacOS otool -L ./poptracker ./poptracker --version ./poptracker --list-packs @@ -195,13 +219,13 @@ jobs: uses: actions/attest-build-provenance@v2 with: subject-path: | - build/darwin-x86_64/poptracker.app/Contents/MacOS/poptracker + build/${{ env.UNAME }}/poptracker.app/Contents/MacOS/poptracker dist/* - name: Store app bundle uses: actions/upload-artifact@v4 with: name: ${{ env.POP_NAME }}_macos - path: build/darwin-x86_64/poptracker.app + path: build/${{ env.UNAME }}/poptracker.app - name: Store ZIP/DMG uses: actions/upload-artifact@v4 with: @@ -212,6 +236,9 @@ jobs: runs-on: windows-latest steps: + - name: Set env + run: | + echo "UNAME=win64" >> $GITHUB_ENV - uses: msys2/setup-msys2@v2 with: update: true @@ -260,8 +287,10 @@ jobs: - name: Get version shell: msys2 {0} run: | - echo "POP_VERSION=`./build/win64/poptracker --version`" >> $GITHUB_ENV - echo "POP_NAME=poptracker_`./build/win64/poptracker --version | tr '.' '-'`" >> $GITHUB_ENV + POP_VERSION=`./build/${{ env.UNAME }}/poptracker --version` + POP_NAME=poptracker_`./build/${{ env.UNAME }}/poptracker --version | tr '.' '-'` + echo "POP_VERSION=$POP_VERSION" >> $GITHUB_ENV + echo "POP_NAME=$POP_NAME" >> $GITHUB_ENV - name: Download Updater shell: msys2 {0} env: @@ -282,28 +311,28 @@ jobs: uses: actions/attest-build-provenance@v2 with: subject-path: | - build/win64/poptracker.exe + build/${{ env.UNAME }}/poptracker.exe dist/* - name: Store DIST uses: actions/upload-artifact@v4 with: - name: win64-msys-dist + name: ${{ env.UNAME }}-msys-dist path: dist - name: Build DEBUG shell: msys2 {0} run: | make clean make native CONF=DEBUG -j4 - 7z a -mx=9 dist/poptracker-win64-debug.zip build/win64/poptracker.exe + 7z a -mx=9 dist/poptracker-${{ env.UNAME }}-debug.zip build/${{ env.UNAME }}/poptracker.exe - name: Attest Debug Build and Archive if: ${{ github.event_name == 'workflow_dispatch' }} uses: actions/attest-build-provenance@v2 with: subject-path: | - build/win64/poptracker.exe - dist/poptracker-win64-debug.zip + build/${{ env.UNAME }}/poptracker.exe + dist/poptracker-${{ env.UNAME }}-debug.zip - name: Store DEBUG uses: actions/upload-artifact@v4 with: - name: win64-msys-debug - path: dist/poptracker-win64-debug.zip + name: ${{ env.UNAME }}-msys-debug + path: dist/poptracker-${{ env.UNAME }}-debug.zip