ci: add Windows on ARM64 cross-compilation and packaging jobs
- Add `build-windows-arm64` and `package-windows-arm64` stages to `.gitlab-ci.yml` and wire download links to wiki updates - Create `scripts/mingw-w64-arm64-toolchain.cmake` targeting `Windows` / `aarch64` with LLVM-MinGW - Update `docker/Dockerfile.build` with LLVM-MinGW toolchain, MSYS2 Qt 6.10 ARM64 packages, and ARM64 cross-compiled static libraries (libiconv, uchardet, zlib, minizip, libarchive) - Isolate GCC x86_64 and LLVM-MinGW ARM64 toolchains in `scripts/mingw-w64-toolchain.cmake` and PATH configuration - Refactor `packaging/package-windows.sh` to package both x86_64 and ARM64 runtime DLLs and support MSYS2 plugin/QML directory layouts - Update `scripts/test-ci-windows.sh` with `--arm64`, `--only-arm64`, `--image`, and local image detection - Guard `-mwindows` link flag with `if(MINGW)` in `CMakeLists.txt` - Document Windows ARM64 build targets and instructions in `AGENTS.md` and `README.md`
This commit is contained in:
9 files changed
+337
-72
No files matched your search
+56
-5
@@ -11,6 +11,8 @@ workflow:
|
||||
- changes:
|
||||
- docker/Dockerfile.build
|
||||
- scripts/install-deps-ubuntu.sh
|
||||
- scripts/mingw-w64-toolchain.cmake
|
||||
- scripts/mingw-w64-arm64-toolchain.cmake
|
||||
variables:
|
||||
CI_PIPELINE_TYPE: image-rebuild
|
||||
- variables:
|
||||
@@ -73,7 +75,7 @@ build-linux:
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Windows cross-compile build (MinGW-w64) ───────────────────────────────────
|
||||
# ── Windows cross-compile build (MinGW-w64 x86_64) ───────────────────────────
|
||||
build-windows:
|
||||
interruptible: true
|
||||
tags:
|
||||
@@ -98,6 +100,31 @@ build-windows:
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Windows cross-compile build (LLVM-MinGW ARM64) ────────────────────────────
|
||||
build-windows-arm64:
|
||||
interruptible: true
|
||||
tags:
|
||||
- linux-qt
|
||||
stage: build
|
||||
script:
|
||||
- PKG_CONFIG_PATH="${MINGW_ARM64_SYSROOT}/lib/pkgconfig" cmake -B build-windows-arm64 -G Ninja
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_TOOLCHAIN_FILE="${CI_PROJECT_DIR}/scripts/mingw-w64-arm64-toolchain.cmake"
|
||||
-DCMAKE_PREFIX_PATH="${QT_WINDOWS_ARM64_DIR};${MINGW_ARM64_SYSROOT}"
|
||||
-DCMAKE_FIND_ROOT_PATH="${QT_WINDOWS_ARM64_DIR};${MINGW_ARM64_SYSROOT}"
|
||||
-DQT_HOST_PATH="${QT_LINUX_DIR}"
|
||||
- cmake --build build-windows-arm64 --target asteria-qt
|
||||
artifacts:
|
||||
name: "asteria-qt-windows-arm64-${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- build-windows-arm64/asteria-qt.exe
|
||||
expire_in: 1 day
|
||||
when: on_success
|
||||
rules:
|
||||
- if: $CI_PIPELINE_TYPE == "image-rebuild"
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Linux tests ────────────────────────────────────────────────────────────────
|
||||
test-linux:
|
||||
interruptible: true
|
||||
@@ -137,7 +164,7 @@ package-linux:
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Package Windows as portable zip ──────────────────────────────────────────
|
||||
# ── Package Windows x86_64 as portable zip ───────────────────────────────────
|
||||
package-windows:
|
||||
interruptible: true
|
||||
tags:
|
||||
@@ -147,7 +174,7 @@ package-windows:
|
||||
- build-windows
|
||||
script:
|
||||
- chmod +x packaging/package-windows.sh
|
||||
- packaging/package-windows.sh build-windows "${QT_WINDOWS_DIR}" "${MINGW_SYSROOT}" .
|
||||
- packaging/package-windows.sh build-windows "${QT_WINDOWS_DIR}" "${MINGW_SYSROOT}" . x86_64
|
||||
artifacts:
|
||||
name: "asteria-qt-windows-${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
@@ -159,6 +186,28 @@ package-windows:
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Package Windows ARM64 as portable zip ─────────────────────────────────────
|
||||
package-windows-arm64:
|
||||
interruptible: true
|
||||
tags:
|
||||
- linux-qt
|
||||
stage: package
|
||||
needs:
|
||||
- build-windows-arm64
|
||||
script:
|
||||
- chmod +x packaging/package-windows.sh
|
||||
- packaging/package-windows.sh build-windows-arm64 "${QT_WINDOWS_ARM64_DIR}" "${MINGW_ARM64_SYSROOT}" . arm64
|
||||
artifacts:
|
||||
name: "asteria-qt-windows-arm64-${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- asteria-qt-windows-arm64/
|
||||
expire_in: 1 day
|
||||
when: on_success
|
||||
rules:
|
||||
- if: $CI_PIPELINE_TYPE == "image-rebuild"
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Update wiki with latest dev build links ────────────────────────────────────
|
||||
update-wiki:
|
||||
stage: wiki
|
||||
@@ -167,6 +216,7 @@ update-wiki:
|
||||
needs:
|
||||
- package-linux
|
||||
- package-windows
|
||||
- package-windows-arm64
|
||||
script:
|
||||
- |
|
||||
if [ -z "${GITLAB_TOKEN}" ]; then
|
||||
@@ -179,14 +229,15 @@ update-wiki:
|
||||
- ARTIFACTS_URL="${PROJECT_URL}/-/jobs/artifacts/${CI_COMMIT_REF_NAME}/download"
|
||||
- LINUX_URL="${ARTIFACTS_URL}?job=package-linux"
|
||||
- WINDOWS_URL="${ARTIFACTS_URL}?job=package-windows"
|
||||
- WINDOWS_ARM64_URL="${ARTIFACTS_URL}?job=package-windows-arm64"
|
||||
- |
|
||||
HTTP_CODE=$(curl -s -o /tmp/wiki.json -w '%{http_code}' \
|
||||
--header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" \
|
||||
"${WIKI_URL}")
|
||||
|
||||
NEW_SECTION=$(printf '## Latest dev builds\n\n> Updated automatically by pipeline [#%s](%s) from `%s` @ %s\n\n| Platform | Download |\n|----------|----------|\n| Linux (x86_64) | [AppImage](%s) |\n| Windows (x86_64) | [Portable zip](%s) |' \
|
||||
NEW_SECTION=$(printf '## Latest dev builds\n\n> Updated automatically by pipeline [#%s](%s) from `%s` @ %s\n\n| Platform | Download |\n|----------|----------|\n| Linux (x86_64) | [AppImage](%s) |\n| Windows (x86_64) | [Portable zip](%s) |\n| Windows (ARM64) | [Portable zip](%s) |' \
|
||||
"${CI_PIPELINE_ID}" "${CI_PIPELINE_URL}" "${CI_COMMIT_REF_NAME}" "${CI_COMMIT_SHORT_SHA}" \
|
||||
"${LINUX_URL}" "${WINDOWS_URL}")
|
||||
"${LINUX_URL}" "${WINDOWS_URL}" "${WINDOWS_ARM64_URL}")
|
||||
|
||||
if [ "${HTTP_CODE}" = "200" ]; then
|
||||
WIKI_CONTENT=$(jq -r '.content' /tmp/wiki.json)
|
||||
|
||||
Reference in new issue
Block a user