Skip to content

Fail CI when regenerated sources differ from the committed ones - #3

Merged
MisterGC merged 2 commits into
masterfrom
issue-2
Oct 7, 2026
Merged

MisterGC merged 2 commits into
masterfrom
issue-2

Conversation

@MisterGC

@MisterGC MisterGC commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

The sources-regeneration step in build_linux.yml and build_windows.yml now always regenerates and goes red when the result differs from the committed src.

  • zserio runs with -ignoreTimestamps: without it zserio skips writing files that look newer than tutorial.zs, so the step could pass without regenerating anything
  • after generation, git add --intent-to-add src + git diff --exit-code -- src fails the step on any change, including a generated file that is not committed
  • keep-alive needed no change: both workflows already run their own keepalive job (liskin/gh-workflow-keepalive@v1, added in 1e0639b), which re-enables the workflow it runs in

Verified:

  • keep-alive (criterion 1): gh run view of the latest scheduled runs, Linux 30725731727 and Windows 37166081740 → keepalive success in both; gh api .../actions/workflows → both active
  • regeneration fails on a diff (criterion 2), zserio 2.19.0 under bash -eo pipefail in a clone: clean tree → exit 0; a committed file with an extra line → exit 1; a generated file missing from the repo → exit 1
  • the same three cases without -ignoreTimestamps: the edited file → exit 0 (zserio skipped regeneration), which is why the flag is in
  • all Linux workflow steps run locally (runtime + zserio download, regenerate, diff check, javac, Main write_joe/read/write_boss/read) → exit 0
  • PR CI: build_linux pass (run 37275727859), build_windows pass (run 37275727854, log shows the regeneration and git diff --exit-code ran)
  • 2 files changed, 6 insertions(+), 2 deletions(-)

Not verified: the red path on the Windows runner (only shown locally on macOS); a scheduled run of the changed workflows. No verify.sh or test suite exists in this repo.

Closes #2

@MisterGC
MisterGC merged commit 43058f4 into master Oct 7, 2026
4 checks passed
@MisterGC
MisterGC deleted the issue-2 branch October 7, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

linux and windows workflows must never get disabled for inactivity again

1 participant