Skip to content

Commit 734acc8

Browse files
committed
ci: apply IWYU suggestions to the source checkout, not the build tree
lint-tidy.sh ran fix_includes.py from build-ci/dashcore-*/src, the distdir copy that configure and make use. It rewrote the includes of those copies, so the "Run unit tests" step compiled the rewritten files and failed on the includes IWYU dropped, and the git diff that should show the IWYU patch printed nothing because the distdir is not tracked. Upstream bitcoin#27012 runs fix_includes.py in the source checkout; the backport changed that to the build directory. IWYU reports paths relative to the build's src directory, which has the same layout as the checkout's src, so run fix_includes.py from ${BASE_ROOT_DIR}/src as upstream does. Moving the linters after the unit tests in build-src.yml is not enough for pull requests: build.yml runs on pull_request_target, which takes the workflow files from the base branch, so only the scripts come from the PR.
1 parent 417d83d commit 734acc8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎ci/dash/lint-tidy.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ iwyu_tool.py \
109109
-Xiwyu --max_line_length=160 \
110110
2>&1 | tee "/tmp/iwyu_ci.out"
111111

112-
cd "${BASE_ROOT_DIR}/build-ci/dashcore-${BUILD_TARGET}/src"
112+
cd "${BASE_ROOT_DIR}/src"
113113
fix_includes.py --nosafe_headers < /tmp/iwyu_ci.out
114114
git --no-pager diff

0 commit comments

Comments
 (0)