build: verify generated FSM diagrams

This commit is contained in:
Gustavo Stingelin 2026-07-18 15:40:38 -03:00
parent 0176e96e3c
commit 9f2d724c3e
2 changed files with 20 additions and 1 deletions

View file

@ -124,6 +124,9 @@ jobs:
- name: check
run: make docs-check
- name: check generated FSM diagrams
run: make fsm-check
########################
# run unit-test sqlite3 race
########################

View file

@ -194,4 +194,20 @@ docs-check: docs
fsm:
@$(call print, "Generating state machine docs")
./scripts/fsm-generate.sh;
.PHONY: fsm
FSM_FILES := \
fsm/example_fsm.md \
instantout/fsm.md \
instantout/reservation/reservation_fsm.md \
staticaddr/deposit/fsm.md \
staticaddr/loopin/fsm.md
fsm-check: fsm
@$(call print, "Verifying generated state machine docs")
if test -n "$$(git status --porcelain -- $(FSM_FILES))"; then \
echo "Generated FSM diagrams are not up-to-date!"; \
git status --porcelain -- $(FSM_FILES); \
git diff -- $(FSM_FILES); \
exit 1; \
fi
.PHONY: fsm fsm-check