Skip to content

Commit c086eba

Browse files
committed
Merge bitcoin/bitcoin#25028: ci: Clone iwyu only if missing
fa847ed ci: Clone iwyu only if missing (MacroFake) Pull request description: This doesn't change anything for Cirrus CI, but makes it easier to play locally. For reference, the same check is done when cloning `DIR_FUZZ_IN`. ACKs for top commit: fanquake: ACK fa847ed Tree-SHA512: 3d9689ea85b2380dcf83d26997c89c63f163aebfae9530180cb2420872a9f30d7b3dc59722e2e49684fdb3e30859b1e08e1272f6d083c07f213e9f5a190ca21f
2 parents becea48 + fa847ed commit c086eba

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

ci/test/04_install.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,13 @@ if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
112112
fi
113113

114114
if [[ "${RUN_TIDY}" == "true" ]]; then
115-
CI_EXEC "mkdir -p ${BASE_SCRATCH_DIR}/iwyu/build/"
116-
CI_EXEC "git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_14 ${BASE_SCRATCH_DIR}/iwyu/include-what-you-use"
117-
CI_EXEC "cd ${BASE_SCRATCH_DIR}/iwyu/build && cmake -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-14 ../include-what-you-use"
118-
CI_EXEC "cd ${BASE_SCRATCH_DIR}/iwyu/build && make install $MAKEJOBS"
115+
export DIR_IWYU="${BASE_SCRATCH_DIR}/iwyu"
116+
if [ ! -d "${DIR_IWYU}" ]; then
117+
CI_EXEC "mkdir -p ${DIR_IWYU}/build/"
118+
CI_EXEC "git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_14 ${DIR_IWYU}/include-what-you-use"
119+
CI_EXEC "cd ${DIR_IWYU}/build && cmake -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-14 ../include-what-you-use"
120+
CI_EXEC "cd ${DIR_IWYU}/build && make install $MAKEJOBS"
121+
fi
119122
fi
120123

121124
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then

ci/test/06_script_b.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if [ "${RUN_TIDY}" = "true" ]; then
3838
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
3939
CI_EXEC run-clang-tidy "${MAKEJOBS}"
4040
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/"
41-
CI_EXEC "python3 ${BASE_SCRATCH_DIR}/iwyu/include-what-you-use/iwyu_tool.py"\
41+
CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/iwyu_tool.py"\
4242
" src/compat"\
4343
" src/init"\
4444
" src/rpc/signmessage.cpp"\

0 commit comments

Comments
 (0)