From 8d4b4d123565195cd1ba4d22cc48c362a6c295ee Mon Sep 17 00:00:00 2001 From: k9ert Date: Sat, 2 Jul 2022 14:54:32 +0200 Subject: [PATCH] Chore: fix broken cirrus build cache for bitcoind (#1786) * fix the broken build cache for bitcoind * fix install_noded * fix cirrus script * fix cirrus script part 2 * fix cirrus script part3 * Update .cirrus.yml Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com> * Update .cirrus.yml Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com> Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com> --- .cirrus.yml | 12 +++++++++--- tests/install_noded.sh | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 44ac843fc5..dc391a9e5a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -12,6 +12,8 @@ prep_stuff_template: &PREP_STUFF_TEMPLATE - cat pytest.ini | grep "addopts = " | cut -d'=' -f2 | sed 's/--/+/g' | tr '+' '\n' | grep bitcoin | cut -d' ' -f2 - cat tests/bitcoin_gitrev_pinned 2> /dev/null || true - cat /etc/os-release | grep VERSION + - cat ./tests/install_noded.sh + - echo "binary" # if the next line is --bitcoin binary, otherwise use echo "compile" - this ensures different caching keys. populate_script: ./tests/install_noded.sh --debug --bitcoin binary elementsd_installation_cache: folder: ./tests/elements @@ -19,12 +21,16 @@ prep_stuff_template: &PREP_STUFF_TEMPLATE - cat pytest.ini | grep "addopts = " | cut -d'=' -f2 | sed 's/--/+/g' | tr '+' '\n' | grep elements | cut -d' ' -f2 - cat tests/elements_gitrev_pinned 2> /dev/null || true - cat /etc/os-release | grep VERSION + - cat ./tests/install_noded.sh + - echo "binary" # if the next line is --elements binary, otherwise use echo "compile" - this ensures different caching keys. populate_script: ./tests/install_noded.sh --debug --elements binary verify_script: - echo " --> Version of python, virtualenv and pip3" - python3 --version && virtualenv --version && pip3 --version - echo " --> Executables in tests/elements/src" - - find tests/elements/src -maxdepth 1 -type f -executable -exec ls -ld {} \; + - find tests/elements/src -maxdepth 1 -type f -executable -exec ls -ld {} \; || true + - echo " --> Executables in tests/elements/bin" + - find tests/elements/bin -maxdepth 1 -type f -executable -exec ls -ld {} \; || true - echo " --> Executables in tests/bitcoin/src" - find tests/bitcoin/src -maxdepth 1 -type f -executable -exec ls -ld {} \; || true - echo " --> Executables in tests/bitcoin/bin" @@ -33,7 +39,8 @@ prep_stuff_template: &PREP_STUFF_TEMPLATE - tests/bitcoin/src/bitcoind -version | head -1 || true - tests/bitcoin/bin/bitcoind -version | head -1 || true - echo " --> elements version" - - tests/elements/src/elementsd -version | head -1 + - tests/elements/src/elementsd -version | head -1 || true + - tests/elements/bin/elementsd -version | head -1 || true pip_script: #folder: /tmp/cirrus-ci-build/.env @@ -43,7 +50,6 @@ prep_stuff_template: &PREP_STUFF_TEMPLATE - source ./.env/bin/activate - pip3 install -r requirements.txt --require-hashes && pip3 install -r test_requirements.txt install_script: - - ls -l ./tests/elements/src/ - source ./.env/bin/activate - pip3 install -e . diff --git a/tests/install_noded.sh b/tests/install_noded.sh index a0e1d09fa7..471725d25c 100755 --- a/tests/install_noded.sh +++ b/tests/install_noded.sh @@ -259,7 +259,7 @@ function sub_binary { find ./"$node_impl"/bin -maxdepth 1 -type f -executable -exec ls -ld {} \; fi echo " --> checking for ${node_impl}d" - test -x ./bitcoin/bin/${node_impl}d || exit 2 + test -x ./${node_impl}/bin/${node_impl}d || exit 2 echo " --> Finished installing ${node_impl}d binary" END=$(date +%s) DIFF=$(echo "$END - $START" | bc)