2
0
mirror of https://github.com/boostorg/pfr.git synced 2026-01-19 04:22:13 +00:00

Harden the CI checks for CMake and fix some issues (#215)

Fixes: https://github.com/boostorg/pfr/issues/214
This commit is contained in:
Antony Polukhin
2025-06-27 20:23:23 +03:00
committed by GitHub
parent dcf2deb959
commit 8cbffcb7ab
4 changed files with 16 additions and 9 deletions

View File

@@ -83,7 +83,6 @@ jobs:
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools --git_args "--depth 10 --jobs 3" $LIBRARY python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools --git_args "--depth 10 --jobs 3" $LIBRARY
./bootstrap.sh ./bootstrap.sh
./b2 -d0 headers
./b2 variant=debug tools/inspect ./b2 variant=debug tools/inspect
- name: Run CMake tests - name: Run CMake tests
@@ -126,6 +125,7 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
cd ../boost-root cd ../boost-root
./b2 -d0 headers
./b2 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release "${{matrix.cxxflags}}" "${{matrix.linkflags}}" "${{matrix.launcher}}" ./b2 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release "${{matrix.cxxflags}}" "${{matrix.linkflags}}" "${{matrix.launcher}}"
dist/bin/inspect libs/$LIBRARY dist/bin/inspect libs/$LIBRARY
@@ -181,10 +181,11 @@ jobs:
addrmd: 64 addrmd: 64
os: windows-2022 os: windows-2022
threads: "-j1" threads: "-j1"
- toolset: clang-win # Fails with "Unexpected compiler version, expected Clang 19.0.0 or newer."
cxxstd: "14,17,2a,latest" # - toolset: clang-win
addrmd: 32,64 # cxxstd: "14,17,2a,latest"
os: windows-2022 # addrmd: 32,64
# os: windows-2022
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
@@ -211,7 +212,6 @@ jobs:
git submodule update --init --depth 10 --jobs 2 tools/boostdep git submodule update --init --depth 10 --jobs 2 tools/boostdep
python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools --git_args "--jobs 3" %LIBRARY% python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools --git_args "--jobs 3" %LIBRARY%
cmd /c bootstrap cmd /c bootstrap
b2 -d0 headers
- name: Run CMake tests - name: Run CMake tests
if: ${{matrix.toolset == 'msvc-14.3'}} if: ${{matrix.toolset == 'msvc-14.3'}}
@@ -264,6 +264,7 @@ jobs:
shell: cmd shell: cmd
run: | run: |
cd ../boost-root cd ../boost-root
b2 -d0 headers
b2 ${{matrix.threads}} libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release b2 ${{matrix.threads}} libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release
finish: finish:

View File

@@ -10,7 +10,7 @@ file(GLOB CORE_RUN_FILES "core/run/*.cpp")
foreach (testsourcefile ${CORE_RUN_FILES}) foreach (testsourcefile ${CORE_RUN_FILES})
get_filename_component(testname ${testsourcefile} NAME_WLE) get_filename_component(testname ${testsourcefile} NAME_WLE)
add_executable(pfr_core_${testname} ${testsourcefile}) add_executable(pfr_core_${testname} ${testsourcefile})
target_link_libraries(pfr_core_${testname} Boost::pfr Boost::core) target_link_libraries(pfr_core_${testname} Boost::pfr Boost::core Boost::container_hash)
target_include_directories(pfr_core_${testname} PRIVATE ../../../) target_include_directories(pfr_core_${testname} PRIVATE ../../../)
add_test(NAME pfr_core_${testname} COMMAND pfr_core_${testname}) add_test(NAME pfr_core_${testname} COMMAND pfr_core_${testname})
add_dependencies(tests pfr_core_${testname}) add_dependencies(tests pfr_core_${testname})
@@ -21,7 +21,7 @@ foreach (testsourcefile ${CORE_NAME_RUN_FILES})
get_filename_component(testname ${testsourcefile} NAME_WLE) get_filename_component(testname ${testsourcefile} NAME_WLE)
add_executable(pfr_corename_${testname} ${testsourcefile}) add_executable(pfr_corename_${testname} ${testsourcefile})
target_compile_features(pfr_corename_${testname} PUBLIC cxx_std_20) target_compile_features(pfr_corename_${testname} PUBLIC cxx_std_20)
target_link_libraries(pfr_corename_${testname} Boost::pfr Boost::core) target_link_libraries(pfr_corename_${testname} Boost::pfr Boost::core Boost::container_hash)
target_include_directories(pfr_corename_${testname} PRIVATE ../../../) target_include_directories(pfr_corename_${testname} PRIVATE ../../../)
add_test(NAME pfr_corename_${testname} COMMAND pfr_corename_${testname}) add_test(NAME pfr_corename_${testname} COMMAND pfr_corename_${testname})
add_dependencies(tests pfr_corename_${testname}) add_dependencies(tests pfr_corename_${testname})

View File

@@ -7,9 +7,15 @@ cmake_minimum_required(VERSION 3.5...4.0)
project(pfr_subdir_test LANGUAGES CXX) project(pfr_subdir_test LANGUAGES CXX)
add_subdirectory(../../../assert boostorg/assert) add_subdirectory(../../../assert boostorg/assert)
add_subdirectory(../../../container_hash boostorg/container_hash)
add_subdirectory(../../../core boostorg/core) add_subdirectory(../../../core boostorg/core)
add_subdirectory(../../../config boostorg/config) add_subdirectory(../../../config boostorg/config)
add_subdirectory(../../../detail boostorg/detail)
add_subdirectory(../../../describe boostorg/describe)
add_subdirectory(../../../integer boostorg/integer)
add_subdirectory(../../../mp11 boostorg/mp11)
add_subdirectory(../../../static_assert boostorg/static_assert) add_subdirectory(../../../static_assert boostorg/static_assert)
add_subdirectory(../../../throw_exception boostorg/throw_exception) add_subdirectory(../../../throw_exception boostorg/throw_exception)
add_subdirectory(../../../type_traits boostorg/type_traits)
add_subdirectory(../../ boostorg/pfr) add_subdirectory(../../ boostorg/pfr)

View File

@@ -14,7 +14,7 @@
#include <set> #include <set>
#include <string> #include <string>
#include <boost/functional/hash.hpp> #include <boost/container_hash/hash.hpp>
#include <unordered_set> #include <unordered_set>
struct adl_hash { struct adl_hash {