From 1c2132ddd97dbf8fc908b0d1113bbb70e1a6a64e Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:58:49 +0100 Subject: [PATCH 1/3] Revert "ci: Upgrading pip version in macos environment" This reverts commit 057750c09d0a8331c33966d2cc2285ef82f08af8. It is not needed anymore in the GHA CI. This change will make the code much simpler in the following commit. --- ci/test/01_base_install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/test/01_base_install.sh b/ci/test/01_base_install.sh index 68b701f3ca615..e11936fae8d03 100755 --- a/ci/test/01_base_install.sh +++ b/ci/test/01_base_install.sh @@ -32,7 +32,6 @@ fi if [ -n "$PIP_PACKAGES" ]; then if [ "$CI_OS_NAME" == "macos" ]; then - sudo -H pip3 install --upgrade pip # shellcheck disable=SC2086 IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES else From b705bade44973e61655d5f847f49d97fb5bb8393 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:21:09 +0100 Subject: [PATCH 2/3] ci: Export `IN_GETOPT_BIN` on macOS This variable is required for the `retry` script. --- ci/test/01_base_install.sh | 9 ++------- ci/test/02_run_container.sh | 5 +++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/test/01_base_install.sh b/ci/test/01_base_install.sh index e11936fae8d03..a0b054ab40bc8 100755 --- a/ci/test/01_base_install.sh +++ b/ci/test/01_base_install.sh @@ -31,13 +31,8 @@ elif [ "$CI_OS_NAME" != "macos" ]; then fi if [ -n "$PIP_PACKAGES" ]; then - if [ "$CI_OS_NAME" == "macos" ]; then - # shellcheck disable=SC2086 - IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES - else - # shellcheck disable=SC2086 - ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES - fi + # shellcheck disable=SC2086 + ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES fi if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then diff --git a/ci/test/02_run_container.sh b/ci/test/02_run_container.sh index a7c1e22a6db13..f0bb541137919 100755 --- a/ci/test/02_run_container.sh +++ b/ci/test/02_run_container.sh @@ -54,6 +54,11 @@ else mkdir -p "${PREVIOUS_RELEASES_DIR}" fi +if [ "$CI_OS_NAME" == "macos" ]; then + IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" + export IN_GETOPT_BIN +fi + CI_EXEC () { $CI_EXEC_CMD_PREFIX bash -c "export PATH=${BINS_SCRATCH_DIR}:${BASE_ROOT_DIR}/ci/retry:\$PATH && cd \"${BASE_ROOT_DIR}\" && $*" } From 6889a807661cb570e1464ffdedb9ddb1ec970078 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Mon, 9 Oct 2023 17:19:34 +0200 Subject: [PATCH 3/3] ci: Add missing CI_RETRY_EXE before git clone --- ci/lint/04_install.sh | 2 +- ci/test/06_script_b.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/lint/04_install.sh b/ci/lint/04_install.sh index 8113500fb2e9f..b16040639263b 100755 --- a/ci/lint/04_install.sh +++ b/ci/lint/04_install.sh @@ -18,7 +18,7 @@ ${CI_RETRY_EXE} apt-get install -y curl xz-utils git gpg PYTHON_PATH="/python_build" if [ ! -d "${PYTHON_PATH}/bin" ]; then ( - git clone https://github.com/pyenv/pyenv.git + ${CI_RETRY_EXE} git clone https://github.com/pyenv/pyenv.git cd pyenv/plugins/python-build || exit 1 ./install.sh ) diff --git a/ci/test/06_script_b.sh b/ci/test/06_script_b.sh index 4d5f31b956c33..20464c3aea639 100755 --- a/ci/test/06_script_b.sh +++ b/ci/test/06_script_b.sh @@ -56,7 +56,7 @@ index 65e31724bc..f61b471953 100644 if [ "$RUN_FUZZ_TESTS" = "true" ]; then export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/ if [ ! -d "$DIR_FUZZ_IN" ]; then - git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}" + ${CI_RETRY_EXE} git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}" fi ( cd "${DIR_QA_ASSETS}"