From ddbf9f6ae21e7694a97477361e1c360478032041 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:21:59 +0900 Subject: [PATCH 01/22] Cache Catch2 if rebuild was happened --- .github/workflows/ci.yml | 18 +++++++++++++++++- test/CMakeLists.txt | 8 ++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d585d74..4858462 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,12 +172,28 @@ jobs: -DIRIS_CI=ON \ -S . + - name: Check Catch2 build time stamp (pre-build) + id: pre-build-check + run: | + echo "catch2_timestamp=" >> $GITHUB_OUTPUT + stat -c %Y build/.iris_catch2_build_stamp >> $GITHUB_OUTPUT + + - name: Try building Catch2 + id: post-build-check + run: | + cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_BUILD_JOBS }} ${{ matrix.compiler.builder_additional_args }} --target iris_catch2_build_check + + - name: Check Catch2 build time stamp (post-build) + run: | + echo "catch2_timestamp=" >> $GITHUB_OUTPUT + stat -c %Y build/.iris_catch2_build_stamp >> $GITHUB_OUTPUT + - name: Build Tests run: | cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_BUILD_JOBS }} ${{ matrix.compiler.builder_additional_args }} - name: Cache CMake Dependencies (save) - if: steps.cache-deps.outputs.cache-hit != 'true' + if: steps.cache-deps.outputs.cache-hit != 'true' && steps.pre-build-check.outputs.catch2_timestamp != steps.post-build-check.outputs.catch2_timestamp uses: actions/cache/save@v4 with: key: ${{ steps.cache-deps.outputs.cache-primary-key }} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fc6928f..1624c75 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -88,6 +88,14 @@ target_link_libraries(Catch2WithMain PRIVATE iris_cxx_test_external) target_link_libraries(iris_cxx_test INTERFACE Catch2::Catch2WithMain) +set(IRIS_CATCH2_STAMP "${CMAKE_BINARY_DIR}/.iris_catch2_build_stamp") +add_custom_command( + OUTPUT "${IRIS_CATCH2_STAMP}" + COMMAND touch "${IRIS_CATCH2_STAMP}" + DEPENDS Catch2::Catch2 + COMMENT "Catch2 is rebuilt" +) +add_custom_target(iris_catch2_build_check ALL DEPENDS "${IRIS_CATCH2_STAMP}") # ----------------------------------------------------------------- # Common CMake utilities for testing From 42218ca572761ed0d39694f4f5791ff633baf11d Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:25:14 +0900 Subject: [PATCH 02/22] Fix --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4858462..bb69388 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -186,7 +186,11 @@ jobs: - name: Check Catch2 build time stamp (post-build) run: | echo "catch2_timestamp=" >> $GITHUB_OUTPUT - stat -c %Y build/.iris_catch2_build_stamp >> $GITHUB_OUTPUT + if [ -e build/.iris_catch2_build_stamp ]; then + stat -c %Y build/.iris_catch2_build_stamp >> $GITHUB_OUTPUT + else + echo "0" >> $GITHUB_OUTPUT + fi - name: Build Tests run: | From 1281ba4b218bc69fbc00dd255652c915bec381bb Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:26:48 +0900 Subject: [PATCH 03/22] Fix --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb69388..65bccc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -176,7 +176,11 @@ jobs: id: pre-build-check run: | echo "catch2_timestamp=" >> $GITHUB_OUTPUT - stat -c %Y build/.iris_catch2_build_stamp >> $GITHUB_OUTPUT + if [ -e build/.iris_catch2_build_stamp ]; then + stat -c %Y build/.iris_catch2_build_stamp >> $GITHUB_OUTPUT + else + echo "0" >> $GITHUB_OUTPUT + fi - name: Try building Catch2 id: post-build-check @@ -186,11 +190,7 @@ jobs: - name: Check Catch2 build time stamp (post-build) run: | echo "catch2_timestamp=" >> $GITHUB_OUTPUT - if [ -e build/.iris_catch2_build_stamp ]; then - stat -c %Y build/.iris_catch2_build_stamp >> $GITHUB_OUTPUT - else - echo "0" >> $GITHUB_OUTPUT - fi + stat -c %Y build/.iris_catch2_build_stamp >> $GITHUB_OUTPUT - name: Build Tests run: | From 1bcce79b88c17161177b16268852fc3c856e6e0b Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:28:47 +0900 Subject: [PATCH 04/22] Fix? --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65bccc8..b991a47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -175,11 +175,10 @@ jobs: - name: Check Catch2 build time stamp (pre-build) id: pre-build-check run: | - echo "catch2_timestamp=" >> $GITHUB_OUTPUT if [ -e build/.iris_catch2_build_stamp ]; then - stat -c %Y build/.iris_catch2_build_stamp >> $GITHUB_OUTPUT + echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT else - echo "0" >> $GITHUB_OUTPUT + echo "catch2_timestamp=0 >> $GITHUB_OUTPUT fi - name: Try building Catch2 From 94a40f7cd8fea3fbcbfef0341fb13883c1234106 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:29:46 +0900 Subject: [PATCH 05/22] Fix! --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b991a47..a701690 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -178,7 +178,7 @@ jobs: if [ -e build/.iris_catch2_build_stamp ]; then echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT else - echo "catch2_timestamp=0 >> $GITHUB_OUTPUT + echo "catch2_timestamp=0" >> $GITHUB_OUTPUT fi - name: Try building Catch2 From e271a0aff9016794dcb910692bc2d937a19bacdb Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:30:51 +0900 Subject: [PATCH 06/22] PLEASE FIX --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a701690..633b3d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -188,8 +188,7 @@ jobs: - name: Check Catch2 build time stamp (post-build) run: | - echo "catch2_timestamp=" >> $GITHUB_OUTPUT - stat -c %Y build/.iris_catch2_build_stamp >> $GITHUB_OUTPUT + echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT - name: Build Tests run: | From ed96c94980b8dce7cef2de3f5edf9c5f3258ba5c Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:32:30 +0900 Subject: [PATCH 07/22] Use bash --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 633b3d7..2af1119 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -174,6 +174,7 @@ jobs: - name: Check Catch2 build time stamp (pre-build) id: pre-build-check + shell: bash run: | if [ -e build/.iris_catch2_build_stamp ]; then echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT @@ -187,6 +188,7 @@ jobs: cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_BUILD_JOBS }} ${{ matrix.compiler.builder_additional_args }} --target iris_catch2_build_check - name: Check Catch2 build time stamp (post-build) + shell: bash run: | echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT From 5aa960717596306677b090faf75c74ecc34a6c8e Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:36:12 +0900 Subject: [PATCH 08/22] Fix? --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2af1119..4d2b1e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,7 +185,7 @@ jobs: - name: Try building Catch2 id: post-build-check run: | - cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_BUILD_JOBS }} ${{ matrix.compiler.builder_additional_args }} --target iris_catch2_build_check + cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_BUILD_JOBS }} --target iris_catch2_build_check ${{ matrix.compiler.builder_additional_args }} - name: Check Catch2 build time stamp (post-build) shell: bash From d307e152f91b838dce4a7464d96782a0bee397ab Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:43:26 +0900 Subject: [PATCH 09/22] TEST --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d2b1e1..a2fe8f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,6 +160,11 @@ jobs: echo "IRIS_CMAKE_ARGS=" >> "$GITHUB_OUTPUT" fi + - name: Test + shell: bash + run: | + echo "" | sudo tee -a /usr/include/type_traits + - name: Configure shell: bash run: | From a7cf55daf33d68bab8b4d14db0a6e186d44aeb4b Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:50:53 +0900 Subject: [PATCH 10/22] TEST2 --- .github/workflows/ci.yml | 5 ----- test/CMakeLists.txt | 7 ++++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2fe8f3..4d2b1e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,11 +160,6 @@ jobs: echo "IRIS_CMAKE_ARGS=" >> "$GITHUB_OUTPUT" fi - - name: Test - shell: bash - run: | - echo "" | sudo tee -a /usr/include/type_traits - - name: Configure shell: bash run: | diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1624c75..300aa9f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -40,7 +40,7 @@ if(MSVC) target_compile_options( iris_cxx_test_external - INTERFACE /analyze- + INTERFACE /analyze- /DFOO ) else() # non-MSVC @@ -55,6 +55,11 @@ else() # non-MSVC -fsanitize=undefined,address ) + target_compile_options( + iris_cxx_test_external + INTERFACE -DFOO + ) + target_compile_options( iris_cxx_test INTERFACE From 9b0c425560806eb21d5da45c2b4e14ae21179dfe Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:53:31 +0900 Subject: [PATCH 11/22] ORRRRRRRRRR --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d2b1e1..455244c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -197,7 +197,7 @@ jobs: cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_BUILD_JOBS }} ${{ matrix.compiler.builder_additional_args }} - name: Cache CMake Dependencies (save) - if: steps.cache-deps.outputs.cache-hit != 'true' && steps.pre-build-check.outputs.catch2_timestamp != steps.post-build-check.outputs.catch2_timestamp + if: steps.cache-deps.outputs.cache-hit != 'true' || steps.pre-build-check.outputs.catch2_timestamp != steps.post-build-check.outputs.catch2_timestamp uses: actions/cache/save@v4 with: key: ${{ steps.cache-deps.outputs.cache-primary-key }} From afa4f7df04cae76be833fcead14acc159fbefd85 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 04:57:19 +0900 Subject: [PATCH 12/22] DEBUG --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 455244c..a882380 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -178,8 +178,10 @@ jobs: run: | if [ -e build/.iris_catch2_build_stamp ]; then echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT + echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" else echo "catch2_timestamp=0" >> $GITHUB_OUTPUT + echo "catch2_timestamp=0" fi - name: Try building Catch2 @@ -191,6 +193,7 @@ jobs: shell: bash run: | echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT + echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" - name: Build Tests run: | From 6c2f6a8e18f5f22245774c7cddbee410aa308a51 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 05:00:32 +0900 Subject: [PATCH 13/22] ? --- .github/workflows/ci.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a882380..41aa561 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -177,11 +177,11 @@ jobs: shell: bash run: | if [ -e build/.iris_catch2_build_stamp ]; then - echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT - echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" + echo "catch2-timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT + echo "catch2-timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" else - echo "catch2_timestamp=0" >> $GITHUB_OUTPUT - echo "catch2_timestamp=0" + echo "catch2-timestamp=0" >> $GITHUB_OUTPUT + echo "catch2-timestamp=0" fi - name: Try building Catch2 @@ -192,15 +192,20 @@ jobs: - name: Check Catch2 build time stamp (post-build) shell: bash run: | - echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT - echo "catch2_timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" + echo "catch2-timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT + echo "catch2-timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" - name: Build Tests run: | cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_BUILD_JOBS }} ${{ matrix.compiler.builder_additional_args }} + - name: TEST + run: | + echo "steps.pre-build-check.outputs.catch2-timestamp == ${{ steps.pre-build-check.outputs.catch2-timestamp }}"" + echo "steps.post-build-check.outputs.catch2-timestamp == ${{ steps.post-build-check.outputs.catch2-timestamp }}"" + - name: Cache CMake Dependencies (save) - if: steps.cache-deps.outputs.cache-hit != 'true' || steps.pre-build-check.outputs.catch2_timestamp != steps.post-build-check.outputs.catch2_timestamp + if: steps.cache-deps.outputs.cache-hit != 'true' || steps.pre-build-check.outputs.catch2-timestamp != steps.post-build-check.outputs.catch2-timestamp uses: actions/cache/save@v4 with: key: ${{ steps.cache-deps.outputs.cache-primary-key }} From 500ad016cc6c0e449afca4aeddde58c86c4ddacd Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 05:02:44 +0900 Subject: [PATCH 14/22] WTF --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41aa561..5d7a38a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -201,8 +201,8 @@ jobs: - name: TEST run: | - echo "steps.pre-build-check.outputs.catch2-timestamp == ${{ steps.pre-build-check.outputs.catch2-timestamp }}"" - echo "steps.post-build-check.outputs.catch2-timestamp == ${{ steps.post-build-check.outputs.catch2-timestamp }}"" + echo "steps.pre-build-check.outputs.catch2-timestamp == ${{ steps.pre-build-check.outputs.catch2-timestamp }}" + echo "steps.post-build-check.outputs.catch2-timestamp == ${{ steps.post-build-check.outputs.catch2-timestamp }}" - name: Cache CMake Dependencies (save) if: steps.cache-deps.outputs.cache-hit != 'true' || steps.pre-build-check.outputs.catch2-timestamp != steps.post-build-check.outputs.catch2-timestamp From a1e9a6ef7c93eb8efba2a93741983a93358e275d Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 05:05:56 +0900 Subject: [PATCH 15/22] SORRY --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d7a38a..958eb1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,11 +185,11 @@ jobs: fi - name: Try building Catch2 - id: post-build-check run: | cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_BUILD_JOBS }} --target iris_catch2_build_check ${{ matrix.compiler.builder_additional_args }} - name: Check Catch2 build time stamp (post-build) + id: post-build-check shell: bash run: | echo "catch2-timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT From c1ef3f910da50e21217d48ff8b657cc5a84925c8 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 05:11:55 +0900 Subject: [PATCH 16/22] Remove debug things --- .github/workflows/ci.yml | 26 +++++++++----------------- test/CMakeLists.txt | 17 ++++++----------- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 958eb1d..e5cca8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,40 +172,32 @@ jobs: -DIRIS_CI=ON \ -S . - - name: Check Catch2 build time stamp (pre-build) + - name: Check Deps build time stamp (pre-build) id: pre-build-check shell: bash run: | - if [ -e build/.iris_catch2_build_stamp ]; then - echo "catch2-timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT - echo "catch2-timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" + if [ -e build/.iris_deps_build_stamp ]; then + echo "deps-timestamp=$(stat -c %Y build/.iris_deps_build_stamp)" >> $GITHUB_OUTPUT else - echo "catch2-timestamp=0" >> $GITHUB_OUTPUT - echo "catch2-timestamp=0" + echo "deps-timestamp=0" >> $GITHUB_OUTPUT fi - - name: Try building Catch2 + - name: Try building Deps run: | - cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_BUILD_JOBS }} --target iris_catch2_build_check ${{ matrix.compiler.builder_additional_args }} + cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_BUILD_JOBS }} --target iris_deps_build_check ${{ matrix.compiler.builder_additional_args }} - - name: Check Catch2 build time stamp (post-build) + - name: Check Deps build time stamp (post-build) id: post-build-check shell: bash run: | - echo "catch2-timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" >> $GITHUB_OUTPUT - echo "catch2-timestamp=$(stat -c %Y build/.iris_catch2_build_stamp)" + echo "deps-timestamp=$(stat -c %Y build/.iris_deps_build_stamp)" >> $GITHUB_OUTPUT - name: Build Tests run: | cmake --build build --config ${{ matrix.build_type.name }} -j${{ env.IRIS_BUILD_JOBS }} ${{ matrix.compiler.builder_additional_args }} - - name: TEST - run: | - echo "steps.pre-build-check.outputs.catch2-timestamp == ${{ steps.pre-build-check.outputs.catch2-timestamp }}" - echo "steps.post-build-check.outputs.catch2-timestamp == ${{ steps.post-build-check.outputs.catch2-timestamp }}" - - name: Cache CMake Dependencies (save) - if: steps.cache-deps.outputs.cache-hit != 'true' || steps.pre-build-check.outputs.catch2-timestamp != steps.post-build-check.outputs.catch2-timestamp + if: steps.cache-deps.outputs.cache-hit != 'true' || steps.pre-build-check.outputs.deps-timestamp != steps.post-build-check.outputs.deps-timestamp uses: actions/cache/save@v4 with: key: ${{ steps.cache-deps.outputs.cache-primary-key }} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 300aa9f..a57c2c9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -40,7 +40,7 @@ if(MSVC) target_compile_options( iris_cxx_test_external - INTERFACE /analyze- /DFOO + INTERFACE /analyze- ) else() # non-MSVC @@ -55,11 +55,6 @@ else() # non-MSVC -fsanitize=undefined,address ) - target_compile_options( - iris_cxx_test_external - INTERFACE -DFOO - ) - target_compile_options( iris_cxx_test INTERFACE @@ -93,14 +88,14 @@ target_link_libraries(Catch2WithMain PRIVATE iris_cxx_test_external) target_link_libraries(iris_cxx_test INTERFACE Catch2::Catch2WithMain) -set(IRIS_CATCH2_STAMP "${CMAKE_BINARY_DIR}/.iris_catch2_build_stamp") +set(IRIS_DEPS_STAMP "${CMAKE_BINARY_DIR}/.iris_deps_build_stamp") add_custom_command( - OUTPUT "${IRIS_CATCH2_STAMP}" - COMMAND touch "${IRIS_CATCH2_STAMP}" + OUTPUT "${IRIS_DEPS_STAMP}" + COMMAND touch "${IRIS_DEPS_STAMP}" DEPENDS Catch2::Catch2 - COMMENT "Catch2 is rebuilt" + COMMENT "Deps is rebuilt" ) -add_custom_target(iris_catch2_build_check ALL DEPENDS "${IRIS_CATCH2_STAMP}") +add_custom_target(iris_deps_build_check ALL DEPENDS "${IRIS_DEPS_STAMP}") # ----------------------------------------------------------------- # Common CMake utilities for testing From 603564c388afa9a84b62a46650eab54d6a84a81a Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 05:21:07 +0900 Subject: [PATCH 17/22] fix --- .github/workflows/ci.yml | 6 +++--- test/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5cca8c..62f3bc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -176,8 +176,8 @@ jobs: id: pre-build-check shell: bash run: | - if [ -e build/.iris_deps_build_stamp ]; then - echo "deps-timestamp=$(stat -c %Y build/.iris_deps_build_stamp)" >> $GITHUB_OUTPUT + if [ -e build/_deps/.iris_deps_build_stamp ]; then + echo "deps-timestamp=$(stat -c %Y build/_deps/.iris_deps_build_stamp)" >> $GITHUB_OUTPUT else echo "deps-timestamp=0" >> $GITHUB_OUTPUT fi @@ -190,7 +190,7 @@ jobs: id: post-build-check shell: bash run: | - echo "deps-timestamp=$(stat -c %Y build/.iris_deps_build_stamp)" >> $GITHUB_OUTPUT + echo "deps-timestamp=$(stat -c %Y build/_deps/.iris_deps_build_stamp)" >> $GITHUB_OUTPUT - name: Build Tests run: | diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a57c2c9..a6e3c91 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -88,7 +88,7 @@ target_link_libraries(Catch2WithMain PRIVATE iris_cxx_test_external) target_link_libraries(iris_cxx_test INTERFACE Catch2::Catch2WithMain) -set(IRIS_DEPS_STAMP "${CMAKE_BINARY_DIR}/.iris_deps_build_stamp") +set(IRIS_DEPS_STAMP "${CMAKE_BINARY_DIR}/_deps/.iris_deps_build_stamp") add_custom_command( OUTPUT "${IRIS_DEPS_STAMP}" COMMAND touch "${IRIS_DEPS_STAMP}" From e480ee837697e81acdd1eff55b67446785365fb9 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 05:21:41 +0900 Subject: [PATCH 18/22] Fix indent --- test/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a6e3c91..8ea3071 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -90,10 +90,10 @@ target_link_libraries(iris_cxx_test INTERFACE Catch2::Catch2WithMain) set(IRIS_DEPS_STAMP "${CMAKE_BINARY_DIR}/_deps/.iris_deps_build_stamp") add_custom_command( - OUTPUT "${IRIS_DEPS_STAMP}" - COMMAND touch "${IRIS_DEPS_STAMP}" - DEPENDS Catch2::Catch2 - COMMENT "Deps is rebuilt" + OUTPUT "${IRIS_DEPS_STAMP}" + COMMAND touch "${IRIS_DEPS_STAMP}" + DEPENDS Catch2::Catch2 + COMMENT "Deps is rebuilt" ) add_custom_target(iris_deps_build_check ALL DEPENDS "${IRIS_DEPS_STAMP}") From d91258ab0a335f0543b60bc80d9b2cb1c8857e05 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 05:22:11 +0900 Subject: [PATCH 19/22] Revert "fix" This reverts commit 603564c388afa9a84b62a46650eab54d6a84a81a. --- .github/workflows/ci.yml | 6 +++--- test/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62f3bc3..e5cca8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -176,8 +176,8 @@ jobs: id: pre-build-check shell: bash run: | - if [ -e build/_deps/.iris_deps_build_stamp ]; then - echo "deps-timestamp=$(stat -c %Y build/_deps/.iris_deps_build_stamp)" >> $GITHUB_OUTPUT + if [ -e build/.iris_deps_build_stamp ]; then + echo "deps-timestamp=$(stat -c %Y build/.iris_deps_build_stamp)" >> $GITHUB_OUTPUT else echo "deps-timestamp=0" >> $GITHUB_OUTPUT fi @@ -190,7 +190,7 @@ jobs: id: post-build-check shell: bash run: | - echo "deps-timestamp=$(stat -c %Y build/_deps/.iris_deps_build_stamp)" >> $GITHUB_OUTPUT + echo "deps-timestamp=$(stat -c %Y build/.iris_deps_build_stamp)" >> $GITHUB_OUTPUT - name: Build Tests run: | diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8ea3071..972acea 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -88,7 +88,7 @@ target_link_libraries(Catch2WithMain PRIVATE iris_cxx_test_external) target_link_libraries(iris_cxx_test INTERFACE Catch2::Catch2WithMain) -set(IRIS_DEPS_STAMP "${CMAKE_BINARY_DIR}/_deps/.iris_deps_build_stamp") +set(IRIS_DEPS_STAMP "${CMAKE_BINARY_DIR}/.iris_deps_build_stamp") add_custom_command( OUTPUT "${IRIS_DEPS_STAMP}" COMMAND touch "${IRIS_DEPS_STAMP}" From 85650e67b73386fe37e434351129874c35201ada Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 05:24:12 +0900 Subject: [PATCH 20/22] Cache timestamp file --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5cca8c..5c7959e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,7 +146,9 @@ jobs: uses: actions/cache/restore@v4 with: key: deps-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ matrix.compiler.toolset }}-${{ steps.env-info.outputs.compiler-full-version }}-${{ matrix.cpp_version.name }}-${{ matrix.build_type.name }} - path: ${{ github.workspace }}/build/_deps + path: | + ${{ github.workspace }}/build/_deps + ${{ github.workspace }}/build/.iris_deps_build_stamp # Adapt CMP0168; enable caching in CI # https://cmake.org/cmake/help/latest/module/FetchContent.html#variable:FETCHCONTENT_FULLY_DISCONNECTED @@ -201,7 +203,9 @@ jobs: uses: actions/cache/save@v4 with: key: ${{ steps.cache-deps.outputs.cache-primary-key }} - path: ${{ github.workspace }}/build/_deps + path: | + ${{ github.workspace }}/build/_deps + ${{ github.workspace }}/build/.iris_deps_build_stamp - name: Test env: From 3ad338d7f00be632da4edcee9c018f071f917640 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 05:30:11 +0900 Subject: [PATCH 21/22] PLEASE FIX INDENT --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 972acea..e48f4d2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -90,7 +90,7 @@ target_link_libraries(iris_cxx_test INTERFACE Catch2::Catch2WithMain) set(IRIS_DEPS_STAMP "${CMAKE_BINARY_DIR}/.iris_deps_build_stamp") add_custom_command( - OUTPUT "${IRIS_DEPS_STAMP}" + OUTPUT "${IRIS_DEPS_STAMP}" COMMAND touch "${IRIS_DEPS_STAMP}" DEPENDS Catch2::Catch2 COMMENT "Deps is rebuilt" From 8d19de90da0a4cdf4135d91f6809d45737e77977 Mon Sep 17 00:00:00 2001 From: yaito3014 Date: Mon, 16 Feb 2026 05:31:06 +0900 Subject: [PATCH 22/22] Create timestamp file only if in CI --- test/CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e48f4d2..0b7b23c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -88,14 +88,16 @@ target_link_libraries(Catch2WithMain PRIVATE iris_cxx_test_external) target_link_libraries(iris_cxx_test INTERFACE Catch2::Catch2WithMain) -set(IRIS_DEPS_STAMP "${CMAKE_BINARY_DIR}/.iris_deps_build_stamp") -add_custom_command( - OUTPUT "${IRIS_DEPS_STAMP}" - COMMAND touch "${IRIS_DEPS_STAMP}" - DEPENDS Catch2::Catch2 - COMMENT "Deps is rebuilt" -) -add_custom_target(iris_deps_build_check ALL DEPENDS "${IRIS_DEPS_STAMP}") +if (IRIS_CI) + set(IRIS_DEPS_STAMP "${CMAKE_BINARY_DIR}/.iris_deps_build_stamp") + add_custom_command( + OUTPUT "${IRIS_DEPS_STAMP}" + COMMAND touch "${IRIS_DEPS_STAMP}" + DEPENDS Catch2::Catch2 + COMMENT "Deps is rebuilt" + ) + add_custom_target(iris_deps_build_check ALL DEPENDS "${IRIS_DEPS_STAMP}") +endif() # ----------------------------------------------------------------- # Common CMake utilities for testing