From ed763b7d417a10f3b9f531487ef70ecacb690688 Mon Sep 17 00:00:00 2001 From: soloturn Date: Sun, 2 Aug 2026 22:41:57 +0200 Subject: [PATCH 1/9] Add Linux aarch64 native build target JNBullet only ever built linux-amd64, windows-amd64, and macos (amd64/aarch64) natives, so Terasology has no working physics on Linux ARM64 (e.g. Raspberry Pi, Apple Silicon under Linux, Asahi, Arch Linux ARM). NativeSupport already resolves the expected filename (libbullet-linux-aarch64.so) for that platform, it just was never built. - Add toolchains/linux_aarch64_gcc.cmake, matching the existing linux_amd64_gcc.cmake but targeting aarch64. - build.gradle: on a Linux aarch64 host, build only the linux_aarch64_gcc target (skip the amd64 + MinGW-w64 Windows cross-compile, which targets a different architecture/isn't reliably available from an aarch64 host). - build.gradle: replace the doLast { exec { ... } } call for `make` with a plain ProcessBuilder invocation - Project.exec(Closure) was removed in Gradle 9, this now works on both Gradle 8 and 9+. - Bump the Gradle wrapper to 9.6.1 so the project can build on JDKs newer than what Gradle 8.2.1 supports (e.g. JDK 21+). - CI: add ubuntu-24.04-arm to the swig/build matrices so aarch64 natives get built and published going forward. Verified locally on Arch Linux ARM (aarch64): built libbullet-linux-aarch64.so, published a 1.0.5-SNAPSHOT to mavenLocal, and ran a Terasology game session against it end-to-end (physics init, world generation, save) with no native-library errors. --- .github/workflows/allInOne.yml | 4 ++-- build.gradle | 22 +++++++++++++++----- gradle/wrapper/gradle-wrapper.properties | 2 +- toolchains/linux_aarch64_gcc.cmake | 26 ++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 toolchains/linux_aarch64_gcc.cmake diff --git a/.github/workflows/allInOne.yml b/.github/workflows/allInOne.yml index d6af0de68..74648784a 100644 --- a/.github/workflows/allInOne.yml +++ b/.github/workflows/allInOne.yml @@ -15,7 +15,7 @@ jobs: swig: strategy: matrix: - os: [ubuntu-20.04, macos-12, macos-14] + os: [ubuntu-20.04, ubuntu-24.04-arm, macos-12, macos-14] runs-on: ${{ matrix.os }} steps: - name: SWIG from cache @@ -54,7 +54,7 @@ jobs: build: strategy: matrix: - os: [ubuntu-20.04, macos-12, macos-14] + os: [ubuntu-20.04, ubuntu-24.04-arm, macos-12, macos-14] runs-on: ${{ matrix.os }} needs: [validate-gradle-wrapper, swig] steps: diff --git a/build.gradle b/build.gradle index 8f0f82772..7ea0d6865 100644 --- a/build.gradle +++ b/build.gradle @@ -14,14 +14,21 @@ ext { natives = ["macosx_amd64_clang"] } } else if (Os.isFamily(Os.FAMILY_UNIX)) { - // Cross-compilation with MinGW-w64 allows us to also build the Windows target on Linux - natives = ["linux_amd64_gcc","linux_windows_amd64_mingw32"] + if (Os.isArch("aarch64")) { + // No MinGW-w64 cross target here: the Windows amd64 build is unrelated to and + // not reliably available when cross-compiling from an aarch64 host. + natives = ["linux_aarch64_gcc"] + } else { + // Cross-compilation with MinGW-w64 allows us to also build the Windows target on Linux + natives = ["linux_amd64_gcc","linux_windows_amd64_mingw32"] + } } else { throw new GradleException("This script only works on Linux or Mac") } allNatives = [ "linux_amd64_gcc", + "linux_aarch64_gcc", "linux_windows_amd64_mingw32", "macosx_aarch64_clang", "macosx_amd64_clang" @@ -108,9 +115,14 @@ natives.each { module -> mkdir "$rootDir/build/natives/${module}" } doLast { - exec { - workingDir "$rootDir/build/natives/${module}" - commandLine 'make', "-j${Runtime.runtime.availableProcessors()}" + def process = new ProcessBuilder('make', "-j${Runtime.runtime.availableProcessors()}") + .directory(file("$rootDir/build/natives/${module}")) + .redirectErrorStream(true) + .start() + process.inputStream.eachLine { println it } + def exitCode = process.waitFor() + if (exitCode != 0) { + throw new GradleException("make failed with exit code ${exitCode}") } } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9f4197d5f..a351597e6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/toolchains/linux_aarch64_gcc.cmake b/toolchains/linux_aarch64_gcc.cmake new file mode 100644 index 000000000..5a62b54b3 --- /dev/null +++ b/toolchains/linux_aarch64_gcc.cmake @@ -0,0 +1,26 @@ +# Copyright 2015, alex at staticlibs.net +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cmake_minimum_required ( VERSION 3.5 ) + +# default to Debug +set ( CMAKE_BUILD_TYPE "Debug" CACHE STRING "Default build type" ) + +set ( CMAKE_SYSTEM_NAME Linux ) +set ( CMAKE_SYSTEM_ARCH aarch64 ) + +set ( CMAKE_C_COMPILER gcc ) +set ( CMAKE_CXX_COMPILER g++ ) + +set(CMAKE_CXX_FLAGS_RELEASE "-O3") From efc77c7a346af087e83f583d0abd5f4fab9cc9ec Mon Sep 17 00:00:00 2001 From: soloturn Date: Mon, 3 Aug 2026 03:04:20 +0200 Subject: [PATCH 2/9] ci: install libpcre3-dev before building SWIG from source SWIG's configure needs pcre-config from PCRE1's dev package. The ubuntu-20.04 runner image happened to have it preinstalled, which is why this was never explicit; the ubuntu-24.04-arm image added for aarch64 natives does not, so the swig job failed with: configure: error: Cannot find pcre-config script from PCRE --- .github/workflows/allInOne.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/allInOne.yml b/.github/workflows/allInOne.yml index 74648784a..c4e538126 100644 --- a/.github/workflows/allInOne.yml +++ b/.github/workflows/allInOne.yml @@ -28,7 +28,7 @@ jobs: if: steps.cache-swig.outputs.cache-hit != 'true' run: | if [ "${{ runner.os }}" == 'Linux' ]; then - sudo apt-get install -y autoconf automake libtool + sudo apt-get install -y autoconf automake libtool libpcre3-dev elif [ "${{ runner.os }}" == 'macOS' ]; then brew install autoconf automake libtool pcre else From 1937ecdd277d1d5f6622bff73f87f87c4c32f137 Mon Sep 17 00:00:00 2001 From: soloturn Date: Mon, 3 Aug 2026 03:17:23 +0200 Subject: [PATCH 3/9] ci: bump deprecated runner images (ubuntu-20.04, macos-12) Both are retired/being retired GitHub-hosted runner labels; jobs using them were stuck indefinitely in the queue rather than picked up. Move to ubuntu-24.04 and macos-13 (still x86, pairs with macos-14 for Apple Silicon coverage). --- .github/workflows/allInOne.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/allInOne.yml b/.github/workflows/allInOne.yml index c4e538126..fdae306b8 100644 --- a/.github/workflows/allInOne.yml +++ b/.github/workflows/allInOne.yml @@ -15,7 +15,7 @@ jobs: swig: strategy: matrix: - os: [ubuntu-20.04, ubuntu-24.04-arm, macos-12, macos-14] + os: [ubuntu-24.04, ubuntu-24.04-arm, macos-13, macos-14] runs-on: ${{ matrix.os }} steps: - name: SWIG from cache @@ -54,7 +54,7 @@ jobs: build: strategy: matrix: - os: [ubuntu-20.04, ubuntu-24.04-arm, macos-12, macos-14] + os: [ubuntu-24.04, ubuntu-24.04-arm, macos-13, macos-14] runs-on: ${{ matrix.os }} needs: [validate-gradle-wrapper, swig] steps: @@ -95,7 +95,7 @@ jobs: build/natives/*/*.dll build/natives/*/*.dylib publish: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [validate-gradle-wrapper, swig, build] if: github.ref == 'refs/heads/master' steps: From 1734d8a0104f01e8b5243c89be7e3460330144f0 Mon Sep 17 00:00:00 2001 From: soloturn Date: Mon, 3 Aug 2026 03:19:39 +0200 Subject: [PATCH 4/9] ci: install pcre runtime lib unconditionally, not just on cache miss The swig job's dependency-install step (which provides libpcre, the runtime lib the built swig binary links against) was gated on `cache-hit != 'true'`. On a warm cache, that step - and with it the runtime library - was skipped entirely, even though each job still runs on a fresh VM with nothing preinstalled. The cached swig binary then failed to even run: error while loading shared libraries: libpcre.so.3 There was also a dead macOS-only step meant to cover this (`if: runner.os == 'macOs'`, note the lowercase 's' - never matches the real runner.os value 'macOS'), now redundant given the above. Same gap existed in the build/publish jobs on Linux: they installed MinGW-w64 but never libpcre3, so a cache-hit run would fail there too. --- .github/workflows/allInOne.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/allInOne.yml b/.github/workflows/allInOne.yml index fdae306b8..80e2bafc4 100644 --- a/.github/workflows/allInOne.yml +++ b/.github/workflows/allInOne.yml @@ -24,8 +24,10 @@ jobs: with: path: ${{ github.workspace }}/swig key: ${{ runner.os }}-${{ runner.arch }}-swig-${{ env.SWIG_VERSION }} - - name: Install SWIG build dependencies - if: steps.cache-swig.outputs.cache-hit != 'true' + - name: Install SWIG dependencies + # Always install, even on a cache hit: this also provides the pcre runtime + # library the cached swig binary is linked against, which isn't persisted + # across runner VMs by the actions/cache step above. run: | if [ "${{ runner.os }}" == 'Linux' ]; then sudo apt-get install -y autoconf automake libtool libpcre3-dev @@ -45,10 +47,6 @@ jobs: ./configure --prefix=$GITHUB_WORKSPACE/swig make make install - - name: Install SWIG runtime dependencies - if: runner.os == 'macOs' - run: | - brew install pcre - name: Check SWIG version run: $GITHUB_WORKSPACE/swig/bin/swig -version build: @@ -69,6 +67,9 @@ jobs: fail-on-cache-miss: true - name: Add SWIG to $PATH run: echo "${{ github.workspace }}/swig/bin" >> $GITHUB_PATH + - name: Install libpcre3 + if: runner.os == 'Linux' + run: sudo apt-get install -y libpcre3-dev - name: Install MinGW-w64 if: runner.os == 'Linux' run: sudo apt-get install -y mingw-w64 @@ -110,6 +111,8 @@ jobs: fail-on-cache-miss: true - name: Add SWIG to $PATH run: echo "${{ github.workspace }}/swig/bin" >> $GITHUB_PATH + - name: Install libpcre3 + run: sudo apt-get install -y libpcre3-dev - name: Check SWIG version run: swig -version - name: Set up JDK From 96ec540f11755427aec801056c1df288ec4411d1 Mon Sep 17 00:00:00 2001 From: soloturn Date: Mon, 3 Aug 2026 03:23:54 +0200 Subject: [PATCH 5/9] ci: use current macOS runner images (macos-26 / macos-26-intel) macos-13/macos-14 are on the deprecation path; move to the current GA images, keeping one Intel and one Apple Silicon leg. --- .github/workflows/allInOne.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/allInOne.yml b/.github/workflows/allInOne.yml index 80e2bafc4..06d05816b 100644 --- a/.github/workflows/allInOne.yml +++ b/.github/workflows/allInOne.yml @@ -15,7 +15,7 @@ jobs: swig: strategy: matrix: - os: [ubuntu-24.04, ubuntu-24.04-arm, macos-13, macos-14] + os: [ubuntu-24.04, ubuntu-24.04-arm, macos-26-intel, macos-26] runs-on: ${{ matrix.os }} steps: - name: SWIG from cache @@ -52,7 +52,7 @@ jobs: build: strategy: matrix: - os: [ubuntu-24.04, ubuntu-24.04-arm, macos-13, macos-14] + os: [ubuntu-24.04, ubuntu-24.04-arm, macos-26-intel, macos-26] runs-on: ${{ matrix.os }} needs: [validate-gradle-wrapper, swig] steps: From fdabef2befd879bd2259768353baa8e7af5573a7 Mon Sep 17 00:00:00 2001 From: soloturn Date: Mon, 3 Aug 2026 03:29:51 +0200 Subject: [PATCH 6/9] ci: run on JDK 25, target Java 17 bytecode Gradle 9.6.1 (bumped earlier here) needs JVM 17+; run CI on the current JDK (25) rather than the old pinned 11, which no longer works. Bump the library's own source/targetCompatibility from 1.8 to 17 to match - it was already far behind, and 17 is what Terasology's engine itself requires. --- .github/workflows/allInOne.yml | 4 ++-- build.gradle | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/allInOne.yml b/.github/workflows/allInOne.yml index 06d05816b..1f19cc558 100644 --- a/.github/workflows/allInOne.yml +++ b/.github/workflows/allInOne.yml @@ -81,7 +81,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '11' + java-version: '25' distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 @@ -118,7 +118,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '11' + java-version: '25' distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 diff --git a/build.gradle b/build.gradle index 7ea0d6865..22d17994e 100644 --- a/build.gradle +++ b/build.gradle @@ -38,8 +38,8 @@ ext { } java { - sourceCompatibility(JavaVersion.VERSION_1_8) - targetCompatibility(JavaVersion.VERSION_1_8) + sourceCompatibility(JavaVersion.VERSION_17) + targetCompatibility(JavaVersion.VERSION_17) } // We use both Maven Central and our own Artifactory instance, which contains module builds, extra libs, and so on From 57266731384ee0e513c9ac6a3b1015a3f3b8f5b6 Mon Sep 17 00:00:00 2001 From: soloturn Date: Mon, 3 Aug 2026 03:33:51 +0200 Subject: [PATCH 7/9] build: bump toolchain cmake_minimum_required 2.8.12 -> 3.5 CMake 4.x (now what CI's runner images ship, same as recent local installs) dropped support for cmake_minimum_required policies below 3.5 entirely: CMake Error: Compatibility with CMake < 3.5 has been removed from CMake. Every toolchain file still declared 2.8.12 except the new linux_aarch64_gcc.cmake added in this branch, which is why swig/build suddenly failed across the whole matrix, not just aarch64. Match the project's own CMakeLists.txt, which already requires 3.5. --- toolchains/android_armeabi_gcc.cmake | 2 +- toolchains/linux_amd64_gcc.cmake | 2 +- toolchains/linux_i686_gcc.cmake | 2 +- toolchains/macosx_aarch64_clang.cmake | 2 +- toolchains/macosx_amd64_clang.cmake | 2 +- toolchains/windows_amd64_msvc.cmake | 2 +- toolchains/windows_i686_msvc.cmake | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/toolchains/android_armeabi_gcc.cmake b/toolchains/android_armeabi_gcc.cmake index d75f3f566..93d961234 100644 --- a/toolchains/android_armeabi_gcc.cmake +++ b/toolchains/android_armeabi_gcc.cmake @@ -14,7 +14,7 @@ # toolchain for linux: https://github.com/staticlibs/android-ndk-r9d-arm-linux-androideabi-4.8 -cmake_minimum_required ( VERSION 2.8.12 ) +cmake_minimum_required ( VERSION 3.5 ) # default to Debug set ( CMAKE_BUILD_TYPE "Debug" CACHE STRING "Default build type" ) diff --git a/toolchains/linux_amd64_gcc.cmake b/toolchains/linux_amd64_gcc.cmake index fe6a98bb1..682eaa66f 100644 --- a/toolchains/linux_amd64_gcc.cmake +++ b/toolchains/linux_amd64_gcc.cmake @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required ( VERSION 2.8.12 ) +cmake_minimum_required ( VERSION 3.5 ) # default to Debug set ( CMAKE_BUILD_TYPE "Debug" CACHE STRING "Default build type" ) diff --git a/toolchains/linux_i686_gcc.cmake b/toolchains/linux_i686_gcc.cmake index fdb40a245..1216624f5 100644 --- a/toolchains/linux_i686_gcc.cmake +++ b/toolchains/linux_i686_gcc.cmake @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required ( VERSION 2.8.12 ) +cmake_minimum_required ( VERSION 3.5 ) set ( CMAKE_SYSTEM_NAME Linux ) set ( CMAKE_SYSTEM_ARCH i686) diff --git a/toolchains/macosx_aarch64_clang.cmake b/toolchains/macosx_aarch64_clang.cmake index 29aa387ae..10762fe4f 100644 --- a/toolchains/macosx_aarch64_clang.cmake +++ b/toolchains/macosx_aarch64_clang.cmake @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required ( VERSION 2.8.12 ) +cmake_minimum_required ( VERSION 3.5 ) # default to Debug set ( CMAKE_BUILD_TYPE "Debug" CACHE STRING "Default build type" ) diff --git a/toolchains/macosx_amd64_clang.cmake b/toolchains/macosx_amd64_clang.cmake index 5ed31f1e0..24800976c 100644 --- a/toolchains/macosx_amd64_clang.cmake +++ b/toolchains/macosx_amd64_clang.cmake @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required ( VERSION 2.8.12 ) +cmake_minimum_required ( VERSION 3.5 ) # default to Debug set ( CMAKE_BUILD_TYPE "Debug" CACHE STRING "Default build type" ) diff --git a/toolchains/windows_amd64_msvc.cmake b/toolchains/windows_amd64_msvc.cmake index 76c31fa93..185fef31d 100644 --- a/toolchains/windows_amd64_msvc.cmake +++ b/toolchains/windows_amd64_msvc.cmake @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required ( VERSION 2.8.12 ) +cmake_minimum_required ( VERSION 3.5 ) # default to Debug set ( CMAKE_BUILD_TYPE "Debug" CACHE STRING "Default build type" ) diff --git a/toolchains/windows_i686_msvc.cmake b/toolchains/windows_i686_msvc.cmake index 20fd554b4..2e870ec47 100644 --- a/toolchains/windows_i686_msvc.cmake +++ b/toolchains/windows_i686_msvc.cmake @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required ( VERSION 2.8.12 ) +cmake_minimum_required ( VERSION 3.5 ) # default to Debug set ( CMAKE_BUILD_TYPE "Debug" CACHE STRING "Default build type" ) From 56dee9ff5467ae380843ec430c397d013771ce74 Mon Sep 17 00:00:00 2001 From: soloturn Date: Mon, 3 Aug 2026 03:48:44 +0200 Subject: [PATCH 8/9] Add Windows arm64 native build target Classic mingw-w64 (GCC) has no Windows/ARM64 target at all, so this platform was never built even though it's one of the four LWJGL/Java natives Terasology already ships for (natives-windows/-linux/-macos/ -macos-arm64 don't cover Windows on ARM, but the demand is the same as for Linux aarch64: Windows-on-ARM devices, e.g. Surface Pro X/11, Parallels/UTM VMs on Apple Silicon, Snapdragon X laptops). - Add toolchains/linux_windows_arm64_llvm_mingw32.cmake, using the LLVM-based llvm-mingw toolchain (https://github.com/mstorsjo/llvm-mingw) instead of GCC, since llvm-mingw is the only mingw-w64 toolchain with an aarch64-w64-mingw32 target. - build.gradle: build linux_windows_arm64_llvm_mingw32 alongside the existing linux_amd64_gcc/linux_windows_amd64_mingw32 pair on an amd64 Linux host (llvm-mingw itself doesn't care about host arch, but this keeps "cross-compile everything Windows-related" on the one job, same as before). - CI: download+extract llvm-mingw and put it on PATH for the job that needs it (gated to the amd64 Linux leg, since that's the only one building this target). Verified locally on Arch Linux ARM (aarch64) using the llvm-mingw aarch64 host build: configured and built libbullet-windows-aarch64.dll cleanly, confirmed as a valid ARM64 PE32+ DLL via `file`. --- .github/workflows/allInOne.yml | 9 +++++++++ build.gradle | 7 +++++-- toolchains/linux_windows_arm64_llvm_mingw32.cmake | 13 +++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 toolchains/linux_windows_arm64_llvm_mingw32.cmake diff --git a/.github/workflows/allInOne.yml b/.github/workflows/allInOne.yml index 1f19cc558..19859a2ac 100644 --- a/.github/workflows/allInOne.yml +++ b/.github/workflows/allInOne.yml @@ -4,6 +4,7 @@ on: [push] env: SWIG_VERSION: 4.0.2 + LLVM_MINGW_VERSION: 20260616 jobs: validate-gradle-wrapper: @@ -73,6 +74,14 @@ jobs: - name: Install MinGW-w64 if: runner.os == 'Linux' run: sudo apt-get install -y mingw-w64 + - name: Install llvm-mingw (Windows arm64 cross-compiler) + # Classic mingw-w64 (GCC) has no Windows/ARM64 target; only needed on the job + # that actually builds linux_windows_arm64_llvm_mingw32, see build.gradle. + if: runner.os == 'Linux' && runner.arch == 'X64' + run: | + curl -fL -o llvm-mingw.tar.xz "https://github.com/mstorsjo/llvm-mingw/releases/download/${{ env.LLVM_MINGW_VERSION }}/llvm-mingw-${{ env.LLVM_MINGW_VERSION }}-ucrt-ubuntu-22.04-x86_64.tar.xz" + tar xf llvm-mingw.tar.xz + echo "$PWD/llvm-mingw-${{ env.LLVM_MINGW_VERSION }}-ucrt-ubuntu-22.04-x86_64/bin" >> $GITHUB_PATH - name: Install pcre if: runner.os == 'macOS' run: brew install pcre diff --git a/build.gradle b/build.gradle index 22d17994e..266da5c8c 100644 --- a/build.gradle +++ b/build.gradle @@ -19,8 +19,10 @@ ext { // not reliably available when cross-compiling from an aarch64 host. natives = ["linux_aarch64_gcc"] } else { - // Cross-compilation with MinGW-w64 allows us to also build the Windows target on Linux - natives = ["linux_amd64_gcc","linux_windows_amd64_mingw32"] + // Cross-compilation with MinGW-w64 allows us to also build the Windows amd64 target + // on Linux, and with llvm-mingw (must be on PATH, see toolchains/linux_windows_arm64_llvm_mingw32.cmake) + // the Windows arm64 target too. + natives = ["linux_amd64_gcc","linux_windows_amd64_mingw32","linux_windows_arm64_llvm_mingw32"] } } else { throw new GradleException("This script only works on Linux or Mac") @@ -30,6 +32,7 @@ ext { "linux_amd64_gcc", "linux_aarch64_gcc", "linux_windows_amd64_mingw32", + "linux_windows_arm64_llvm_mingw32", "macosx_aarch64_clang", "macosx_amd64_clang" ] diff --git a/toolchains/linux_windows_arm64_llvm_mingw32.cmake b/toolchains/linux_windows_arm64_llvm_mingw32.cmake new file mode 100644 index 000000000..eac205a82 --- /dev/null +++ b/toolchains/linux_windows_arm64_llvm_mingw32.cmake @@ -0,0 +1,13 @@ +# the name of the target operating system +SET(CMAKE_SYSTEM_NAME Windows) +set ( CMAKE_SYSTEM_ARCH aarch64) + +# Classic mingw-w64 (GCC) has no Windows/ARM64 target; this uses the LLVM-based +# llvm-mingw toolchain instead (https://github.com/mstorsjo/llvm-mingw), which +# must be on PATH providing these compiler names. +set(COMPILER_PREFIX "aarch64-w64-mingw32") + +SET(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc) +SET(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++) + +set(CMAKE_CXX_FLAGS_RELEASE "-O3") From c3359c5bd429cc254e56111d5f8f7a1a460f5397 Mon Sep 17 00:00:00 2001 From: soloturn Date: Wed, 5 Aug 2026 19:35:07 +0200 Subject: [PATCH 9/9] fix(ci): pin JDK setup to 17 per review Gradle 9.6.1 only requires JDK 17-26 to run - 17 is the minimum LTS that satisfies it. Per BenjaminAmos's review suggestion on PR #23. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01PQriAKnoCEqcmFoSAvU39Q --- .github/workflows/allInOne.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/allInOne.yml b/.github/workflows/allInOne.yml index 19859a2ac..2c4fa746e 100644 --- a/.github/workflows/allInOne.yml +++ b/.github/workflows/allInOne.yml @@ -90,7 +90,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '25' + java-version: '17' distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 @@ -127,7 +127,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: '25' + java-version: '17' distribution: 'temurin' - name: Setup Gradle uses: gradle/actions/setup-gradle@v3