Skip to content

Commit c9b633d

Browse files
committed
Merge bitcoin/bitcoin#31948: ci: [lint] Use Cirrus dockerfile cache
fa3b442 ci: Use Cirrus dockerfile cache (MarcoFalke) Pull request description: The lint task is problematic, because: * It doesn't check modifications to `ci/lint_imagefile` * It calls a separate script that installs packages on every run (taking time) * It uses `*_cache` instructions to cache some installed parts, but not all Fix all issues by using `ci/lint_imagefile` (https://cirrus-ci.org/guide/docker-builder-vm/#dockerfile-as-a-ci-environment) ACKs for top commit: willcl-ark: ACK fa3b442 Tree-SHA512: 243d78219639b83721d4e5cb32d16e5c208a61c919d04646279be5825ba92d97c490b5d4d28ea103eb820b1a259904574cb3e32eaca3f11c3031810e3d87ff4a
2 parents 6245c23 + fa3b442 commit c9b633d

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

.cirrus.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,15 @@ task:
9696
name: 'lint'
9797
<< : *BASE_TEMPLATE
9898
container:
99-
image: debian:bookworm
99+
dockerfile: ci/lint_imagefile
100100
cpu: 1
101101
memory: 1G
102102
# For faster CI feedback, immediately schedule the linters
103103
<< : *CREDITS_TEMPLATE
104-
test_runner_cache:
105-
folder: "/lint_test_runner"
106-
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-parse HEAD:test/lint/test_runner)
107-
python_cache:
108-
folder: "/python_build"
109-
fingerprint_script: cat .python-version /etc/os-release
110104
unshallow_script:
111105
- git fetch --unshallow --no-tags
112106
lint_script:
113-
- ./ci/lint_run_all.sh
107+
- ./ci/lint_run.sh
114108

115109
task:
116110
name: 'tidy'

ci/lint_run.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 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+
set -o errexit -o pipefail -o xtrace
9+
10+
# Only used in .cirrus.yml. Refer to test/lint/README.md on how to run locally.
11+
export PATH="/python_build/bin:${PATH}"
12+
export LINT_RUNNER_PATH="/lint_test_runner"
13+
./ci/lint/06_script.sh

ci/lint_run_all.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
export LC_ALL=C.UTF-8
88

9-
# Only used in .cirrus.yml. Refer to test/lint/README.md on how to run locally.
9+
# Only used in .cirrus.yml for stale re-runs of old pull request tasks. This
10+
# file can be removed in September 2025.
1011

1112
cp "./ci/retry/retry" "/ci_retry"
1213
cp "./.python-version" "/.python-version"

0 commit comments

Comments
 (0)