From 98f8696e681ce782994ec263441312c37f8794cc Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Tue, 21 May 2019 22:58:50 -0700 Subject: [PATCH] travis: install bitcoind 0.17.1 binaries --- .travis.yml | 7 ++----- scripts/install_bitcoind.sh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100755 scripts/install_bitcoind.sh diff --git a/.travis.yml b/.travis.yml index 4b497cec97e..ce492224336 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: go cache: directories: + - ~/bitcoin/bitcoin-0.17.1/bin - $GOCACHE - $GOPATH/pkg/mod - $GOPATH/src/github.com/btcsuite @@ -19,14 +20,10 @@ env: - COVER=true sudo: required -install: - - sudo add-apt-repository -y ppa:bitcoin/bitcoin -y - - sudo apt-get update -q - - sudo apt-get install bitcoind -y - - export PATH=$PATH:$PWD/linux-amd64/ script: - export GO111MODULE=on + - bash ./scripts/install_bitcoind.sh # Run unit tests with race condition detector. - 'if [ "$RACE" = true ]; then make travis-race ; fi' diff --git a/scripts/install_bitcoind.sh b/scripts/install_bitcoind.sh new file mode 100755 index 00000000000..f9047ab1658 --- /dev/null +++ b/scripts/install_bitcoind.sh @@ -0,0 +1,16 @@ +#!/usr/env bash + +export BITCOIND_VERSION=0.17.1 + +if sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind +then echo "bitcoind installed" +else + mkdir -p ~/bitcoin && \ + pushd ~/bitcoin && \ + wget https://bitcoin.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz && \ + tar xvfz bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz && \ + sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoind + /usr/local/bin/bitcoind && \ + popd +fi +