| 1 |
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
| 2 |
# file LICENSE.rst or https://cmake.org/licensing for details. |
| 3 |
|
| 4 |
# Produce an image containing a portable CMake binary package for Linux/aarch64. |
| 5 |
# Build using the CMake source directory as the build context. |
| 6 |
# The resulting image will have an '/out' directory containing the package. |
| 7 |
|
| 8 |
# Keep this in sync with the `.gitlab/os-linux.yml` `.linux_release_aarch64` image. |
| 9 |
ARG FROM_IMAGE_NAME=kitware/cmake:build-linux-aarch64-deps-2026-01-13 |
| 10 |
ARG FROM_IMAGE_DIGEST=@sha256:7373fe775ea571a3113251b3e8b5857ef321f6e9b5dfa5963f6e44d062349244 |
| 11 |
ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST |
| 12 |
FROM $FROM_IMAGE |
| 13 |
|
| 14 |
COPY . /opt/cmake/src/cmake |
| 15 |
|
| 16 |
ARG TEST=true |
| 17 |
|
| 18 |
RUN : \ |
| 19 |
&& mkdir -p /opt/cmake/src/cmake-build \ |
| 20 |
&& cd /opt/cmake/src/cmake-build \ |
| 21 |
&& cp ../cmake/Utilities/Release/linux/aarch64/cache.txt CMakeCache.txt \ |
| 22 |
&& set -x \ |
| 23 |
&& ../cmake/bootstrap --parallel=$(nproc) --docdir=doc/cmake \ |
| 24 |
&& nice make -j $(nproc) \ |
| 25 |
&& if $TEST; then \ |
| 26 |
# Run tests that require the full build tree. |
| 27 |
bin/ctest --output-on-failure -j 8 -R '^(CMake\.|CMakeLib\.|RunCMake\.ctest_memcheck)'; \ |
| 28 |
fi \ |
| 29 |
&& bin/cpack -G TGZ \ |
| 30 |
&& bin/cpack -G STGZ \ |
| 31 |
&& set +x \ |
| 32 |
&& mkdir /out \ |
| 33 |
&& mv cmake-*-linux-aarch64.* /out \ |
| 34 |
&& : |