mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Merge bitcoin/bitcoin#31948: ci: [lint] Use Cirrus dockerfile cache
fa3b442715
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: ACKfa3b442715
Tree-SHA512: 243d78219639b83721d4e5cb32d16e5c208a61c919d04646279be5825ba92d97c490b5d4d28ea103eb820b1a259904574cb3e32eaca3f11c3031810e3d87ff4a
This commit is contained in:
commit
c9b633d119
3 changed files with 17 additions and 9 deletions
10
.cirrus.yml
10
.cirrus.yml
|
@ -96,21 +96,15 @@ task:
|
||||||
name: 'lint'
|
name: 'lint'
|
||||||
<< : *BASE_TEMPLATE
|
<< : *BASE_TEMPLATE
|
||||||
container:
|
container:
|
||||||
image: debian:bookworm
|
dockerfile: ci/lint_imagefile
|
||||||
cpu: 1
|
cpu: 1
|
||||||
memory: 1G
|
memory: 1G
|
||||||
# For faster CI feedback, immediately schedule the linters
|
# For faster CI feedback, immediately schedule the linters
|
||||||
<< : *CREDITS_TEMPLATE
|
<< : *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:
|
unshallow_script:
|
||||||
- git fetch --unshallow --no-tags
|
- git fetch --unshallow --no-tags
|
||||||
lint_script:
|
lint_script:
|
||||||
- ./ci/lint_run_all.sh
|
- ./ci/lint_run.sh
|
||||||
|
|
||||||
task:
|
task:
|
||||||
name: 'tidy'
|
name: 'tidy'
|
||||||
|
|
13
ci/lint_run.sh
Executable file
13
ci/lint_run.sh
Executable 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
|
|
@ -6,7 +6,8 @@
|
||||||
|
|
||||||
export LC_ALL=C.UTF-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 "./ci/retry/retry" "/ci_retry"
|
||||||
cp "./.python-version" "/.python-version"
|
cp "./.python-version" "/.python-version"
|
||||||
|
|
Loading…
Add table
Reference in a new issue