Dockerfile 1.3 KB

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