From f07c54916faea2859494a8c6e608a32cda771960 Mon Sep 17 00:00:00 2001 From: Serein Pfeiffer Date: Mon, 5 Oct 2026 08:59:26 +0200 Subject: [PATCH 1/4] Add own keep-alive job to Linux and Windows workflows --- .github/workflows/build_linux.yml | 8 ++++++++ .github/workflows/build_windows.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 23a1561..9f2f738 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -110,3 +110,11 @@ jobs: with: name: zserio-tutorial-cpp-${{matrix.os}} path: build/ZserioTutorialCpp + + keepalive: + if: github.event_name == 'schedule' + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - uses: liskin/gh-workflow-keepalive@v1 diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 01c5a77..a582a5e 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -120,3 +120,11 @@ jobs: with: name: zserio-tutorial-cpp-${{matrix.os}} path: build/Release/ZserioTutorialCpp.exe + + keepalive: + if: github.event_name == 'schedule' + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - uses: liskin/gh-workflow-keepalive@v1 From c997f13838a3ca1dfdb548cece686c735f523d7d Mon Sep 17 00:00:00 2001 From: Serein Pfeiffer Date: Mon, 5 Oct 2026 08:59:26 +0200 Subject: [PATCH 2/4] Remove KeepAlive workflow that only kept itself alive --- .github/workflows/keep_alive.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .github/workflows/keep_alive.yml diff --git a/.github/workflows/keep_alive.yml b/.github/workflows/keep_alive.yml deleted file mode 100644 index db68bd1..0000000 --- a/.github/workflows/keep_alive.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: KeepAlive - -on: - schedule: - - cron: "0 0 * * 1" - -jobs: - workflow-keepalive: - if: github.event_name == 'schedule' - runs-on: ubuntu-latest - permissions: - actions: write - steps: - - uses: liskin/gh-workflow-keepalive@v1 From 50f21ebb9047439d379d7a21cc5364f1f66070d6 Mon Sep 17 00:00:00 2001 From: Serein Pfeiffer Date: Mon, 5 Oct 2026 08:59:47 +0200 Subject: [PATCH 3/4] Fail regeneration steps when regenerated sources differ from committed ones --- .github/workflows/build_linux.yml | 6 ++++++ .github/workflows/build_windows.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 9f2f738..1c47b7f 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -58,6 +58,9 @@ jobs: rm -rd * cmake .. -DCMAKE_BUILD_TYPE=Release -DREGENERATE_CPP_SOURCES=ON cmake --build . + cd .. + git add --intent-to-add --all -- src + git diff --exit-code -- src - name: Test Zserio C++ tutorial (sources regeneration) run: | @@ -97,6 +100,9 @@ jobs: rm -rd * cmake ../pmr -DCMAKE_BUILD_TYPE=Release -DREGENERATE_CPP_SOURCES=ON cmake --build . + cd .. + git add --intent-to-add --all -- pmr/src + git diff --exit-code -- pmr/src - name: Test Zserio C++ custom memory management tutorial (sources regeneration) run: | diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index a582a5e..e508a91 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -60,6 +60,9 @@ jobs: rm -rd * cmake .. -DREGENERATE_CPP_SOURCES=ON cmake --build . --config Release + cd .. + git add --intent-to-add --all -- src + git diff --exit-code -- src shell: bash - name: Test Zserio C++ tutorial (sources regeneration) @@ -105,6 +108,9 @@ jobs: rm -rd * cmake ../pmr -DREGENERATE_CPP_SOURCES=ON cmake --build . --config Release + cd .. + git add --intent-to-add --all -- pmr/src + git diff --exit-code -- pmr/src shell: bash - name: Test Zserio C++ custom memory management tutorial (sources regeneration) From 55f689052735aac7cb5690bc4c38e7bc8535e8c6 Mon Sep 17 00:00:00 2001 From: Serein Pfeiffer Date: Mon, 5 Oct 2026 09:07:12 +0200 Subject: [PATCH 4/4] Regenerate sources with -ignoreTimestamps so stale committed files get overwritten --- CMakeLists.txt | 2 +- pmr/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd99b60..002c944 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ if (REGENERATE_CPP_SOURCES) MESSAGE(STATUS "Compiling zserio tutorial schema") execute_process(COMMAND ${Java_JAVA_EXECUTABLE} -jar "${ZSERIO_JAR}" - -cpp ${TUTORIAL_ZSERIO_GEN_DIR} -src ${CMAKE_CURRENT_SOURCE_DIR} tutorial.zs + -cpp ${TUTORIAL_ZSERIO_GEN_DIR} -src ${CMAKE_CURRENT_SOURCE_DIR} tutorial.zs -ignoreTimestamps OUTPUT_VARIABLE ZSERIO_OUTPUT RESULT_VARIABLE ZSERIO_RESULT_CODE) if (ZSERIO_RESULT_CODE) diff --git a/pmr/CMakeLists.txt b/pmr/CMakeLists.txt index 5f3c445..b63ac96 100644 --- a/pmr/CMakeLists.txt +++ b/pmr/CMakeLists.txt @@ -15,7 +15,7 @@ if (REGENERATE_CPP_SOURCES) MESSAGE(STATUS "Compiling zserio tutorial schema") execute_process(COMMAND ${Java_JAVA_EXECUTABLE} -jar "${ZSERIO_JAR}" - -cpp ${TUTORIAL_ZSERIO_GEN_DIR} -src ${CMAKE_CURRENT_SOURCE_DIR}/.. tutorial.zs + -cpp ${TUTORIAL_ZSERIO_GEN_DIR} -src ${CMAKE_CURRENT_SOURCE_DIR}/.. tutorial.zs -ignoreTimestamps -setCppAllocator polymorphic OUTPUT_VARIABLE ZSERIO_OUTPUT RESULT_VARIABLE ZSERIO_RESULT_CODE)