ci: Use Cirrus dockerfile cache

This commit is contained in:
MarcoFalke 2025-02-25 13:24:43 +01:00
parent c20a5ce106
commit fa3b442715
No known key found for this signature in database
3 changed files with 17 additions and 9 deletions

View File

@ -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'

13
ci/lint_run.sh Executable file
View File

@ -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

View File

@ -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"