mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
Merge bitcoin/bitcoin#32250: ci: Slim down lint image
faeb1babe2
ci: refactor: Use version id over version codename consistently (MarcoFalke)fae322a43a
ci: Slim down lint image (MarcoFalke)3333273a8f
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: ACKfaeb1babe2
janb84: Re- ACK [faeb1ba
](faeb1babe2
) Tree-SHA512: 39103e61ec2587096213bc1ce55b80087f6f03775592827d8c96a366453b798570d912690bf96fde4685798e5fc8ee2695ce851f473b4c8782d1a4c50c65a594
This commit is contained in:
commit
cd01c9a173
7 changed files with 6 additions and 19 deletions
|
@ -12,10 +12,11 @@ pushd "/"
|
||||||
|
|
||||||
${CI_RETRY_EXE} apt-get update
|
${CI_RETRY_EXE} apt-get update
|
||||||
# Lint dependencies:
|
# Lint dependencies:
|
||||||
|
# - cargo (used to run the lint tests)
|
||||||
# - curl/xz-utils (to install shellcheck)
|
# - curl/xz-utils (to install shellcheck)
|
||||||
# - git (used in many lint scripts)
|
# - git (used in many lint scripts)
|
||||||
# - gpg (used by verify-commits)
|
# - gpg (used by verify-commits)
|
||||||
${CI_RETRY_EXE} apt-get install -y curl xz-utils git gpg
|
${CI_RETRY_EXE} apt-get install -y cargo curl xz-utils git gpg
|
||||||
|
|
||||||
PYTHON_PATH="/python_build"
|
PYTHON_PATH="/python_build"
|
||||||
if [ ! -d "${PYTHON_PATH}/bin" ]; then
|
if [ ! -d "${PYTHON_PATH}/bin" ]; then
|
||||||
|
@ -35,17 +36,6 @@ export PATH="${PYTHON_PATH}/bin:${PATH}"
|
||||||
command -v python3
|
command -v python3
|
||||||
python3 --version
|
python3 --version
|
||||||
|
|
||||||
export LINT_RUNNER_PATH="/lint_test_runner"
|
|
||||||
if [ ! -d "${LINT_RUNNER_PATH}" ]; then
|
|
||||||
${CI_RETRY_EXE} apt-get install -y cargo
|
|
||||||
(
|
|
||||||
cd "/test/lint/test_runner" || exit 1
|
|
||||||
cargo build
|
|
||||||
mkdir -p "${LINT_RUNNER_PATH}"
|
|
||||||
mv target/debug/test_runner "${LINT_RUNNER_PATH}"
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
${CI_RETRY_EXE} pip3 install \
|
${CI_RETRY_EXE} pip3 install \
|
||||||
codespell==2.2.6 \
|
codespell==2.2.6 \
|
||||||
lief==0.13.2 \
|
lief==0.13.2 \
|
||||||
|
|
|
@ -16,7 +16,7 @@ if [ -n "$CIRRUS_PR" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RUST_BACKTRACE=1 "${LINT_RUNNER_PATH}/test_runner"
|
RUST_BACKTRACE=1 cargo run --manifest-path "./test/lint/test_runner/Cargo.toml"
|
||||||
|
|
||||||
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then
|
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then
|
||||||
# Sanity check only the last few commits to get notified of missing sigs,
|
# Sanity check only the last few commits to get notified of missing sigs,
|
||||||
|
|
|
@ -11,7 +11,6 @@ export LC_ALL=C
|
||||||
git config --global --add safe.directory /bitcoin
|
git config --global --add safe.directory /bitcoin
|
||||||
|
|
||||||
export PATH="/python_build/bin:${PATH}"
|
export PATH="/python_build/bin:${PATH}"
|
||||||
export LINT_RUNNER_PATH="/lint_test_runner"
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
bash -ic "./ci/lint/06_script.sh"
|
bash -ic "./ci/lint/06_script.sh"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
# See test/lint/README.md for usage.
|
# See test/lint/README.md for usage.
|
||||||
|
|
||||||
FROM mirror.gcr.io/debian:bookworm
|
FROM mirror.gcr.io/ubuntu:24.04
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV LC_ALL=C.UTF-8
|
ENV LC_ALL=C.UTF-8
|
||||||
|
@ -13,7 +13,6 @@ COPY ./ci/retry/retry /ci_retry
|
||||||
COPY ./.python-version /.python-version
|
COPY ./.python-version /.python-version
|
||||||
COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh
|
COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh
|
||||||
COPY ./ci/lint/04_install.sh /install.sh
|
COPY ./ci/lint/04_install.sh /install.sh
|
||||||
COPY ./test/lint/test_runner /test/lint/test_runner
|
|
||||||
|
|
||||||
RUN /install.sh && \
|
RUN /install.sh && \
|
||||||
echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \
|
echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \
|
||||||
|
|
|
@ -9,5 +9,4 @@ set -o errexit -o pipefail -o xtrace
|
||||||
|
|
||||||
# Only used in .cirrus.yml. Refer to test/lint/README.md on how to run locally.
|
# Only used in .cirrus.yml. Refer to test/lint/README.md on how to run locally.
|
||||||
export PATH="/python_build/bin:${PATH}"
|
export PATH="/python_build/bin:${PATH}"
|
||||||
export LINT_RUNNER_PATH="/lint_test_runner"
|
|
||||||
./ci/lint/06_script.sh
|
./ci/lint/06_script.sh
|
||||||
|
|
|
@ -10,7 +10,7 @@ export HOST=arm-linux-gnueabihf
|
||||||
export DPKG_ADD_ARCH="armhf"
|
export DPKG_ADD_ARCH="armhf"
|
||||||
export PACKAGES="python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
|
export PACKAGES="python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf"
|
||||||
export CONTAINER_NAME=ci_arm_linux
|
export CONTAINER_NAME=ci_arm_linux
|
||||||
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
|
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
|
||||||
export CI_IMAGE_PLATFORM="linux/arm64"
|
export CI_IMAGE_PLATFORM="linux/arm64"
|
||||||
export USE_BUSY_BOX=true
|
export USE_BUSY_BOX=true
|
||||||
export RUN_UNIT_TESTS=true
|
export RUN_UNIT_TESTS=true
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
|
|
||||||
export CONTAINER_NAME=ci_win64
|
export CONTAINER_NAME=ci_win64
|
||||||
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
|
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
|
||||||
export CI_IMAGE_PLATFORM="linux/amd64"
|
export CI_IMAGE_PLATFORM="linux/amd64"
|
||||||
export HOST=x86_64-w64-mingw32
|
export HOST=x86_64-w64-mingw32
|
||||||
export PACKAGES="g++-mingw-w64-x86-64-posix nsis"
|
export PACKAGES="g++-mingw-w64-x86-64-posix nsis"
|
||||||
|
|
Loading…
Add table
Reference in a new issue