From 6378c9031962f20740e2409afaffb992da844be5 Mon Sep 17 00:00:00 2001 From: Nana Sakisaka <1901813+saki7@users.noreply.github.com> Date: Thu, 14 Aug 2025 22:34:23 +0900 Subject: [PATCH 1/5] Update toolchain --- .github/workflows/run_test.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 3d5ce72..5843eb5 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -36,22 +36,26 @@ jobs: version: 2022 build_type: [Release, Debug] cpp_version: [23, 26] - boost_version: [1.86.0] + boost_version: [1.88.0] compiler: - name: GCC version: 14 executable: g++-14 + stdlib: libstdc++ - name: Clang - version: 19 - executable: clang++-19 + version: 21 + executable: clang++-21 + stdlib: libc++ cxxflags: -stdlib=libc++ - name: Clang - version: 20 - executable: clang++-20 + version: 22 + executable: clang++-22 + stdlib: libc++ cxxflags: -stdlib=libc++ - name: MSVC - version: v142 + version: v143 executable: cl + stdlib: MSVC-STL exclude: - os: name: windows @@ -80,7 +84,8 @@ jobs: run: | wget https://apt.llvm.org/llvm.sh chmod +x ./llvm.sh - sudo ./llvm.sh ${{ matrix.compiler.version }} all + sudo ./llvm.sh ${{ matrix.compiler.version }} + sudo apt-get install -y libc++-${{ matrix.compiler.version }}-dev libc++abi-${{ matrix.compiler.version }}-dev - name: Setup GCC if: matrix.compiler.name == 'GCC' @@ -95,7 +100,7 @@ jobs: id: cache-boost with: path: ${{ github.workspace }}/boost/dist - key: boost-${{ matrix.boost_version }}-${{ matrix.os.name }}-${{ matrix.compiler.executable }}-${{ matrix.cpp_version }} + key: boost-${{ matrix.boost_version }}-${{ matrix.os.name }}-${{ matrix.compiler.name }}-${{ matrix.compiler.version }}-${{ matrix.compiler.stdlib }}-${{ matrix.cpp_version }} - name: Clone Boost if: steps.cache-boost.outputs.cache-hit != 'true' @@ -140,8 +145,9 @@ jobs: run: > cmake -B ${{ github.workspace }}/build -DCMAKE_CXX_COMPILER=${{ matrix.compiler.executable }} - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -DCMAKE_CXX_FLAGS=${{ matrix.compiler.cxxflags }} -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_PREFIX_PATH=${{ github.workspace }}/boost/dist -S ${{ github.workspace }} From b009661f85f7e8ba220d9a62ed822c6eddac61e3 Mon Sep 17 00:00:00 2001 From: Nana Sakisaka <1901813+saki7@users.noreply.github.com> Date: Thu, 14 Aug 2025 22:42:12 +0900 Subject: [PATCH 2/5] Run CI on workflow changes --- .github/workflows/run_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 5843eb5..5ad371f 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -18,6 +18,7 @@ jobs: with: filters: | src: + - '.github/workflows/run_test.yml' - 'include/**/*' - 'test/**/*' From f79386afa43372a7ef19aa952b5d0f6412104489 Mon Sep 17 00:00:00 2001 From: Nana Sakisaka <1901813+saki7@users.noreply.github.com> Date: Thu, 14 Aug 2025 22:49:32 +0900 Subject: [PATCH 3/5] Use Boost.Exception --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f6d264a..88b0173 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -62,7 +62,7 @@ if(BUILD_TESTING) target_link_libraries(yk_util_test PRIVATE TBB::tbb) endif() - find_package(Boost REQUIRED CONFIG COMPONENTS unit_test_framework) + find_package(Boost REQUIRED CONFIG COMPONENTS unit_test_framework exception) target_link_libraries( yk_util_test PUBLIC yk_util Boost::headers $<$>:Boost::unit_test_framework> From 8af62f1ea14b0d0a36d39fc31fa61f5dc5926736 Mon Sep 17 00:00:00 2001 From: Nana Sakisaka <1901813+saki7@users.noreply.github.com> Date: Thu, 14 Aug 2025 22:57:25 +0900 Subject: [PATCH 4/5] Use `/EHsc` --- .github/workflows/run_test.yml | 9 +++++---- test/CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 5ad371f..2213fd9 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -57,6 +57,7 @@ jobs: version: v143 executable: cl stdlib: MSVC-STL + cxxflags: /EHsc exclude: - os: name: windows @@ -136,10 +137,10 @@ jobs: working-directory: ${{ github.workspace }}/boost run: | cmake -Bbuild -S. ${{ env.cmake_options }} -DCMAKE_BUILD_TYPE=Debug - cmake --build build -j --config Debug + cmake --build build -j4 --config Debug cmake --install build --prefix dist --config Debug cmake -Bbuild -S. ${{ env.cmake_options }} -DCMAKE_BUILD_TYPE=Release - cmake --build build -j --config Release + cmake --build build -j4 --config Release cmake --install build --prefix dist --config Release - name: Configure @@ -157,12 +158,12 @@ jobs: shell: bash run: | set -o pipefail - cmake --build ${{ github.workspace }}/build --verbose --config ${{ matrix.build_type }} --target yk_util_test 2>&1 | tee -a compilation.log + cmake --build ${{ github.workspace }}/build -j4 --verbose --config ${{ matrix.build_type }} --target yk_util_test 2>&1 | tee -a compilation.log - name: Build (Windows) if: matrix.os.name == 'windows' run: | - cmake --build ${{ github.workspace }}/build/test --verbose --config ${{ matrix.build_type }} --target yk_util_test 2>&1 | tee -a compilation.log + cmake --build ${{ github.workspace }}/build/test -j4 --verbose --config ${{ matrix.build_type }} --target yk_util_test 2>&1 | tee -a compilation.log - name: Test (Ubuntu) if: matrix.os.name == 'ubuntu' diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 88b0173..e0e0008 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -40,7 +40,7 @@ if(BUILD_TESTING) PRIVATE ${YK_COMMON_FLAG} PRIVATE $<$:-Wall -Wextra -pedantic-errors> PRIVATE $<$:-Wall -Wextra -pedantic-errors> - PRIVATE $<$:/W4 /permissive- /Zc:__cplusplus /Zc:preprocessor /sdl /utf-8> + PRIVATE $<$:/W4 /permissive- /EHsc /Zc:__cplusplus /Zc:preprocessor /sdl /utf-8> ) if(MSVC) target_compile_options( From 5a162d62218fc3e81d1bd4dbae6c76452a2e0bae Mon Sep 17 00:00:00 2001 From: Nana Sakisaka <1901813+saki7@users.noreply.github.com> Date: Thu, 14 Aug 2025 22:58:23 +0900 Subject: [PATCH 5/5] Link Boost.Exception --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e0e0008..49e92f6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -65,7 +65,7 @@ if(BUILD_TESTING) find_package(Boost REQUIRED CONFIG COMPONENTS unit_test_framework exception) target_link_libraries( yk_util_test PUBLIC yk_util Boost::headers - $<$>:Boost::unit_test_framework> + $<$>:Boost::unit_test_framework> Boost::exception ) add_test(NAME yk_util_test COMMAND yk_util_test) endif()