mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 11:27:28 -03:00
lint: Use consistent out-of-tree build for python and test_runner
This mirrors the build by ./ci/lint_imagefile, which is done out-of-tree in "/". Otherwise, there could be errors due to a dirty tree.
This commit is contained in:
parent
fa0f859885
commit
fa8d73e86e
2 changed files with 9 additions and 2 deletions
|
@ -8,6 +8,8 @@ export LC_ALL=C
|
||||||
|
|
||||||
export CI_RETRY_EXE="/ci_retry --"
|
export CI_RETRY_EXE="/ci_retry --"
|
||||||
|
|
||||||
|
pushd "/"
|
||||||
|
|
||||||
${CI_RETRY_EXE} apt-get update
|
${CI_RETRY_EXE} apt-get update
|
||||||
# Lint dependencies:
|
# Lint dependencies:
|
||||||
# - automake pkg-config libtool (for lint_includes_build_config)
|
# - automake pkg-config libtool (for lint_includes_build_config)
|
||||||
|
@ -28,7 +30,7 @@ if [ ! -d "${PYTHON_PATH}/bin" ]; then
|
||||||
libbz2-dev libreadline-dev libsqlite3-dev curl llvm \
|
libbz2-dev libreadline-dev libsqlite3-dev curl llvm \
|
||||||
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
|
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
|
||||||
clang
|
clang
|
||||||
env CC=clang python-build "$(cat "./.python-version")" "${PYTHON_PATH}"
|
env CC=clang python-build "$(cat "/.python-version")" "${PYTHON_PATH}"
|
||||||
fi
|
fi
|
||||||
export PATH="${PYTHON_PATH}/bin:${PATH}"
|
export PATH="${PYTHON_PATH}/bin:${PATH}"
|
||||||
command -v python3
|
command -v python3
|
||||||
|
@ -38,7 +40,7 @@ export LINT_RUNNER_PATH="/lint_test_runner"
|
||||||
if [ ! -d "${LINT_RUNNER_PATH}" ]; then
|
if [ ! -d "${LINT_RUNNER_PATH}" ]; then
|
||||||
${CI_RETRY_EXE} apt-get install -y cargo
|
${CI_RETRY_EXE} apt-get install -y cargo
|
||||||
(
|
(
|
||||||
cd ./test/lint/test_runner || exit 1
|
cd "/test/lint/test_runner" || exit 1
|
||||||
cargo build
|
cargo build
|
||||||
mkdir -p "${LINT_RUNNER_PATH}"
|
mkdir -p "${LINT_RUNNER_PATH}"
|
||||||
mv target/debug/test_runner "${LINT_RUNNER_PATH}"
|
mv target/debug/test_runner "${LINT_RUNNER_PATH}"
|
||||||
|
@ -62,3 +64,5 @@ MLC_VERSION=v0.18.0
|
||||||
MLC_BIN=mlc-x86_64-linux
|
MLC_BIN=mlc-x86_64-linux
|
||||||
curl -sL "https://github.com/becheran/mlc/releases/download/${MLC_VERSION}/${MLC_BIN}" -o "/usr/bin/mlc"
|
curl -sL "https://github.com/becheran/mlc/releases/download/${MLC_VERSION}/${MLC_BIN}" -o "/usr/bin/mlc"
|
||||||
chmod +x /usr/bin/mlc
|
chmod +x /usr/bin/mlc
|
||||||
|
|
||||||
|
popd || exit
|
||||||
|
|
|
@ -9,6 +9,9 @@ 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. Refer to test/lint/README.md on how to run locally.
|
||||||
|
|
||||||
cp "./ci/retry/retry" "/ci_retry"
|
cp "./ci/retry/retry" "/ci_retry"
|
||||||
|
cp "./.python-version" "/.python-version"
|
||||||
|
mkdir --parents "/test/lint"
|
||||||
|
cp --recursive "./test/lint/test_runner" "/test/lint/"
|
||||||
set -o errexit; source ./ci/lint/04_install.sh
|
set -o errexit; source ./ci/lint/04_install.sh
|
||||||
set -o errexit
|
set -o errexit
|
||||||
./ci/lint/06_script.sh
|
./ci/lint/06_script.sh
|
||||||
|
|
Loading…
Reference in a new issue