mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 17:47:30 +01:00
make: Add target to check generated/derived files were checked in
A new target `check-gen-updated` to verify that all derived/generated files that were modified were also checked in. This is used on CI to check, and is not added to `check` since it'll complain on dirty trees, i.e., before the devs check in their changes. Suggested-by: Rusty Russell <@rustyrussell>
This commit is contained in:
parent
8818645316
commit
927eda065b
2 changed files with 14 additions and 2 deletions
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
|
@ -16,9 +16,9 @@ jobs:
|
|||
include:
|
||||
# CFG us just an enumeration so we can refer to the configurations more easily
|
||||
- {CFG: 1, TEST_CMD: "make", NO_PYTHON: 1}
|
||||
- {CFG: 2, TEST_CMD: "make check-source check-units installcheck", COPTFLAGS: "-O3"}
|
||||
- {CFG: 2, TEST_CMD: "make check-source check-units installcheck check-gen-updated", COPTFLAGS: "-O3"}
|
||||
- {CFG: 3, ARCH: 32, TEST_CMD: "make check-source check-units installcheck", DEVELOPER: 0}
|
||||
- {CFG: 4, TEST_CMD: "make check-source check-units installcheck", EXPERIMENTAL_FEATURES: 1}
|
||||
- {CFG: 4, TEST_CMD: "make check-source check-units installcheck check-gen-updated", EXPERIMENTAL_FEATURES: 1}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.0.0
|
||||
|
|
12
Makefile
12
Makefile
|
@ -485,6 +485,18 @@ check-source: check-makefile check-source-bolt check-whitespace check-markdown c
|
|||
|
||||
full-check: check check-source
|
||||
|
||||
# Simple target to be used on CI systems to check that all the derived
|
||||
# files were checked in and updated. It depends on the generated
|
||||
# targets, and checks if any of the tracked files changed. If they did
|
||||
# then one of the gen-targets caused this change, meaning either the
|
||||
# gen-target is not reproducible or the files were forgotten.
|
||||
#
|
||||
# Do not run on your development tree since it will complain if you
|
||||
# have a dirty tree.
|
||||
check-gen-updated: $(ALL_GEN_HEADERS) $(ALL_GEN_SOURCES) wallet/statements_gettextgen.po $(MANPAGES)
|
||||
@echo "Checking for generated files being changed by make"
|
||||
git diff --exit-code HEAD $?
|
||||
|
||||
coverage/coverage.info: check pytest
|
||||
mkdir coverage || true
|
||||
lcov --capture --directory . --output-file coverage/coverage.info
|
||||
|
|
Loading…
Add table
Reference in a new issue