Skip to content

Commit cd01c9a

Browse files
committed
Merge bitcoin/bitcoin#32250: ci: Slim down lint image
faeb1ba ci: refactor: Use version id over version codename consistently (MarcoFalke) fae322a ci: Slim down lint image (MarcoFalke) 3333273 ci: Bump lint imagefile FROM base (MarcoFalke) Pull request description: Currently, the lint_test_runner is built and installed into the lint CI image. This is problematic, because it triggers a full image build on every change to its source code. Doing a build of the lint test_runner on every run is easier and faster. ACKs for top commit: l0rinc: ACK faeb1ba janb84: Re- ACK [faeb1ba](bitcoin/bitcoin@faeb1ba) Tree-SHA512: 39103e61ec2587096213bc1ce55b80087f6f03775592827d8c96a366453b798570d912690bf96fde4685798e5fc8ee2695ce851f473b4c8782d1a4c50c65a594
2 parents 7a3afe6 + faeb1ba commit cd01c9a

File tree

7 files changed

+6
-19
lines changed

7 files changed

+6
-19
lines changed

ci/lint/04_install.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ pushd "/"
1212

1313
${CI_RETRY_EXE} apt-get update
1414
# Lint dependencies:
15+
# - cargo (used to run the lint tests)
1516
# - curl/xz-utils (to install shellcheck)
1617
# - git (used in many lint scripts)
1718
# - gpg (used by verify-commits)
18-
${CI_RETRY_EXE} apt-get install -y curl xz-utils git gpg
19+
${CI_RETRY_EXE} apt-get install -y cargo curl xz-utils git gpg
1920

2021
PYTHON_PATH="/python_build"
2122
if [ ! -d "${PYTHON_PATH}/bin" ]; then
@@ -35,17 +36,6 @@ export PATH="${PYTHON_PATH}/bin:${PATH}"
3536
command -v python3
3637
python3 --version
3738

38-
export LINT_RUNNER_PATH="/lint_test_runner"
39-
if [ ! -d "${LINT_RUNNER_PATH}" ]; then
40-
${CI_RETRY_EXE} apt-get install -y cargo
41-
(
42-
cd "/test/lint/test_runner" || exit 1
43-
cargo build
44-
mkdir -p "${LINT_RUNNER_PATH}"
45-
mv target/debug/test_runner "${LINT_RUNNER_PATH}"
46-
)
47-
fi
48-
4939
${CI_RETRY_EXE} pip3 install \
5040
codespell==2.2.6 \
5141
lief==0.13.2 \

ci/lint/06_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [ -n "$CIRRUS_PR" ]; then
1616
fi
1717
fi
1818

19-
RUST_BACKTRACE=1 "${LINT_RUNNER_PATH}/test_runner"
19+
RUST_BACKTRACE=1 cargo run --manifest-path "./test/lint/test_runner/Cargo.toml"
2020

2121
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then
2222
# Sanity check only the last few commits to get notified of missing sigs,

ci/lint/container-entrypoint.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export LC_ALL=C
1111
git config --global --add safe.directory /bitcoin
1212

1313
export PATH="/python_build/bin:${PATH}"
14-
export LINT_RUNNER_PATH="/lint_test_runner"
1514

1615
if [ -z "$1" ]; then
1716
bash -ic "./ci/lint/06_script.sh"

ci/lint_imagefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# See test/lint/README.md for usage.
66

7-
FROM mirror.gcr.io/debian:bookworm
7+
FROM mirror.gcr.io/ubuntu:24.04
88

99
ENV DEBIAN_FRONTEND=noninteractive
1010
ENV LC_ALL=C.UTF-8
@@ -13,7 +13,6 @@ COPY ./ci/retry/retry /ci_retry
1313
COPY ./.python-version /.python-version
1414
COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh
1515
COPY ./ci/lint/04_install.sh /install.sh
16-
COPY ./test/lint/test_runner /test/lint/test_runner
1716

1817
RUN /install.sh && \
1918
echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \

ci/lint_run.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ set -o errexit -o pipefail -o xtrace
99

1010
# Only used in .cirrus.yml. Refer to test/lint/README.md on how to run locally.
1111
export PATH="/python_build/bin:${PATH}"
12-
export LINT_RUNNER_PATH="/lint_test_runner"
1312
./ci/lint/06_script.sh

ci/test/00_setup_env_arm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export HOST=arm-linux-gnueabihf
1010
export DPKG_ADD_ARCH="armhf"
1111
export PACKAGES="python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
1212
export CONTAINER_NAME=ci_arm_linux
13-
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:noble" # Check that https://packages.ubuntu.com/noble/g++-arm-linux-gnueabihf (version 13.3, similar to guix) can cross-compile
13+
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" # Check that https://packages.ubuntu.com/noble/g++-arm-linux-gnueabihf (version 13.x, similar to guix) can cross-compile
1414
export CI_IMAGE_PLATFORM="linux/arm64"
1515
export USE_BUSY_BOX=true
1616
export RUN_UNIT_TESTS=true

ci/test/00_setup_env_win64.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_win64
10-
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:noble" # Check that g++-mingw-w64-x86-64-posix (version 13.2, similar to guix) can cross-compile
10+
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04" # Check that https://packages.ubuntu.com/noble/g++-mingw-w64-x86-64-posix (version 13.x, similar to guix) can cross-compile
1111
export CI_IMAGE_PLATFORM="linux/amd64"
1212
export HOST=x86_64-w64-mingw32
1313
export PACKAGES="g++-mingw-w64-x86-64-posix nsis"

0 commit comments

Comments
 (0)