This is yet another workaround for hanging posix-cmake-test on Mac OS.
This enables parallel builds again, but uses Ninja build system instead
of Makefiles. Enabling parallel builds speeds up the build process and
releases Mac OS builders for other jobs sooner.
Additionally, fix incorrect apt invocations in CMake-related jobs. apt
is supposed to be used in interactive shells, and in scripts apt-get is
recommended. Also, apt-get update is needed before apt install, and
matrix.install must be transformed to a space-separated list. Also added
retries on network errors.
Properly set BUILD_JOBS environment variable in CMake-related jobs as
it is used in build and run steps. Without the variable being set, -j
without a number means "no limit on the number of jobs", which may
hit system resource limits and cause the job to fail.
Also, Mac OS seem to sometimes hang on too many parallel build jobs,
even if BUILD_JOBS is specified correctly. So disable parallel builds
for now.
Additionally, use GIT_FETCH_JOBS universally.
- Added clang-15 jobs.
- Added C++23 testing for gcc and clang on Linux.
- Updated clang version for UBSAN job.
- Removed clang-12 libc++ job - libc++ is now tested with clang-15.
- Updated Ubuntu version for clang jobs to avoid having to use external APT
repository.
- Updated python package installation for compatibility with Ubuntu 22.04.
In Ubuntu 20.04 there appeared an updated version of the
software-properties-common package in focal-updates, which ships a newer
apt-add-repository version that doesn't support -P/-S/-U command line arguments.
Since we cannot rely on package version checks to determine apt-add-repository
capabilities, we have to parse its --help output instead.
Also, made source list processing more protected against spaces.
Reworked extra package installation and added explicit specification
of external package sources. Moved some common constants to environment
variables. Removed installation of unneeded packages in the containers.
The Ubuntu 16.04 environment is scheduled to be removed from GitHub Actions
in September 2021. Migrate those jobs to Docker containers or Ubuntu 18.04.
Also, added some older compilers. Ported CMake tests from Travis CI.
Based on https://github.com/boostorg/core/pull/95.
Closes https://github.com/boostorg/core/pull/95.