From: Peter Dimov (pdimov_at_[hidden])
Date: 2022-11-16 08:54:07


Mojca Miklavec wrote:
> Dear developers,
>
> For a CMake-based project we need to fetch Boost sources as part of the build
> process (unless boost is already installed, in which case that version can be
> used).
>
> We are using CMake's FetchContent that recursively clones the repository
> from GitHub, but that process is extremely slow. On the Windows runner in
> GitHub actions it takes roughly 3 extra minutes to "git clone" boost alone (or
> 11 minutes for something like "choco install boost-msvc-14.3"). I tried to fetch
> the .7z file instead, but that one doesn't work because the CMake support gets
> stripped from the distributed sources when generating the tarballs.
>
> A single file would result in a much faster and more reliable workflow. The file
> can be cached on GitHub Actions, on a local computer one doesn't need to
> repeatedly clone the repository (which also slows down other parts of CMake)
> etc.
>
> I started the discussion here:
> https://github.com/boostorg/release-tools/pull/35
> where it has been explained to me that:
> - either the CMake support needs to be heavily refactored (unlikely to happen
> soon)
> - or the project could generate one tarball using the layout that's consistent
> with git repository
>
> The second option might eventually be fulfilled automatically by GitHub, but
> that is probably not likely to happen any time soon either.
>
> I can imagine that creating one extra '.tar.xz' with a slightly different layout to
> support CMake builds might be straightforward to make.
>
> Is there any chance to fulfill my dream to be able to build a boost tarball with
> CMake out-of-the-box?

I have added a Github Action to the superproject that should generate tarballs
with submodules on every tag:

https://github.com/boostorg/boost/blob/master/.github/workflows/release.yml

We'll see how well this works once the beta is tagged. (We don't tag RCs.)