ci: Clone iwyu only if missing

This commit is contained in:
MacroFake
2022-04-29 15:07:11 +02:00
parent 26296eba3d
commit fa847ed2f6
2 changed files with 8 additions and 5 deletions

View File

@ -112,10 +112,13 @@ if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
fi fi
if [[ "${RUN_TIDY}" == "true" ]]; then if [[ "${RUN_TIDY}" == "true" ]]; then
CI_EXEC "mkdir -p ${BASE_SCRATCH_DIR}/iwyu/build/" export DIR_IWYU="${BASE_SCRATCH_DIR}/iwyu"
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" if [ ! -d "${DIR_IWYU}" ]; then
CI_EXEC "cd ${BASE_SCRATCH_DIR}/iwyu/build && cmake -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-14 ../include-what-you-use" CI_EXEC "mkdir -p ${DIR_IWYU}/build/"
CI_EXEC "cd ${BASE_SCRATCH_DIR}/iwyu/build && make install $MAKEJOBS" 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"
CI_EXEC "cd ${DIR_IWYU}/build && cmake -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-14 ../include-what-you-use"
CI_EXEC "cd ${DIR_IWYU}/build && make install $MAKEJOBS"
fi
fi fi
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then

View File

@ -38,7 +38,7 @@ if [ "${RUN_TIDY}" = "true" ]; then
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/src/" export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
CI_EXEC run-clang-tidy "${MAKEJOBS}" CI_EXEC run-clang-tidy "${MAKEJOBS}"
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/" export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/"
CI_EXEC "python3 ${BASE_SCRATCH_DIR}/iwyu/include-what-you-use/iwyu_tool.py"\ CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/iwyu_tool.py"\
" src/compat"\ " src/compat"\
" src/init"\ " src/init"\
" src/rpc/signmessage.cpp"\ " src/rpc/signmessage.cpp"\