fix? build-windows

This commit is contained in:
Agel committed 2026-05-24 08:41:21 +02:00
1 parent fd751d6111
commit bb18197228
6 files changed
+58 -30

No files matched your search

+24 -11
View File
@@ -1,14 +1,23 @@
#!/bin/bash
# Run CI build/package jobs locally using podman or docker.
# Usage: test-ci-linux.sh
# Runs build-linux + package-linux jobs (matching .gitlab-ci.yml)
# Usage: test-ci-linux.sh [--build-image]
# --build-image build the CI image from Dockerfile instead of pulling the prebuilt one
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
OUTPUT_DIR="$PROJECT_DIR/ci-output"
DOCKERFILE="$PROJECT_DIR/docker/Dockerfile.build"
IMAGE_TAG="asteria-qt-ci-local:latest"
PREBUILT_IMAGE="registry.gitlab.com/asteria-bookreader/asteria-qt/build-env:latest"
IMAGE_TAG="$PREBUILT_IMAGE"
BUILD_IMAGE=false
for arg in "$@"; do
case "$arg" in
--build-image) BUILD_IMAGE=true; IMAGE_TAG="asteria-qt-ci-local:latest" ;;
*) echo "Unknown argument: $arg"; exit 1 ;;
esac
done
# Detect container runtime
if command -v podman &>/dev/null; then
@@ -21,14 +30,18 @@ else
fi
echo "Using container runtime: $RUNTIME"
# Build CI image
echo "==> Building CI image from $DOCKERFILE"
"$RUNTIME" build \
--platform linux/amd64 \
--build-arg QT_VERSION=6.10.3 \
-t "$IMAGE_TAG" \
-f "$DOCKERFILE" \
"$PROJECT_DIR"
if [ "$BUILD_IMAGE" = true ]; then
echo "==> Building CI image from $DOCKERFILE"
"$RUNTIME" build \
--platform linux/amd64 \
--build-arg QT_VERSION=6.10.3 \
-t "$IMAGE_TAG" \
-f "$DOCKERFILE" \
"$PROJECT_DIR"
else
echo "==> Pulling prebuilt CI image: $IMAGE_TAG"
"$RUNTIME" pull --platform linux/amd64 "$IMAGE_TAG"
fi
mkdir -p "$OUTPUT_DIR"