Makefile: don't build the sources in make check-source.
What changed, and why it matters
This commit is a build-system and CI housekeeping change. It reorganizes which automated code-quality checks run before versus after compilation, and explicitly stops the 'check-source' Makefile target from compiling source code. There is no change to the actual Core Lightning node software, its network behavior, or its handling of funds, keys, or messages.
No security action needed. Treat as normal build/CI maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies .github/workflows/ci.yaml, Makefile, and common/Makefile. It removes check-gen-updated and check-doc from the prebuild CI job, adds a new check-compiled-source job that depends on compile artifacts, and changes the Makefile’s check-source target to exclude check-source-bolt and check-python (which require a build) and to use check-python-flake8 instead. It also changes common/Makefile to use COMMON_HEADERS_NOGEN instead of COMMON_HEADERS for check-source-bolt and check-whitespace, avoiding generated headers. The commit is purely about CI/Makefile hygiene.
Changed components
Makefilecommon/Makefile.github/workflows/ci.yamlInspect captured patch +42 / −11
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index f566806a..8fb75e60 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -101,10 +101,6 @@ jobs:
name: pytest-results-prebuild
path: report.xml
if-no-files-found: ignore
- - name: Check Generated Files have been updated
- run: uv run make check-gen-updated
- - name: Check docs
- run: uv run make check-doc
compile:
name: Compile CLN ${{ matrix.cfg }}
@@ -171,6 +167,41 @@ jobs:
name: cln-${{ matrix.CFG }}.tar.bz2
path: cln-${{ matrix.CFG }}.tar.bz2
+ check-compiled-source:
+ runs-on: ubuntu-24.04
+ needs:
+ - compile
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@v5
+
+ - name: Install dependencies
+ run: |
+ bash -x .github/scripts/setup.sh
+
+ - name: Download build
+ uses: actions/download-artifact@v4
+ with:
+ name: cln-compile-gcc.tar.bz2
+
+ - name: Unpack pre-built CLN
+ env:
+ CFG: ${{ matrix.CFG }}
+ run: |
+ tar -xaf cln-compile-gcc.tar.bz2
+
+ - name: Check
+ run: |
+ uv run eatmydata make -j $(nproc) check-source-bolt check-python check-gen-updated check-doc
+
check-units:
# The unit test checks are not in the critical path (not dependent
# on the integration tests), so run them with `valgrind`
@@ -765,11 +796,12 @@ jobs:
- integration-sanitizers
- min-btc-support
- check-downgrade
+ - check-compiled-source
if: ${{ always() }}
steps:
- name: Complete
env:
- JOB_NAMES: "INTEGRATION CHECK_UNITS VALGRIND SANITIZERS BTC"
+ JOB_NAMES: "INTEGRATION CHECK_UNITS VALGRIND SANITIZERS BTC CHECK_COMPILED_SOURCE"
INTEGRATION: ${{ needs.integration.result }}
CHECK_UNITS: ${{ needs['check-units'].result }}
VALGRIND: ${{ needs['integration-valgrind'].result }}
@@ -777,6 +809,7 @@ jobs:
DOCS: ${{ needs['update-docs-examples'].result }}
BTC: ${{ needs['min-btc-support'].result }}
CHECK_DOWNGRADE: ${{ needs['check-downgrade'].result }}
+ CHECK_COMPILED_SOURCE: ${{ needs['check-compiled-source'].result }}
run: |
failed=""
for name in $JOB_NAMES; do
diff --git a/Makefile b/Makefile
index e59e9f0b..7f7e9d97 100644
--- a/Makefile
+++ b/Makefile
@@ -649,10 +649,8 @@ update-doc-examples:
check-doc-examples: update-doc-examples
git diff --exit-code HEAD
-# For those without working cppcheck
-check-source-no-cppcheck: check-makefile check-source-bolt check-whitespace check-spelling check-python check-includes check-shellcheck check-setup_locale check-tmpctx check-discouraged-functions check-amount-access check-bad-sprintf
-
-check-source: check-source-no-cppcheck
+# This should NOT compile things!
+check-source: check-makefile check-whitespace check-spelling check-python-flake8 check-includes check-shellcheck check-setup_locale check-tmpctx check-discouraged-functions check-amount-access check-bad-sprintf
full-check: check check-source
diff --git a/common/Makefile b/common/Makefile
index 41926116..62ceb252 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -157,8 +157,8 @@ ALL_C_SOURCES += $(COMMON_SRC)
common/htlc_state_names_gen.h: common/htlc_state.h ccan/ccan/cdump/tools/cdump-enumstr
ccan/ccan/cdump/tools/cdump-enumstr common/htlc_state.h > $@
-check-source-bolt: $(COMMON_SRC_NOGEN:%=bolt-check/%) $(COMMON_HEADERS:%=bolt-check/%)
-check-whitespace: $(COMMON_SRC_NOGEN:%=check-whitespace/%) $(COMMON_HEADERS:%=check-whitespace/%)
+check-source-bolt: $(COMMON_SRC_NOGEN:%=bolt-check/%) $(COMMON_HEADERS_NOGEN:%=bolt-check/%)
+check-whitespace: $(COMMON_SRC_NOGEN:%=check-whitespace/%) $(COMMON_HEADERS_NOGEN:%=check-whitespace/%)
clean: common-clean
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.