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 72
72
env :
73
73
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
74
74
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
+
75
88
task :
76
89
name : " Win64 native [msvc]"
77
90
<< : *FILTER_TEMPLATE
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ export USE_BUSY_BOX=${USE_BUSY_BOX:-false}
37
37
38
38
export RUN_UNIT_TESTS=${RUN_UNIT_TESTS:- true}
39
39
export RUN_FUNCTIONAL_TESTS=${RUN_FUNCTIONAL_TESTS:- true}
40
+ export RUN_TIDY=${RUN_TIDY:- false}
40
41
export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:- false}
41
42
# By how much to scale the test_runner timeouts (option --timeout-factor).
42
43
# 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
48
48
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'
49
49
fi
50
50
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 )
52
57
53
58
CI_EXEC " ccache --version | head -n 1 && ccache --show-stats"
54
59
CI_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
34
34
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
35
35
fi
36
36
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
+
37
42
if [ " $RUN_SECURITY_TESTS " = " true" ]; then
38
43
CI_EXEC make test-security-check
39
44
fi
Original file line number Diff line number Diff line change @@ -1926,6 +1926,7 @@ AC_CONFIG_LINKS([contrib/devtools/test-security-check.py:contrib/devtools/test-s
1926
1926
AC_CONFIG_LINKS ( [ contrib/devtools/test-symbol-check.py:contrib/devtools/test-symbol-check.py] )
1927
1927
AC_CONFIG_LINKS ( [ contrib/filter-lcov.py:contrib/filter-lcov.py] )
1928
1928
AC_CONFIG_LINKS ( [ contrib/macdeploy/background.tiff:contrib/macdeploy/background.tiff] )
1929
+ AC_CONFIG_LINKS ( [ src/.clang-tidy:src/.clang-tidy] )
1929
1930
AC_CONFIG_LINKS ( [ test/functional/test_runner.py:test/functional/test_runner.py] )
1930
1931
AC_CONFIG_LINKS ( [ test/fuzz/test_runner.py:test/fuzz/test_runner.py] )
1931
1932
AC_CONFIG_LINKS ( [ test/util/test_runner.py:test/util/test_runner.py] )
You can’t perform that action at this time.
0 commit comments