- Cross toolchains: llvm-mingw-aarch64 (Windows ARM64; SDL3 staged from MSYS2's clangarm64 repo since SDL ships no MinGW ARM64 dev package) and clang-aarch64-linux-gnu (Linux ARM64; arm64 libc++/SDL3 via dpkg multiarch). - Distro images: Dockerfile.linux-arm64, Dockerfile.win-arm64, Dockerfile.debian and Dockerfile.debian-arm64 (Debian 13 with upstream CMake, whose 3.31 gate cannot enable import std). - Packaging via CPack: .deb for Ubuntu 26.04 and Debian 13 on amd64 and arm64 (dependencies derived by dpkg-shlibdeps), portable .zip/.tar.gz, and a Windows .msi built with wixl (msitools) straight from the Linux cross image. wixl 0.106 lacks arm64, so Windows/ARM64 ships the portable zip only. - CMake: parameterize the SDL3 MinGW triple, add install() + CPack config. - CI: build/package jobs for both arm64 targets and both Debian packages; existing Linux/Windows jobs now also emit the .deb / .zip + .msi. - scripts/: build-linux-arm64, build-windows-arm64, build-debian, build-debian-arm64.
87 lines
2.9 KiB
Docker
87 lines
2.9 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
# Debian build environment for Linux on ARM64 (aarch64-linux-gnu), producing an
|
|
# arm64 .deb. Cross-compiled from amd64 with Debian's clang-19 + libc++-19 and
|
|
# the arm64 packages installed via dpkg multiarch.
|
|
|
|
FROM debian:stable AS dev
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
ARG APT_MIRROR=""
|
|
RUN if [ -n "$APT_MIRROR" ]; then \
|
|
sed -i -e "s|http://deb.debian.org/debian|${APT_MIRROR}|g" \
|
|
-e "s|http://security.debian.org/debian-security|${APT_MIRROR}|g" \
|
|
/etc/apt/sources.list /etc/apt/sources.list.d/*.sources 2>/dev/null || true; \
|
|
fi
|
|
|
|
RUN dpkg --add-architecture arm64
|
|
|
|
RUN --mount=type=cache,target=/var/lib/apt,sharing=locked \
|
|
--mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
for attempt in 1 2 3 4 5; do \
|
|
apt-get -o Acquire::Retries=5 update && break; \
|
|
echo "apt-get update failed (attempt $attempt), retrying"; \
|
|
sleep 5; \
|
|
done \
|
|
&& apt-get -o Acquire::Retries=5 install -y --no-install-recommends \
|
|
ca-certificates \
|
|
clang-19 \
|
|
clang-tools-19 \
|
|
curl \
|
|
dpkg-dev \
|
|
file \
|
|
gcc-aarch64-linux-gnu \
|
|
libc++-19-dev:arm64 \
|
|
libc++abi-19-dev:arm64 \
|
|
libsdl3-dev:arm64 \
|
|
libunwind-19-dev:arm64 \
|
|
lld-19 \
|
|
ninja-build \
|
|
pkg-config \
|
|
python3 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ARG CMAKE_VERSION=4.2.3
|
|
RUN mkdir -p /opt/cmake \
|
|
&& curl -fL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz" \
|
|
| tar -xz -C /opt/cmake --strip-components=1
|
|
ENV PATH="/opt/cmake/bin:${PATH}"
|
|
|
|
ENV CC=clang-19
|
|
ENV CXX=clang++-19
|
|
# Point pkg-config at the arm64 packages so SDL3 resolves to the aarch64 build.
|
|
ENV PKG_CONFIG_LIBDIR=/usr/lib/aarch64-linux-gnu/pkgconfig
|
|
|
|
WORKDIR /work
|
|
COPY . .
|
|
|
|
RUN cmake -S . -B build/debian-arm64 -G Ninja \
|
|
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/clang-aarch64-linux-gnu.cmake \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DOPENRA3_AARCH64_CC=clang-19 \
|
|
-DOPENRA3_AARCH64_CXX=clang++-19 \
|
|
-DOPENRA3_AARCH64_STDLIB_MODULES_JSON=/usr/lib/llvm-19/lib/libc++.modules.json \
|
|
-DOPENRA3_DISTRO_TAG=debian13 \
|
|
&& cmake --build build/debian-arm64 -j \
|
|
&& (cd build/debian-arm64 && cpack -G DEB)
|
|
|
|
FROM --platform=linux/arm64 debian:stable AS deploy
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN --mount=type=cache,target=/var/lib/apt,sharing=locked \
|
|
--mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
apt-get -o Acquire::Retries=5 update \
|
|
&& apt-get -o Acquire::Retries=5 install -y --no-install-recommends \
|
|
libc++1-19 \
|
|
libc++abi1-19 \
|
|
libsdl3-0 \
|
|
libvulkan1 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
COPY --from=dev /work/build/debian-arm64/bin/openra3 /app/openra3
|
|
|
|
ENTRYPOINT ["/app/openra3"]
|