From fa3b4427158d48f7d899582580f8f6a7b1bc981d Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Tue, 25 Feb 2025 13:24:43 +0100 Subject: [PATCH] ci: Use Cirrus dockerfile cache --- .cirrus.yml | 10 ++-------- ci/lint_run.sh | 13 +++++++++++++ ci/lint_run_all.sh | 3 ++- 3 files changed, 17 insertions(+), 9 deletions(-) create mode 100755 ci/lint_run.sh diff --git a/.cirrus.yml b/.cirrus.yml index 393237af66b..e41618b84ea 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -96,21 +96,15 @@ task: name: 'lint' << : *BASE_TEMPLATE container: - image: debian:bookworm + dockerfile: ci/lint_imagefile cpu: 1 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 unshallow_script: - git fetch --unshallow --no-tags lint_script: - - ./ci/lint_run_all.sh + - ./ci/lint_run.sh task: name: 'tidy' diff --git a/ci/lint_run.sh b/ci/lint_run.sh new file mode 100755 index 00000000000..319cdc214ac --- /dev/null +++ b/ci/lint_run.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# +# Copyright (c) The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 +set -o errexit -o pipefail -o xtrace + +# Only used in .cirrus.yml. Refer to test/lint/README.md on how to run locally. +export PATH="/python_build/bin:${PATH}" +export LINT_RUNNER_PATH="/lint_test_runner" +./ci/lint/06_script.sh diff --git a/ci/lint_run_all.sh b/ci/lint_run_all.sh index c57261d21a6..ab3f4392dcb 100755 --- a/ci/lint_run_all.sh +++ b/ci/lint_run_all.sh @@ -6,7 +6,8 @@ export LC_ALL=C.UTF-8 -# Only used in .cirrus.yml. Refer to test/lint/README.md on how to run locally. +# Only used in .cirrus.yml for stale re-runs of old pull request tasks. This +# file can be removed in September 2025. cp "./ci/retry/retry" "/ci_retry" cp "./.python-version" "/.python-version"