File tree Expand file tree Collapse file tree 6 files changed +45
-1
lines changed Expand file tree Collapse file tree 6 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 7272 env :
7373 << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
7474
75+ task :
76+ name : ' tidy [jammy]'
77+ << : *GLOBAL_TASK_TEMPLATE
78+ container :
79+ image : ubuntu:jammy
80+ cpu : 2
81+ memory : 5G
82+ # For faster CI feedback, immediately schedule the linters
83+ << : *CREDITS_TEMPLATE
84+ env :
85+ << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
86+ FILE_ENV : " ./ci/test/00_setup_env_native_tidy.sh"
87+
7588task :
7689 name : " Win64 native [msvc]"
7790 << : *FILTER_TEMPLATE
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ export USE_BUSY_BOX=${USE_BUSY_BOX:-false}
3737
3838export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:- true}
3939export RUN_FUNCTIONAL_TESTS=${RUN_FUNCTIONAL_TESTS:- true}
40+ export RUN_TIDY=${RUN_TIDY:- false}
4041export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:- false}
4142# By how much to scale the test_runner timeouts (option --timeout-factor).
4243# This is needed because some ci machines have slow CPU or disk, so sanitizers
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # Copyright (c) 2022 The Bitcoin Core developers
4+ # Distributed under the MIT software license, see the accompanying
5+ # file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+ export LC_ALL=C.UTF-8
8+
9+ export DOCKER_NAME_TAG=" ubuntu:22.04"
10+ export CONTAINER_NAME=ci_native_tidy
11+ export PACKAGES=" clang llvm clang-tidy bear libevent-dev libboost-dev"
12+ export NO_DEPENDS=1
13+ export RUN_UNIT_TESTS=false
14+ export RUN_FUNCTIONAL_TESTS=false
15+ export RUN_FUZZ_TESTS=false
16+ export RUN_TIDY=true
17+ export GOAL=" install"
18+ export BITCOIN_CONFIG=" CC=clang CXX=clang++ --disable-hardening CFLAGS='-O0 -g0' CXXFLAGS='-O0 -g0'"
19+ export CCACHE_SIZE=200M
Original file line number Diff line number Diff line change @@ -48,7 +48,12 @@ if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
4848 CI_EXEC ' grep -v HAVE_SYS_GETRANDOM src/config/bitcoin-config.h > src/config/bitcoin-config.h.tmp && mv src/config/bitcoin-config.h.tmp src/config/bitcoin-config.h'
4949fi
5050
51- CI_EXEC make " $MAKEJOBS " " $GOAL " || ( echo " Build failure. Verbose build follows." && CI_EXEC make " $GOAL " V=1 ; false )
51+ if [[ " ${RUN_TIDY} " == " true" ]]; then
52+ MAYBE_BEAR=" bear"
53+ MAYBE_TOKEN=" --"
54+ fi
55+
56+ CI_EXEC " ${MAYBE_BEAR} " " ${MAYBE_TOKEN} " make " $MAKEJOBS " " $GOAL " || ( echo " Build failure. Verbose build follows." && CI_EXEC make " $GOAL " V=1 ; false )
5257
5358CI_EXEC " ccache --version | head -n 1 && ccache --show-stats"
5459CI_EXEC du -sh " ${DEPENDS_DIR} " /* /
Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
3434 CI_EXEC LD_LIBRARY_PATH=" ${DEPENDS_DIR} /${HOST} /lib" " ${TEST_RUNNER_ENV} " test/functional/test_runner.py --ci " $MAKEJOBS " --tmpdirprefix " ${BASE_SCRATCH_DIR} /test_runner/" --ansi --combinedlogslen=4000 --timeout-factor=" ${TEST_RUNNER_TIMEOUT_FACTOR} " " ${TEST_RUNNER_EXTRA} " --quiet --failfast
3535fi
3636
37+ if [ " ${RUN_TIDY} " = " true" ]; then
38+ export P_CI_DIR=" ${BASE_BUILD_DIR} /bitcoin-$HOST /src/"
39+ CI_EXEC run-clang-tidy " ${MAKEJOBS} "
40+ fi
41+
3742if [ " $RUN_SECURITY_TESTS " = " true" ]; then
3843 CI_EXEC make test-security-check
3944fi
Original file line number Diff line number Diff line change @@ -1937,6 +1937,7 @@ AC_CONFIG_LINKS([contrib/devtools/test-security-check.py:contrib/devtools/test-s
19371937AC_CONFIG_LINKS ( [ contrib/devtools/test-symbol-check.py:contrib/devtools/test-symbol-check.py] )
19381938AC_CONFIG_LINKS ( [ contrib/filter-lcov.py:contrib/filter-lcov.py] )
19391939AC_CONFIG_LINKS ( [ contrib/macdeploy/background.tiff:contrib/macdeploy/background.tiff] )
1940+ AC_CONFIG_LINKS ( [ src/.clang-tidy:src/.clang-tidy] )
19401941AC_CONFIG_LINKS ( [ test/functional/test_runner.py:test/functional/test_runner.py] )
19411942AC_CONFIG_LINKS ( [ test/fuzz/test_runner.py:test/fuzz/test_runner.py] )
19421943AC_CONFIG_LINKS ( [ test/util/test_runner.py:test/util/test_runner.py] )
You can’t perform that action at this time.
0 commit comments