Skip to content

Commit 0459548

Browse files
committed
Merge bitcoin/bitcoin#27404: ci: use clang-16 in tidy task
a56c965 ci: use clang-16 in tidy task (fanquake) Pull request description: Follow up to bitcoin/bitcoin#27311 (comment), as IWYU now has a [clang_16 branch](https://github.com/include-what-you-use/include-what-you-use/tree/clang_16). This also removes some workarounds for (now fixed) clang-tidy issues, and simplifies the IWYU install steps. ACKs for top commit: MarcoFalke: lgtm ACK a56c965 josibake: ACK bitcoin/bitcoin@a56c965 hebasto: ACK a56c965 Tree-SHA512: 5bbec6cc196c3305302895c77986f3695fc6f4024363ee57503654d54e0ebf108719a7a1d7908817f84115dcaa13377493eb764b00bdf574f1290c73251426fa
2 parents 75d807a + a56c965 commit 0459548

File tree

6 files changed

+9
-14
lines changed

6 files changed

+9
-14
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ task:
8080
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
8181

8282
task:
83-
name: 'tidy [bookworm]'
83+
name: 'tidy [lunar]'
8484
<< : *GLOBAL_TASK_TEMPLATE
8585
container:
86-
image: debian:bookworm
86+
image: ubuntu:lunar
8787
cpu: 2
8888
memory: 5G
8989
# For faster CI feedback, immediately schedule the linters

ci/test/00_setup_env_native_tidy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export CI_IMAGE_NAME_TAG="debian:bookworm"
9+
export CI_IMAGE_NAME_TAG="ubuntu:lunar" # Version 23.04 will reach EOL in Jan 2024, and can be replaced by "ubuntu:24.04" (or anything else that ships the wanted clang version).
1010
export CONTAINER_NAME=ci_native_tidy
11-
export PACKAGES="clang-15 libclang-15-dev llvm-15-dev clang-tidy-15 bear cmake libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
11+
export PACKAGES="clang-16 libclang-16-dev llvm-16-dev libomp-16-dev clang-tidy-16 bear cmake libevent-dev libboost-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libqrencode-dev libsqlite3-dev libdb++-dev"
1212
export NO_DEPENDS=1
1313
export RUN_UNIT_TESTS=false
1414
export RUN_FUNCTIONAL_TESTS=false
1515
export RUN_FUZZ_TESTS=false
1616
export RUN_TIDY=true
1717
export GOAL="install"
18-
export BITCOIN_CONFIG="CC=clang-15 CXX=clang++-15 --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0'"
18+
export BITCOIN_CONFIG="CC=clang-16 CXX=clang++-16 --with-incompatible-bdb --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0 -I/usr/lib/llvm-16/lib/clang/16/include'"
1919
export CCACHE_SIZE=200M

ci/test/01_base_install.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ fi
5252

5353
if [[ "${RUN_TIDY}" == "true" ]]; then
5454
if [ ! -d "${DIR_IWYU}" ]; then
55-
mkdir -p "${DIR_IWYU}"/build/
56-
git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_15 "${DIR_IWYU}"/include-what-you-use
57-
cd "${DIR_IWYU}"/build && cmake -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-15 ../include-what-you-use
58-
cd "${DIR_IWYU}"/build && make install "$MAKEJOBS"
55+
git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_16 "${DIR_IWYU}"/include-what-you-use
56+
cmake -B "${DIR_IWYU}"/build/ -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-16 -S "${DIR_IWYU}"/include-what-you-use
57+
make -C "${DIR_IWYU}"/build/ install "$MAKEJOBS"
5958
fi
6059
fi
6160

ci/test/06_script_b.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fi
3939
if [ "${RUN_TIDY}" = "true" ]; then
4040
set -eo pipefail
4141
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
42-
( CI_EXEC run-clang-tidy-15 -quiet "${MAKEJOBS}" ) | grep -C5 "error"
42+
( CI_EXEC run-clang-tidy-16 -quiet "${MAKEJOBS}" ) | grep -C5 "error"
4343
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/"
4444
CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/iwyu_tool.py"\
4545
" src/common/init.cpp"\

src/test/fuzz/miniscript.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,6 @@ using Fragment = miniscript::Fragment;
248248
using NodeRef = miniscript::NodeRef<CPubKey>;
249249
using Node = miniscript::Node<CPubKey>;
250250
using Type = miniscript::Type;
251-
// https://github.com/llvm/llvm-project/issues/53444
252-
// NOLINTNEXTLINE(misc-unused-using-decls)
253251
using miniscript::operator"" _mst;
254252

255253
//! Construct a miniscript node as a shared_ptr.

src/test/miniscript_tests.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,6 @@ const KeyConverter CONVERTER{};
241241

242242
using Fragment = miniscript::Fragment;
243243
using NodeRef = miniscript::NodeRef<CPubKey>;
244-
// https://github.com/llvm/llvm-project/issues/53444
245-
// NOLINTNEXTLINE(misc-unused-using-decls)
246244
using miniscript::operator"" _mst;
247245
using Node = miniscript::Node<CPubKey>;
248246

0 commit comments

Comments
 (0)