CMake/Utilities/Release
Brad King 1f46bc299b ci: Extend packaging pipeline to sign Windows binaries automatically
Split packaging on Windows into dedicated jobs that run with access to
an EV signing certificate.

Prior to commit 0929221ca3 (gitlab-ci: Simplify Windows packaging
pipeline, 2023-02-28, v3.26.0-rc5~3^2~3) we had separate packaging jobs,
but they did not run in release packaging pipelines.  Restore them, and
run them in both nightly and release packaging pipelines.
2025-03-19 11:22:30 -04:00
..
linux LICENSE: Replace references to Copyright.txt with LICENSE.rst 2025-03-03 10:43:35 -05:00
macos Merge topic 'rel-macos-sign-notarize' 2022-07-08 12:16:23 -04:00
sunos Utilities/Release: Convert base images to build sunos-{x86_64,sparc64} 2025-02-27 16:35:09 -05:00
win ci: Extend packaging pipeline to sign Windows binaries automatically 2025-03-19 11:22:30 -04:00
WiX Style: Replace TABs with spaces for indentation in some files 2025-01-12 18:49:25 +04:00
.gitattributes Utilities/Release: Add docker specs to build and test Windows binaries 2020-05-05 14:56:26 -04:00
CMakeInstall.bmp BUG: Put back CMakeInstall.bmp in order to build a package with NSIS on Windows. It was inadvertently removed. 2007-09-06 17:47:47 -04:00
CMakeLogo.ico cmake-gui: Update icons 2018-08-16 11:56:08 -04:00
consolidate-relnotes.bash Utilities/Release: Add script to consolidate release notes 2017-06-02 14:18:34 -04:00
files-sign.bash Utilities/Release: Add script to generate a table of files 2021-04-05 13:43:51 -04:00
files-v1.json.in ci: Convert sunos packaging jobs to build sunos-{x86_64,sparc64} binaries 2025-02-27 16:35:09 -05:00
files-v1.rst ci: Convert sunos packaging jobs to build sunos-{x86_64,sparc64} binaries 2025-02-27 16:35:09 -05:00
files.bash Utilities/Release: Add script to generate a table of files 2021-04-05 13:43:51 -04:00
push.bash Utilities/Release: Teach "push" script to create destination subdirectory 2019-10-10 14:24:32 -04:00
README.rst Utilities/Release: Add base images to build sunos-{i386,sparc} binaries 2025-02-15 07:28:06 -05:00

CMake Release Utilities
***********************

This directory contains scripts used to package CMake itself for distribution
on ``cmake.org``.  See also the `CMake Source Code Guide`_.

.. _`CMake Source Code Guide`: ../../Help/dev/source.rst

File Table
----------

The set of package files distributed on ``cmake.org`` varies by CMake version.
Clients providing automatic download functionality may query the set of
package files available using a special file that lists them:

* `File Table v1`_ Documentation

.. _`File Table v1`: files-v1.rst

Docker
------

The ``<os>/<arch>/`` directories contain Docker specifications that anyone
may use to produce binaries for CMake on the following platforms:

* ``linux/x86_64/``: Linux on ``x86_64`` architectures.
* ``linux/aarch64/``: Linux on ``aarch64`` architectures.

Each ``<os>/<arch>/`` directory contains the following:

* ``<os>/<arch>/base/Dockerfile``:
  Produces a base image with a build environment for portable CMake binaries.
  This image is published in the `kitware/cmake Docker Hub Repository`_
  with tag ``build-<os>-<arch>-base-<date>``.

* ``<os>/<arch>/deps/Dockerfile``:
  Produces an image with custom-built dependencies for portable CMake binaries.
  This image is published in the `kitware/cmake Docker Hub Repository`_
  with tag ``build-<os>-<arch>-deps-<date>``.

* ``<os>/<arch>/Dockerfile``:
  Produce an image containing a portable CMake binary package.
  Build this image using the CMake source directory as the build context.
  The resulting image will have an ``/out`` directory
  containing the package.  For example, on Linux ``x86_64``:

  .. code-block:: console

    $ docker build --tag=cmake:build --network none \
        -f cmake-src/Utilities/Release/linux/x86_64/Dockerfile cmake-src
    $ docker container create --name cmake-build cmake:build
    $ docker cp cmake-build:/out .
    $ ls out/cmake-*-linux-x86_64.*

* ``<os>/<arch>/test/Dockerfile``:
  Produces a base image with a test environment for packaged CMake binaries.
  For example, on Linux ``x86_64``, one may build the test base image:

  .. code-block:: console

    $ docker build --tag=cmake:test-base \
        cmake-src/Utilities/Release/linux/x86_64/test

  Then create a local ``test/Dockerfile`` to prepare an image with both the
  CMake source tree and the above-built package::

    FROM cmake:test-base
    COPY cmake-src /opt/cmake/src/cmake
    ADD out/cmake-<ver>-linux-x86_64.tar.gz /opt/
    ENV PATH=/opt/cmake-<ver>-linux-x86_64/bin:$PATH

  Build the test image and run it to drive testing:

  .. code-block:: console

    $ docker build --tag cmake:test --network none -f test/Dockerfile .
    $ docker run --network none cmake:test bash test-make.bash
    $ docker run --network none cmake:test bash test-ninja.bash

.. _`kitware/cmake Docker Hub Repository`: https://hub.docker.com/r/kitware/cmake

SunOS
-----

The ``sunos/`` directory contains infrastructure to cross-compile
CMake binaries to SunOS from Linux hosts.

macOS
-----

The ``macos/`` directory contains scripts used to produce dependencies
for building CMake binaries on macOS.

Windows
-------

The ``win/`` directory contains scripts used to produce dependencies
for building CMake binaries on Windows.