diff --git a/.cirrus.yml b/.cirrus.yml index e5a2f36f4d6..5c5942e2d5d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -84,6 +84,9 @@ task: memory: 1G # For faster CI feedback, immediately schedule the linters << : *CREDITS_TEMPLATE + test_runner_cache: + folder: "/lint_test_runner" + fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-parse HEAD:test/lint/test_runner) python_cache: folder: "/python_build" fingerprint_script: cat .python-version /etc/os-release diff --git a/ci/lint/04_install.sh b/ci/lint/04_install.sh index b1604063926..476417d04b9 100755 --- a/ci/lint/04_install.sh +++ b/ci/lint/04_install.sh @@ -33,6 +33,17 @@ export PATH="${PYTHON_PATH}/bin:${PATH}" command -v python3 python3 --version +export LINT_RUNNER_PATH="/lint_test_runner" +if [ ! -d "${LINT_RUNNER_PATH}" ]; then + ${CI_RETRY_EXE} apt-get install -y cargo + ( + cd ./test/lint/test_runner || exit 1 + cargo build + mkdir -p "${LINT_RUNNER_PATH}" + mv target/debug/test_runner "${LINT_RUNNER_PATH}" + ) +fi + ${CI_RETRY_EXE} pip3 install \ codespell==2.2.5 \ flake8==6.1.0 \ diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh index ccde12a0337..af7a5179304 100755 --- a/ci/lint/06_script.sh +++ b/ci/lint/06_script.sh @@ -30,6 +30,7 @@ test/lint/git-subtree-check.sh src/secp256k1 test/lint/git-subtree-check.sh src/minisketch test/lint/git-subtree-check.sh src/leveldb test/lint/git-subtree-check.sh src/crc32c +RUST_BACKTRACE=1 "${LINT_RUNNER_PATH}/test_runner" test/lint/check-doc.py test/lint/all-lint.py diff --git a/ci/lint/container-entrypoint.sh b/ci/lint/container-entrypoint.sh index e94a75e22c6..a403f923a21 100755 --- a/ci/lint/container-entrypoint.sh +++ b/ci/lint/container-entrypoint.sh @@ -11,6 +11,7 @@ export LC_ALL=C git config --global --add safe.directory /bitcoin export PATH="/python_build/bin:${PATH}" +export LINT_RUNNER_PATH="/lint_test_runner" if [ -z "$1" ]; then LOCAL_BRANCH=1 bash -ic "./ci/lint/06_script.sh" diff --git a/src/bitcoin-chainstate.cpp b/src/bitcoin-chainstate.cpp index fc83a4ad3a3..995b4781fc2 100644 --- a/src/bitcoin-chainstate.cpp +++ b/src/bitcoin-chainstate.cpp @@ -26,13 +26,13 @@ #include #include