moar ci changes
This commit is contained in:
19 files changed
+1313
-663
No files matched your search
+60
-10
@@ -23,6 +23,7 @@ workflow:
|
||||
- docker/Dockerfile.build
|
||||
- scripts/download-mingw-arm64-qt.py
|
||||
- scripts/install-deps-ubuntu.sh
|
||||
- scripts/linux-arm64-toolchain.cmake
|
||||
- scripts/mingw-w64-toolchain.cmake
|
||||
- scripts/mingw-w64-arm64-toolchain.cmake
|
||||
variables:
|
||||
@@ -52,14 +53,14 @@ build-docker:
|
||||
- docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
|
||||
script:
|
||||
- docker build
|
||||
--build-arg QT_VERSION=6.10.3
|
||||
--build-arg QT_VERSION=6.12.0
|
||||
-t "${DOCKER_IMAGE}"
|
||||
-f docker/Dockerfile.build .
|
||||
- docker push "${DOCKER_IMAGE}"
|
||||
rules:
|
||||
- if: $CI_PIPELINE_TYPE == "image-rebuild"
|
||||
|
||||
# ── Linux native build ─────────────────────────────────────────────────────────
|
||||
# ── Linux native build (x86_64) ────────────────────────────────────────────────
|
||||
build-linux:
|
||||
interruptible: true
|
||||
tags:
|
||||
@@ -80,7 +81,31 @@ build-linux:
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Windows cross-compile build (MinGW-w64 x86_64) ───────────────────────────
|
||||
# ── Linux cross-compile build (ARM64) ──────────────────────────────────────────
|
||||
build-linux-arm64:
|
||||
interruptible: true
|
||||
tags:
|
||||
- linux-qt
|
||||
stage: build
|
||||
script:
|
||||
- cmake -B build-linux-arm64 -G Ninja
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_TOOLCHAIN_FILE="${CI_PROJECT_DIR}/scripts/linux-arm64-toolchain.cmake"
|
||||
-DCMAKE_PREFIX_PATH="${QT_LINUX_ARM64_DIR}"
|
||||
-DQT_HOST_PATH="${QT_LINUX_DIR}"
|
||||
- cmake --build build-linux-arm64 --target asteria-qt
|
||||
artifacts:
|
||||
name: "asteria-qt-linux-arm64-${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- build-linux-arm64/asteria-qt
|
||||
expire_in: 1 day
|
||||
when: on_success
|
||||
rules:
|
||||
- if: $CI_PIPELINE_TYPE == "image-rebuild"
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Windows cross-compile build (LLVM-MinGW x86_64) ───────────────────────────
|
||||
build-windows:
|
||||
interruptible: true
|
||||
tags:
|
||||
@@ -142,7 +167,7 @@ build-macos:
|
||||
- export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}"
|
||||
- export PKG_CONFIG_PATH="$(brew --prefix libarchive)/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
|
||||
- cmake -B build-macos -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_PREFIX_PATH="${QT_MACOS_DIR:-/opt/qt/6.10.3/macos}"
|
||||
-DCMAKE_PREFIX_PATH="${QT_MACOS_DIR:-/opt/qt/6.12.0/macos}"
|
||||
- cmake --build build-macos --target asteria-qt
|
||||
artifacts:
|
||||
name: "asteria-qt-macos-${CI_COMMIT_SHORT_SHA}"
|
||||
@@ -185,7 +210,7 @@ test-macos:
|
||||
- export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}"
|
||||
- export PKG_CONFIG_PATH="$(brew --prefix libarchive)/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
|
||||
- cmake -B build-macos -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_PREFIX_PATH="${QT_MACOS_DIR:-/opt/qt/6.10.3/macos}"
|
||||
-DCMAKE_PREFIX_PATH="${QT_MACOS_DIR:-/opt/qt/6.12.0/macos}"
|
||||
- cmake --build build-macos
|
||||
- QT_QPA_PLATFORM=offscreen ctest --test-dir build-macos --output-on-failure
|
||||
rules:
|
||||
@@ -193,7 +218,7 @@ test-macos:
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Package Linux as AppImage ─────────────────────────────────────────────
|
||||
# ── Package Linux x86_64 as AppImage ───────────────────────────────────────────
|
||||
package-linux:
|
||||
interruptible: true
|
||||
tags:
|
||||
@@ -204,7 +229,7 @@ package-linux:
|
||||
- test-linux
|
||||
script:
|
||||
- chmod +x packaging/package-linux.sh
|
||||
- packaging/package-linux.sh build-linux "${QT_LINUX_DIR}" .
|
||||
- packaging/package-linux.sh build-linux "${QT_LINUX_DIR}" . x86_64
|
||||
artifacts:
|
||||
name: "asteria-qt-linux-appimage-${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
@@ -216,6 +241,29 @@ package-linux:
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Package Linux ARM64 as AppImage ────────────────────────────────────────────
|
||||
package-linux-arm64:
|
||||
interruptible: true
|
||||
tags:
|
||||
- linux-qt
|
||||
stage: package
|
||||
needs:
|
||||
- build-linux-arm64
|
||||
- test-linux
|
||||
script:
|
||||
- chmod +x packaging/package-linux.sh
|
||||
- packaging/package-linux.sh build-linux-arm64 "${QT_LINUX_ARM64_DIR}" . arm64
|
||||
artifacts:
|
||||
name: "asteria-qt-linux-arm64-appimage-${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
- Asteria-arm64.AppImage
|
||||
expire_in: 1 day
|
||||
when: on_success
|
||||
rules:
|
||||
- if: $CI_PIPELINE_TYPE == "image-rebuild"
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Package Windows x86_64 as portable zip ───────────────────────────────────
|
||||
package-windows:
|
||||
interruptible: true
|
||||
@@ -276,7 +324,7 @@ package-macos:
|
||||
script:
|
||||
- export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}"
|
||||
- chmod +x packaging/package-macos.sh
|
||||
- packaging/package-macos.sh build-macos "${QT_MACOS_DIR:-/opt/qt/6.10.3/macos}" .
|
||||
- packaging/package-macos.sh build-macos "${QT_MACOS_DIR:-/opt/qt/6.12.0/macos}" .
|
||||
artifacts:
|
||||
name: "asteria-qt-macos-dmg-${CI_COMMIT_SHORT_SHA}"
|
||||
paths:
|
||||
@@ -295,6 +343,7 @@ update-wiki:
|
||||
- linux-qt
|
||||
needs:
|
||||
- package-linux
|
||||
- package-linux-arm64
|
||||
- package-windows
|
||||
- package-windows-arm64
|
||||
- job: package-macos
|
||||
@@ -310,6 +359,7 @@ update-wiki:
|
||||
- WIKI_URL="${API_URL}/wikis/home"
|
||||
- ARTIFACTS_URL="${PROJECT_URL}/-/jobs/artifacts/${CI_COMMIT_REF_NAME}/download"
|
||||
- LINUX_URL="${PROJECT_URL}/-/jobs/artifacts/${CI_COMMIT_REF_NAME}/raw/Asteria-x86_64.AppImage?job=package-linux"
|
||||
- LINUX_ARM64_URL="${PROJECT_URL}/-/jobs/artifacts/${CI_COMMIT_REF_NAME}/raw/Asteria-arm64.AppImage?job=package-linux-arm64"
|
||||
- WINDOWS_URL="${ARTIFACTS_URL}?job=package-windows"
|
||||
- WINDOWS_ARM64_URL="${ARTIFACTS_URL}?job=package-windows-arm64"
|
||||
- MACOS_URL="${PROJECT_URL}/-/jobs/artifacts/${CI_COMMIT_REF_NAME}/raw/Asteria.dmg?job=package-macos"
|
||||
@@ -318,9 +368,9 @@ update-wiki:
|
||||
--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) |\n| Windows (ARM64) | [Portable zip](%s) |\n| macOS | [DMG](%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| Linux (ARM64) | [AppImage](%s) |\n| Windows (x86_64) | [Portable zip](%s) |\n| Windows (ARM64) | [Portable zip](%s) |\n| macOS | [DMG](%s) |' \
|
||||
"${CI_PIPELINE_ID}" "${CI_PIPELINE_URL}" "${CI_COMMIT_REF_NAME}" "${CI_COMMIT_SHORT_SHA}" \
|
||||
"${LINUX_URL}" "${WINDOWS_URL}" "${WINDOWS_ARM64_URL}" "${MACOS_URL}")
|
||||
"${LINUX_URL}" "${LINUX_ARM64_URL}" "${WINDOWS_URL}" "${WINDOWS_ARM64_URL}" "${MACOS_URL}")
|
||||
|
||||
if [ "${HTTP_CODE}" = "200" ]; then
|
||||
WIKI_CONTENT=$(jq -r '.content' /tmp/wiki.json)
|
||||
|
||||
Reference in new issue
Block a user