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

Fix CI tests and docs build (#211)

Fixes https://github.com/boostorg/pfr/issues/203
This commit is contained in:
Antony Polukhin
2025-06-19 18:36:45 +03:00
committed by GitHub
parent 7259e35f71
commit 2e3663d0df
3 changed files with 14 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ jobs:
- toolset: gcc-14 # Do not remove! It is the only toolset that tests CMake tests down below - toolset: gcc-14 # Do not remove! It is the only toolset that tests CMake tests down below
cxxstd: "03,11,14,17,20" cxxstd: "03,11,14,17,20"
os: ubuntu-24.04 os: ubuntu-24.04
- toolset: gcc-12 # Do not remove! It is the only toolset that tests misc/strip_boost_namespace.sh - toolset: gcc-12
cxxstd: "03,11,14,17,2a" cxxstd: "03,11,14,17,2a"
os: ubuntu-22.04 os: ubuntu-22.04
cxxflags: "cxxflags=--coverage -fsanitize=address,leak,undefined -fno-sanitize-recover=undefined" cxxflags: "cxxflags=--coverage -fsanitize=address,leak,undefined -fno-sanitize-recover=undefined"
@@ -47,7 +47,7 @@ jobs:
- toolset: clang-15 - toolset: clang-15
cxxstd: "03,11,14,17,20" cxxstd: "03,11,14,17,20"
os: ubuntu-22.04 os: ubuntu-22.04
- toolset: clang-19 - toolset: clang-19 # tests misc/strip_boost_namespace.sh and modules
cxxstd: "20,23" cxxstd: "20,23"
os: ubuntu-24.04 os: ubuntu-24.04
install: clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19 install: clang-19 llvm-19 libclang-rt-19-dev libc++-19-dev libc++abi-19-dev clang-tools-19
@@ -130,7 +130,7 @@ jobs:
dist/bin/inspect libs/$LIBRARY dist/bin/inspect libs/$LIBRARY
- name: Test boost namespace stripping - name: Test boost namespace stripping
if: ${{matrix.toolset == 'gcc-12'}} if: ${{matrix.toolset == 'clang-19'}}
run: ../boost-root/libs/$LIBRARY/misc/strip_boost_namespace.sh run: ../boost-root/libs/$LIBRARY/misc/strip_boost_namespace.sh
- name: Prepare coverage data - name: Prepare coverage data

View File

@@ -55,9 +55,8 @@ boostbook pfr-doc
pfr.qbk pfr.qbk
: :
<dependency>autodoc_pfr <dependency>autodoc_pfr
<xsl:param>boost.root=https://www.boost.org/doc/libs/1_81_0 #<xsl:param>boost.root=https://www.boost.org/doc/libs/1_88_0
#<xsl:param>boost.root=../../../. <xsl:param>boost.root=../../../..
<xml:param>html.stylesheet=../../../../doc/src/boostbook.css
; ;
############################################################################### ###############################################################################

View File

@@ -5,6 +5,8 @@
# Distributed under the Boost Software License, Version 1.0. (See accompanying # Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
PFR_TEST_COMPILER=clang++-19
echo "***** Making target path" echo "***** Making target path"
TARGET_PATH="`dirname \"$0\"`/../../pfr_non_boost" TARGET_PATH="`dirname \"$0\"`/../../pfr_non_boost"
rm -rf ${TARGET_PATH}/* rm -rf ${TARGET_PATH}/*
@@ -50,40 +52,40 @@ find ${TARGET_PATH}/doc -type f | xargs sed -i \
sed -i 's|# \[Boost.PFR\](https://boost.org/libs/pfr)|# [PFR](https://apolukhin.github.io/pfr_non_boost/)|g' ${TARGET_PATH}/README.md sed -i 's|# \[Boost.PFR\](https://boost.org/libs/pfr)|# [PFR](https://apolukhin.github.io/pfr_non_boost/)|g' ${TARGET_PATH}/README.md
echo -n "***** Testing: " echo -n "***** Testing: "
if g++-12 -std=c++2a -DPFR_ENABLE_GET_NAME_STATIC=1 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then if ${PFR_TEST_COMPILER} -std=c++2a -DPFR_ENABLE_GET_NAME_STATIC=1 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then
echo -n "OK" echo -n "OK"
else else
echo -n "FAIL" echo -n "FAIL"
exit 2 exit 2
fi fi
if g++-12 -std=c++2a -DPFR_ENABLE_GET_NAME_STATIC=0 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then if ${PFR_TEST_COMPILER} -std=c++2a -DPFR_ENABLE_GET_NAME_STATIC=0 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then
echo -n ", OK" echo -n ", OK"
else else
echo -n ", FAIL" echo -n ", FAIL"
exit 3 exit 3
fi fi
if g++-12 -std=c++2a -DPFR_ENABLE_GET_NAME_STATIC=1 -DBOOST_PFR_USE_CPP17=1 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/get_name.cpp && ./a.out > /dev/null; then if ${PFR_TEST_COMPILER} -std=c++2a -DPFR_ENABLE_GET_NAME_STATIC=1 -DBOOST_PFR_USE_CPP17=1 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/get_name.cpp && ./a.out > /dev/null; then
echo -n ", OK" echo -n ", OK"
else else
echo -n ", FAIL" echo -n ", FAIL"
exit 4 exit 4
fi fi
if g++-12 -std=c++2a -DPFR_USE_LOOPHOLE=0 -DPFR_USE_CPP17=1 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then if ${PFR_TEST_COMPILER} -std=c++2a -DPFR_USE_LOOPHOLE=0 -DPFR_USE_CPP17=1 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then
echo -n ", OK" echo -n ", OK"
else else
echo -n ", FAIL" echo -n ", FAIL"
exit 5 exit 5
fi fi
if g++-12 -std=c++2a -DPFR_USE_LOOPHOLE=1 -DPFR_USE_CPP17=0 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then if ${PFR_TEST_COMPILER} -std=c++2a -DPFR_USE_LOOPHOLE=1 -DPFR_USE_CPP17=0 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/motivating_example0.cpp && ./a.out > /dev/null; then
echo -n ", OK" echo -n ", OK"
else else
echo -n ", FAIL" echo -n ", FAIL"
exit 6 exit 6
fi fi
if g++-12 -std=c++2a -DPFR_USE_LOOPHOLE=0 -DPFR_USE_CPP17=0 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/get.cpp && ./a.out > /dev/null; then if ${PFR_TEST_COMPILER} -std=c++2a -DPFR_USE_LOOPHOLE=0 -DPFR_USE_CPP17=0 -I ${TARGET_PATH}/include/ ${TARGET_PATH}/example/get.cpp && ./a.out > /dev/null; then
echo -n ", OK" echo -n ", OK"
else else
echo -n ", FAIL" echo -n ", FAIL"
@@ -92,7 +94,7 @@ fi
mkdir build_module || : mkdir build_module || :
cd build_module cd build_module
if cmake -DPFR_USE_MODULES=1 -DBUILD_TESTING=1 -GNinja -DCMAKE_CXX_COMPILER=clang++-19 ${TARGET_PATH} && cmake --build .; then if cmake -DPFR_USE_MODULES=1 -DBUILD_TESTING=1 -GNinja -DCMAKE_CXX_COMPILER=${PFR_TEST_COMPILER} ${TARGET_PATH} && cmake --build .; then
echo "Modules check OK" echo "Modules check OK"
else else
echo "Modules check FAIL" echo "Modules check FAIL"