diff --git a/.github/workflows/binaries.yaml b/.github/workflows/binaries.yaml index e4261686..1f130029 100644 --- a/.github/workflows/binaries.yaml +++ b/.github/workflows/binaries.yaml @@ -40,9 +40,22 @@ 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: | + 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 @@ -56,8 +69,10 @@ 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 + 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 @@ -65,18 +80,25 @@ jobs: uses: actions/attest-build-provenance@v2 with: subject-path: | - build/linux-x86_64/poptracker + build/${{ env.UNAME }}/poptracker dist/* - name: Store DIST uses: actions/upload-artifact@v4 with: - name: ubuntu-22-04-dist + name: ${{ matrix.os }}-dist path: dist build-appimage: 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 @@ -139,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 @@ -152,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 @@ -171,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 @@ -187,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: @@ -204,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 @@ -252,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: @@ -274,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 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a2f1be1a..1d375be2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,13 +29,20 @@ 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: - 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 @@ -62,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 @@ -80,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 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