Asteria Qt CI / rebuild-images (linux-arm64) (push) Skipped
Asteria Qt CI / rebuild-images (linux-x86_64) (push) Skipped
Asteria Qt CI / rebuild-images (windows-arm64) (push) Skipped
Asteria Qt CI / rebuild-images (windows-x86_64) (push) Skipped
Asteria Qt CI / build-macos (push) Successful in 10s
Asteria Qt CI / test-macos (push) Successful in 39s
Asteria Qt CI / rebuild-images (linux-arm64) (pull_request) Skipped
Asteria Qt CI / rebuild-images (linux-x86_64) (pull_request) Skipped
Asteria Qt CI / rebuild-images (windows-arm64) (pull_request) Skipped
Asteria Qt CI / rebuild-images (windows-x86_64) (pull_request) Skipped
Asteria Qt CI / build-linux (push) Successful in 1m12s
Asteria Qt CI / build-linux (pull_request) Canceled after 0s
Asteria Qt CI / build-linux-arm64 (pull_request) Canceled after 0s
Asteria Qt CI / build-windows (pull_request) Canceled after 0s
Asteria Qt CI / build-windows-arm64 (pull_request) Canceled after 0s
Asteria Qt CI / build-macos (pull_request) Canceled after 0s
Asteria Qt CI / test-linux (pull_request) Canceled after 0s
Asteria Qt CI / test-macos (pull_request) Canceled after 0s
Asteria Qt CI / package-linux (pull_request) Canceled after 0s
Asteria Qt CI / package-linux-arm64 (pull_request) Canceled after 0s
Asteria Qt CI / package-windows (pull_request) Canceled after 0s
Asteria Qt CI / package-windows-arm64 (pull_request) Canceled after 0s
Asteria Qt CI / package-macos (pull_request) Canceled after 0s
Asteria Qt CI / release (pull_request) Canceled after 0s
Asteria Qt CI / build-site-image (pull_request) Canceled after 0s
Asteria Qt CI / package-windows (push) Successful in 23s
Asteria Qt CI / build-windows-arm64 (push) Successful in 1m29s
Asteria Qt CI / build-windows (push) Successful in 1m29s
Asteria Qt CI / build-linux-arm64 (push) Successful in 1m31s
Asteria Qt CI / package-windows-arm64 (push) Successful in 19s
Asteria Qt CI / package-macos (push) Successful in 56s
Asteria Qt CI / test-linux (push) Successful in 3m20s
Asteria Qt CI / package-linux-arm64 (push) Successful in 17s
Asteria Qt CI / package-linux (push) Successful in 17s
Asteria Qt CI / release (push) Skipped
Asteria Qt CI / build-site-image (push) Skipped
Instead of linking to ephemeral CI artifacts on a wiki, package each
master release's built binaries into a self-contained Nginx static site
container (`gitea.agel.dev/asteria/site:latest` and `:<version>`) via a
new `build-site-image` job in Gitea Actions.
Because the unprivileged `kaniko-builder` runner has no Node.js runtime
for artifact actions, the multi-stage `Dockerfile.site` fetches the
just-published `v<version>` release assets (permission-preserving Linux
`.AppImage.tar.gz` archives, Windows portable `.zip` packages, and
optional macOS `.dmg`) from the Gitea Release API inside a throwaway
Python builder stage and strips the temporary token file before copying
the static output into `nginx:1.27-alpine`.
HTML, CSS, and JS are kept as standalone static files under `site/`
with `{{PLACEHOLDER}}` tokens substituted by `generate-static-site.py`
alongside generated `manifest.json` and `downloads/SHA256SUMS`, allowing
the page layout and styling to be edited independently of the build
script.
215 lines
8.8 KiB
INI
215 lines
8.8 KiB
INI
# Multi-stage CI runner images for asteria-qt (all sharing the `base` layer).
|
|
# Targets:
|
|
# - linux-x86_64 : Native Linux x86_64 build, CTest, AppImage packaging, and release jobs
|
|
# - linux-arm64 : Cross-compiled Linux ARM64 build and AppImage packaging
|
|
# - windows-x86_64 : Cross-compiled Windows x86_64 build and portable zip packaging
|
|
# - windows-arm64 : Cross-compiled Windows ARM64 build and portable zip packaging
|
|
|
|
FROM ubuntu:24.04 AS base
|
|
|
|
ARG QT_VERSION=6.12.0
|
|
ARG QT_INSTALL_DIR=/opt/qt
|
|
ARG ACT_RUNNER_VERSION=0.2.11
|
|
ARG NODE_VERSION=20.18.1
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV QT_VERSION=${QT_VERSION}
|
|
ENV QT_INSTALL_DIR=${QT_INSTALL_DIR}
|
|
ENV QT_LINUX_DIR=${QT_INSTALL_DIR}/${QT_VERSION}/gcc_64
|
|
ENV PATH="/opt/node/bin:${PATH}"
|
|
|
|
# ── Core CLI tools and Qt host runtime libs ────────────────────────────────────
|
|
RUN apt-get update -qq && \
|
|
apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
cmake \
|
|
curl \
|
|
file \
|
|
git \
|
|
jq \
|
|
libdbus-1-3 \
|
|
libegl1 \
|
|
libfontconfig1 \
|
|
libfreetype6 \
|
|
libgl1 \
|
|
libglib2.0-0t64 \
|
|
libxkbcommon0 \
|
|
ninja-build \
|
|
pkg-config \
|
|
python3 \
|
|
python3-venv \
|
|
unzip \
|
|
wget \
|
|
xz-utils \
|
|
zip \
|
|
zstd \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# ── Host Qt 6 (split into compact layers for reliable registry pushes) ──────────
|
|
RUN python3 -m venv /tmp/aqt-venv && \
|
|
/tmp/aqt-venv/bin/pip install --quiet aqtinstall && \
|
|
/tmp/aqt-venv/bin/aqt install-qt linux desktop "${QT_VERSION}" linux_gcc_64 \
|
|
--archives qtbase icu --outputdir "${QT_INSTALL_DIR}" && \
|
|
rm -rf /tmp/aqt-venv
|
|
|
|
RUN python3 -m venv /tmp/aqt-venv && \
|
|
/tmp/aqt-venv/bin/pip install --quiet aqtinstall && \
|
|
/tmp/aqt-venv/bin/aqt install-qt linux desktop "${QT_VERSION}" linux_gcc_64 \
|
|
-m qtimageformats --archives qtdeclarative qtsvg qttools qtwayland \
|
|
--outputdir "${QT_INSTALL_DIR}" && \
|
|
rm -rf /tmp/aqt-venv \
|
|
"${QT_LINUX_DIR}/doc" \
|
|
"${QT_LINUX_DIR}/examples" \
|
|
"${QT_LINUX_DIR}/sbom" \
|
|
"${QT_LINUX_DIR}/phrasebooks" \
|
|
"${QT_LINUX_DIR}/bin/qmlls" \
|
|
"${QT_LINUX_DIR}/lib/libQt6QmlLS.a" \
|
|
"${QT_LINUX_DIR}/lib/libQt6QmlDom.a"
|
|
|
|
# ── Node.js (required by Gitea/GitHub JS actions such as checkout/artifacts) ───
|
|
RUN curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" \
|
|
-o /tmp/node.tar.xz && \
|
|
mkdir -p /opt/node && \
|
|
tar -xJf /tmp/node.tar.xz -C /opt/node --strip-components=1 && \
|
|
rm -f /tmp/node.tar.xz && \
|
|
node --version
|
|
|
|
# ── Gitea act_runner (host/shell mode) ─────────────────────────────────────────
|
|
RUN wget -q "https://dl.gitea.com/act_runner/${ACT_RUNNER_VERSION}/act_runner-${ACT_RUNNER_VERSION}-linux-amd64" \
|
|
-O /usr/local/bin/act_runner && \
|
|
chmod +x /usr/local/bin/act_runner && \
|
|
mkdir -p /data /builds && \
|
|
chmod 777 /data /builds
|
|
|
|
COPY docker/entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
WORKDIR /data
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD []
|
|
|
|
|
|
# ==============================================================================
|
|
# Shared Linux packaging layer (patchelf + binutils/readelf + appimagetool)
|
|
# ==============================================================================
|
|
FROM base AS linux-base
|
|
|
|
# Note: Zeroing AppImage magic bytes 8-10 allows extraction under both native Linux and Rosetta 2
|
|
RUN apt-get update -qq && \
|
|
apt-get install -y --no-install-recommends binutils patchelf && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
mkdir -p /opt/appimage && \
|
|
wget -q https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage \
|
|
-O /tmp/appimagetool && \
|
|
chmod +x /tmp/appimagetool && \
|
|
printf '\000\000\000' | dd of=/tmp/appimagetool bs=1 seek=8 count=3 conv=notrunc && \
|
|
cd /tmp && /tmp/appimagetool --appimage-extract && \
|
|
mv squashfs-root /opt/appimagetool && \
|
|
ln -sf /opt/appimagetool/AppRun /usr/local/bin/appimagetool && \
|
|
rm /tmp/appimagetool
|
|
|
|
|
|
# ==============================================================================
|
|
# Target 1: Linux x86_64 (native build, CTest, AppImage, release)
|
|
# ==============================================================================
|
|
FROM linux-base AS linux-x86_64
|
|
|
|
COPY scripts/install-deps-ubuntu.sh /tmp/install-deps-ubuntu.sh
|
|
RUN chmod +x /tmp/install-deps-ubuntu.sh && \
|
|
QT_VERSION=${QT_VERSION} QT_INSTALL_DIR=${QT_INSTALL_DIR} \
|
|
/tmp/install-deps-ubuntu.sh --skip-qt && \
|
|
rm -rf /tmp/install-deps-ubuntu.sh /var/lib/apt/lists/* && \
|
|
wget -q https://github.com/AppImage/type2-runtime/releases/download/continuous/runtime-x86_64 \
|
|
-O /opt/appimage/runtime-x86_64 && \
|
|
chmod +x /opt/appimage/runtime-x86_64 && \
|
|
g++ --version
|
|
|
|
|
|
# ==============================================================================
|
|
# Target 2: Linux ARM64 (aarch64 cross-compile + AppImage)
|
|
# ==============================================================================
|
|
FROM linux-base AS linux-arm64
|
|
|
|
ENV QT_LINUX_ARM64_DIR=${QT_INSTALL_DIR}/${QT_VERSION}/gcc_arm64
|
|
|
|
COPY scripts/install-deps-ubuntu.sh /tmp/install-deps-ubuntu.sh
|
|
RUN chmod +x /tmp/install-deps-ubuntu.sh && \
|
|
QT_VERSION=${QT_VERSION} QT_INSTALL_DIR=${QT_INSTALL_DIR} \
|
|
/tmp/install-deps-ubuntu.sh --only-arm64 && \
|
|
rm -rf /tmp/install-deps-ubuntu.sh /var/lib/apt/lists/* \
|
|
"${QT_LINUX_ARM64_DIR}/doc" \
|
|
"${QT_LINUX_ARM64_DIR}/examples" && \
|
|
wget -q https://github.com/AppImage/type2-runtime/releases/download/continuous/runtime-aarch64 \
|
|
-O /opt/appimage/runtime-aarch64 && \
|
|
chmod +x /opt/appimage/runtime-aarch64
|
|
|
|
COPY scripts/linux-arm64-toolchain.cmake /opt/linux-arm64-toolchain.cmake
|
|
|
|
|
|
# ==============================================================================
|
|
# Shared Windows cross-compilation base (llvm-mingw pruned to 64-bit targets)
|
|
# ==============================================================================
|
|
FROM base AS windows-base
|
|
|
|
ARG LLVM_MINGW_VERSION=20240917
|
|
|
|
RUN wget -q https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_VERSION}/llvm-mingw-${LLVM_MINGW_VERSION}-ucrt-ubuntu-20.04-x86_64.tar.xz \
|
|
-O /tmp/llvm-mingw.tar.xz && \
|
|
tar -xf /tmp/llvm-mingw.tar.xz -C /opt && \
|
|
mv /opt/llvm-mingw-${LLVM_MINGW_VERSION}-ucrt-ubuntu-20.04-x86_64 /opt/llvm-mingw && \
|
|
rm -rf /tmp/llvm-mingw.tar.xz \
|
|
/opt/llvm-mingw/i686-w64-mingw32 \
|
|
/opt/llvm-mingw/armv7-w64-mingw32 \
|
|
/opt/llvm-mingw/bin/i686-* \
|
|
/opt/llvm-mingw/bin/armv7-*
|
|
|
|
ENV PATH="/opt/llvm-mingw/bin:${PATH}"
|
|
|
|
|
|
# ==============================================================================
|
|
# Target 3: Windows x86_64 (LLVM-MinGW + MSYS2 clang64 Qt 6)
|
|
# ==============================================================================
|
|
FROM windows-base AS windows-x86_64
|
|
|
|
ENV QT_WINDOWS_DIR=${QT_INSTALL_DIR}/${QT_VERSION}/mingw_64
|
|
ENV MINGW_SYSROOT=${QT_WINDOWS_DIR}
|
|
|
|
COPY scripts/download-mingw-arm64-qt.py /tmp/download-mingw-arm64-qt.py
|
|
RUN chmod +x /tmp/download-mingw-arm64-qt.py && \
|
|
python3 /tmp/download-mingw-arm64-qt.py --arch x86_64 --dest "${QT_WINDOWS_DIR}" && \
|
|
rm -rf \
|
|
"${QT_WINDOWS_DIR}/share/doc" \
|
|
"${QT_WINDOWS_DIR}/share/man" \
|
|
"${QT_WINDOWS_DIR}/share/info" \
|
|
"${QT_WINDOWS_DIR}/share/qt6/doc" \
|
|
"${QT_WINDOWS_DIR}/share/qt6/examples" && \
|
|
ln -sfn "${QT_WINDOWS_DIR}" /opt/mingw-sysroot && \
|
|
rm /tmp/download-mingw-arm64-qt.py && \
|
|
x86_64-w64-mingw32-g++ --version
|
|
|
|
COPY scripts/mingw-w64-toolchain.cmake /opt/mingw-w64-toolchain.cmake
|
|
|
|
|
|
# ==============================================================================
|
|
# Target 4: Windows ARM64 (LLVM-MinGW + MSYS2 clangarm64 Qt 6)
|
|
# ==============================================================================
|
|
FROM windows-base AS windows-arm64
|
|
|
|
ENV QT_WINDOWS_ARM64_DIR=${QT_INSTALL_DIR}/${QT_VERSION}/mingw_arm64
|
|
ENV MINGW_ARM64_SYSROOT=${QT_WINDOWS_ARM64_DIR}
|
|
|
|
COPY scripts/download-mingw-arm64-qt.py /tmp/download-mingw-arm64-qt.py
|
|
RUN chmod +x /tmp/download-mingw-arm64-qt.py && \
|
|
python3 /tmp/download-mingw-arm64-qt.py --arch arm64 --dest "${QT_WINDOWS_ARM64_DIR}" && \
|
|
rm -rf \
|
|
"${QT_WINDOWS_ARM64_DIR}/share/doc" \
|
|
"${QT_WINDOWS_ARM64_DIR}/share/man" \
|
|
"${QT_WINDOWS_ARM64_DIR}/share/info" \
|
|
"${QT_WINDOWS_ARM64_DIR}/share/qt6/doc" \
|
|
"${QT_WINDOWS_ARM64_DIR}/share/qt6/examples" && \
|
|
ln -sfn "${QT_WINDOWS_ARM64_DIR}" /opt/mingw-arm64-sysroot && \
|
|
rm /tmp/download-mingw-arm64-qt.py && \
|
|
aarch64-w64-mingw32-g++ --version
|
|
|
|
COPY scripts/mingw-w64-arm64-toolchain.cmake /opt/mingw-w64-arm64-toolchain.cmake
|