diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42430e9..8e7ab1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Main CI on: pull_request: @@ -382,114 +382,6 @@ jobs: PATH C:\Boost\bin;%PATH% cmake --build . --config Release && ctest --output-on-failure --no-tests=error -j 3 -C Release - BoostRoot: - strategy: - matrix: - enable_test: [ON, OFF] - cmake_version: [default, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 3.12.0, 3.13.0, 3.14.0, 3.16.0, 3.19.0, 3.31.0, 4.0.0, 4.1.0] - fail-fast: false - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Setup Boost - run: | - REF=${GITHUB_BASE_REF:-$GITHUB_REF} - REF=${REF#refs/heads/} - echo REF: $REF - BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - git submodule update --init --jobs 3 - rm -rf tools/cmake/* - cp -r $GITHUB_WORKSPACE/* tools/cmake - - name: Configure each library independently - working-directory: ../boost-root - if: matrix.cmake_version == 'default' - run: | - failed_libs="" - failed_outputs=() - for cml in libs/*/CMakeLists.txt; do - lib=$(dirname "${cml#*libs/}") - echo "=====================================================================" - echo "Building $lib" - echo "=====================================================================" - error=0 - out=$(cmake -DBUILD_TESTING=${{matrix.enable_test}} -DBOOST_INCLUDE_LIBRARIES=$lib -DBoost_DEBUG=ON -B "__build_$lib" . 2>&1) || error=1 - echo "$out" - echo; echo; echo - [[ "$out" != *"BOOST_INCLUDE_LIBRARIES has not been found"* ]] || error=1 - [[ "$out" != *"CMake Error"* ]] || error=1 - if ((error==1)); then - failed_libs+=" $lib" - failed_outputs+=( - "=====================================================================" - "Output of $lib" - "$out" - ) - fi - done - if [[ -n $failed_libs ]]; then - echo "Failed libraries: $failed_libs" - printf '%s\n' "${failed_outputs[@]}" - exit 1 - fi - - - name: Cache CMake - if: matrix.cmake_version != 'default' - id: cache-cmake - uses: actions/cache@v4 - with: - path: /tmp/cmake - key: ${{ runner.os }}-cmake-${{matrix.cmake_version}} - - - name: Install CMake dependencies - if: matrix.cmake_version != 'default' - run: sudo apt-get -o Acquire::Retries=3 -y -q --no-install-suggests --no-install-recommends install curl libcurl4-openssl-dev libarchive-dev - - - name: Build CMake - if: matrix.cmake_version != 'default' && steps.cache-cmake.outputs.cache-hit != 'true' - run: | - version=${{matrix.cmake_version}} - filename="cmake-$version.tar.gz" - cd "$(mktemp -d)" - wget https://cmake.org/files/v${version%.*}/$filename - tar -xf $filename --strip-components=1 - flags=( - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_PREFIX=/tmp/cmake" - "-B" "__build" - "-Wno-dev" # Make configuring more silent - "-DCMAKE_USE_SYSTEM_CURL=1" # Avoid failures caused by newer (system) OpenSSL in CMake < 3.10 - "-DCMAKE_CXX_FLAGS='-include cstdint -include limits'" # Fix missing includes in CMake < 3.10 - ) - cmake "${flags[@]}" . - cmake --build __build -- -j 3 - cmake --build __build --target install - - - name: Configure Boost with CMake ${{matrix.cmake_version}} - working-directory: ../boost-root - if: matrix.cmake_version != 'default' - run: | - version_greater_equal() { printf '%s\n' "$2" "$1" | sort --check=quiet --version-sort; } - excluded=() - for cml in "$PWD"/libs/*/CMakeLists.txt "$PWD"/libs/numeric/*/CMakeLists.txt; do - lib=$(dirname "${cml#*libs/}") - if minimal_cmake_version=$(grep "cmake_minimum_required" "$cml" | grep -Eo '[0-9]\.[0-9]+' | head -1); then - version_greater_equal ${{matrix.cmake_version}} "$minimal_cmake_version" || excluded+=("$lib") - else - echo "Minimum required CMake version not found in $cml for library $lib" - fi - done - # Libraries that don't declare their correct minimal required CMake version or where dependencies require higher version - version_greater_equal ${{matrix.cmake_version}} 3.12.0 || excluded+=("msm") - version_greater_equal ${{matrix.cmake_version}} 3.14.0 || excluded+=("pfr" "mysql") # mysql depends on pfr - /tmp/cmake/bin/cmake --version - /tmp/cmake/bin/cmake -DBUILD_TESTING=${{matrix.enable_test}} -DBOOST_EXCLUDE_LIBRARIES="$(IFS=';'; echo "${excluded[*]}")" -B "__build_cmake-$version" . - BoostTest: strategy: fail-fast: false diff --git a/.github/workflows/cmake_versions.yml b/.github/workflows/cmake_versions.yml new file mode 100644 index 0000000..e3084a8 --- /dev/null +++ b/.github/workflows/cmake_versions.yml @@ -0,0 +1,83 @@ +name: CMake Versions CI + +on: + pull_request: + push: + branches: + - master + - develop + - feature/** + +jobs: + posix: + strategy: + fail-fast: false + matrix: + enable_test: [ON, OFF] + cmake_version: [3.8.0, 3.9.0, 3.10.0, 3.11.0, 3.12.0, 3.13.0, 3.14.0, 3.16.0, 3.19.0, 3.31.0, 4.0.0, 4.1.0] + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup Boost + run: | + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + git submodule update --init --jobs 3 + rm -rf tools/cmake/* + cp -r $GITHUB_WORKSPACE/* tools/cmake + - name: Cache CMake + id: cache-cmake + uses: actions/cache@v4 + with: + path: /tmp/cmake + key: ${{ runner.os }}-cmake-${{matrix.cmake_version}} + + - name: Install CMake dependencies + run: sudo apt-get -o Acquire::Retries=3 -y -q --no-install-suggests --no-install-recommends install curl libcurl4-openssl-dev libarchive-dev + + - name: Build CMake + if: steps.cache-cmake.outputs.cache-hit != 'true' + run: | + version=${{matrix.cmake_version}} + filename="cmake-$version.tar.gz" + cd "$(mktemp -d)" + wget https://cmake.org/files/v${version%.*}/$filename + tar -xf $filename --strip-components=1 + flags=( + "-DCMAKE_BUILD_TYPE=Release" + "-DCMAKE_INSTALL_PREFIX=/tmp/cmake" + "-B" "__build" + "-Wno-dev" # Make configuring more silent + "-DCMAKE_USE_SYSTEM_CURL=1" # Avoid failures caused by newer (system) OpenSSL in CMake < 3.10 + "-DCMAKE_CXX_FLAGS='-include cstdint -include limits'" # Fix missing includes in CMake < 3.10 + ) + cmake "${flags[@]}" . + cmake --build __build -- -j 3 + cmake --build __build --target install + + - name: Configure Boost with CMake ${{matrix.cmake_version}} + working-directory: ../boost-root + run: | + version_greater_equal() { printf '%s\n' "$2" "$1" | sort --check=quiet --version-sort; } + excluded=() + for cml in "$PWD"/libs/*/CMakeLists.txt "$PWD"/libs/numeric/*/CMakeLists.txt; do + lib=$(dirname "${cml#*libs/}") + if minimal_cmake_version=$(grep "cmake_minimum_required" "$cml" | grep -Eo '[0-9]\.[0-9]+' | head -1); then + version_greater_equal ${{matrix.cmake_version}} "$minimal_cmake_version" || excluded+=("$lib") + else + echo "Minimum required CMake version not found in $cml for library $lib" + fi + done + # Libraries that don't declare their correct minimal required CMake version or where dependencies require higher version + version_greater_equal ${{matrix.cmake_version}} 3.12.0 || excluded+=("msm") + version_greater_equal ${{matrix.cmake_version}} 3.14.0 || excluded+=("pfr" "mysql") # mysql depends on pfr + /tmp/cmake/bin/cmake --version + /tmp/cmake/bin/cmake -DBUILD_TESTING=${{matrix.enable_test}} -DBOOST_EXCLUDE_LIBRARIES="$(IFS=';'; echo "${excluded[*]}")" -B "__build_cmake-$version" . diff --git a/.github/workflows/include_library.yml b/.github/workflows/include_library.yml new file mode 100644 index 0000000..b49296f --- /dev/null +++ b/.github/workflows/include_library.yml @@ -0,0 +1,224 @@ +name: Include Library CI + +on: + pull_request: + push: + branches: + - master + - develop + - feature/** + +jobs: + a-m: + strategy: + fail-fast: false + matrix: + library: + - accumulators + - algorithm + - align + - any + - array + - asio + - assert + - assign + - atomic + - beast + - bimap + - bind + - bloom + - callable_traits + - charconv + - chrono + - circular_buffer + - cobalt + - compat + - compute + - concept_check + - config + - container + - container_hash + - context + - contract + - conversion + - convert + - core + - coroutine + - coroutine2 + - crc + - date_time + - describe + - detail + - dll + - dynamic_bitset + - endian + - exception + - fiber + - filesystem + - flyweight + - foreach + - format + - function + - functional + - function_types + - fusion + - geometry + - gil + - graph + - graph_parallel + - hana + - hash2 + - headers + - heap + - histogram + - hof + - icl + - integer + - interprocess + - intrusive + - io + - iostreams + - iterator + - json + - lambda + - lambda2 + - leaf + - lexical_cast + - locale + - local_function + - lockfree + - log + - logic + - math + - metaparse + - move + - mp11 + - mpi + - mpl + - mqtt5 + - msm + - multiprecision + - multi_array + - multi_index + - mysql + + testing: [ON, OFF] + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup Boost + run: | + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + git submodule update --init --jobs 3 + rm -rf tools/cmake/* + cp -r $GITHUB_WORKSPACE/* tools/cmake + - name: Configure ${{matrix.library}} + working-directory: ../boost-root + run: cmake -DBUILD_TESTING=${{matrix.testing}} -DBOOST_INCLUDE_LIBRARIES=${{matrix.library}} -DBoost_DEBUG=ON -B __build__ + + n-z: + strategy: + fail-fast: false + matrix: + library: + - nowide + - numeric_conversion + - numeric_interval + - numeric_odeint + - numeric_ublas + - optional + - outcome + - parameter + - parameter_python + - parser + - pfr + - phoenix + - polygon + - poly_collection + - pool + - predef + - preprocessor + - process + - program_options + - property_map + - property_map_parallel + - property_tree + - proto + - ptr_container + - python + - qvm + - random + - range + - ratio + - rational + - redis + - regex + - safe_numerics + - scope + - scope_exit + - serialization + - signals2 + - smart_ptr + - sort + - spirit + - stacktrace + - statechart + - static_assert + - static_string + - stl_interfaces + - system + - test + - thread + - throw_exception + - timer + - tokenizer + - tti + - tuple + - typeof + - type_erasure + - type_index + - type_traits + - units + - unordered + - url + - utility + - uuid + - variant + - variant2 + - vmd + - wave + - winapi + - xpressive + - yap + + testing: [ON, OFF] + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup Boost + run: | + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH + cd .. + git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + cd boost-root + git submodule update --init --jobs 3 + rm -rf tools/cmake/* + cp -r $GITHUB_WORKSPACE/* tools/cmake + - name: Configure ${{matrix.library}} + working-directory: ../boost-root + run: cmake -DBUILD_TESTING=${{matrix.testing}} -DBOOST_INCLUDE_LIBRARIES=${{matrix.library}} -DBoost_DEBUG=ON -B __build__