Try to switch to personal shell runner
This commit is contained in:
3 files changed
+71
-27
No files matched your search
+39
-25
@@ -1,6 +1,18 @@
|
||||
workflow:
|
||||
auto_cancel:
|
||||
on_new_commit: interruptible
|
||||
rules:
|
||||
- if: $FORCE_REBUILD_IMAGE == "true"
|
||||
variables:
|
||||
CI_PIPELINE_TYPE: image-rebuild
|
||||
- changes:
|
||||
- docker/Dockerfile.build
|
||||
- scripts/mingw-w64-toolchain.cmake
|
||||
- scripts/install-deps-ubuntu.sh
|
||||
variables:
|
||||
CI_PIPELINE_TYPE: image-rebuild
|
||||
- variables:
|
||||
CI_PIPELINE_TYPE: normal
|
||||
|
||||
stages:
|
||||
- build
|
||||
@@ -9,9 +21,9 @@ stages:
|
||||
- wiki
|
||||
|
||||
variables:
|
||||
DOCKER_IMAGE: "${CI_REGISTRY_IMAGE}/build-env:latest"
|
||||
GIT_CLEAN_FLAGS: -fdx
|
||||
|
||||
# ── Build the custom Docker image (only when Dockerfile changes) ───────────────
|
||||
# ── Build the runner image and push to registry ────────────────────────────────
|
||||
build-docker:
|
||||
stage: build
|
||||
image: docker:27
|
||||
@@ -19,6 +31,7 @@ build-docker:
|
||||
- docker:27-dind
|
||||
variables:
|
||||
DOCKER_TLS_CERTDIR: "/certs"
|
||||
DOCKER_IMAGE: "${CI_REGISTRY_IMAGE}/build-env:latest"
|
||||
before_script:
|
||||
- docker login -u "${CI_REGISTRY_USER}" -p "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
|
||||
script:
|
||||
@@ -28,20 +41,12 @@ build-docker:
|
||||
-f docker/Dockerfile.build .
|
||||
- docker push "${DOCKER_IMAGE}"
|
||||
rules:
|
||||
- changes:
|
||||
- docker/Dockerfile.build
|
||||
- scripts/mingw-w64-toolchain.cmake
|
||||
- scripts/install-deps-ubuntu.sh
|
||||
- if: $FORCE_REBUILD_IMAGE == "true"
|
||||
- if: $CI_PIPELINE_TYPE == "image-rebuild"
|
||||
|
||||
# ── Linux native build ─────────────────────────────────────────────────────────
|
||||
build-linux:
|
||||
interruptible: true
|
||||
stage: build
|
||||
image: "${DOCKER_IMAGE}"
|
||||
needs:
|
||||
- job: build-docker
|
||||
optional: true
|
||||
script:
|
||||
- cmake -B build-linux -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_PREFIX_PATH="${QT_LINUX_DIR}"
|
||||
@@ -52,15 +57,15 @@ build-linux:
|
||||
- build-linux/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 (MinGW-w64) ───────────────────────────────────
|
||||
build-windows:
|
||||
interruptible: true
|
||||
stage: build
|
||||
image: "${DOCKER_IMAGE}"
|
||||
needs:
|
||||
- job: build-docker
|
||||
optional: true
|
||||
script:
|
||||
- PKG_CONFIG_PATH="${MINGW_SYSROOT}/lib/pkgconfig" cmake -B build-windows -G Ninja
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
@@ -75,26 +80,29 @@ build-windows:
|
||||
- build-windows/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
|
||||
stage: test
|
||||
image: "${DOCKER_IMAGE}"
|
||||
needs:
|
||||
- job: build-docker
|
||||
optional: true
|
||||
script:
|
||||
- cmake -B build-linux -G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_PREFIX_PATH="${QT_LINUX_DIR}"
|
||||
- cmake --build build-linux
|
||||
- QT_QPA_PLATFORM=offscreen ctest --test-dir build-linux --output-on-failure
|
||||
rules:
|
||||
- if: $CI_PIPELINE_TYPE == "image-rebuild"
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Package Linux as AppImage ─────────────────────────────────────────────
|
||||
package-linux:
|
||||
interruptible: true
|
||||
stage: package
|
||||
image: "${DOCKER_IMAGE}"
|
||||
needs:
|
||||
- build-linux
|
||||
- test-linux
|
||||
@@ -107,12 +115,15 @@ package-linux:
|
||||
- dist/*.AppImage
|
||||
expire_in: 1 day
|
||||
when: on_success
|
||||
rules:
|
||||
- if: $CI_PIPELINE_TYPE == "image-rebuild"
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
# ── Package Windows as portable zip ──────────────────────────────────────────
|
||||
package-windows:
|
||||
interruptible: true
|
||||
stage: package
|
||||
image: "${DOCKER_IMAGE}"
|
||||
needs:
|
||||
- build-windows
|
||||
script:
|
||||
@@ -124,16 +135,17 @@ package-windows:
|
||||
- asteria-qt-windows/
|
||||
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
|
||||
image: alpine:latest
|
||||
needs:
|
||||
- package-linux
|
||||
- package-windows
|
||||
before_script:
|
||||
- apk add --no-cache curl jq
|
||||
script:
|
||||
- |
|
||||
if [ -z "${GITLAB_TOKEN}" ]; then
|
||||
@@ -170,11 +182,13 @@ update-wiki:
|
||||
--header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" \
|
||||
--header "Content-Type: application/json" \
|
||||
--data "$(jq -n --arg c "${UPDATED}" '{content:$c}')" \
|
||||
"${WIKI_URL}"
|
||||
"${WIKI_URL}"
|
||||
else
|
||||
echo "ERROR: GitLab API returned HTTP ${HTTP_CODE}"
|
||||
cat /tmp/wiki.json
|
||||
exit 1
|
||||
fi
|
||||
rules:
|
||||
- if: $CI_PIPELINE_TYPE == "image-rebuild"
|
||||
when: never
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
Reference in new issue
Block a user