Skip to content

Commit

Permalink
Chore: fix broken cirrus build cache for bitcoind (cryptoadvance#1786)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Update .cirrus.yml

Co-authored-by: Manolis Mandrapilias <[email protected]>

Co-authored-by: Manolis Mandrapilias <[email protected]>
  • Loading branch information
2 people authored and ankur12-1610 committed Jul 12, 2022
1 parent 1a54219 commit f17d1f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,25 @@ 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
fingerprint_script:
- 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"
Expand All @@ -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
Expand All @@ -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 .

Expand Down
2 changes: 1 addition & 1 deletion tests/install_noded.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f17d1f4

Please sign in to comment.