Merge pull request #4680 from guggero/travis-bitcoind-speedup
Travis+GitHub: update bitcoind to 0.20.1, extract bitcoind binary from docker image to speed up download
This commit is contained in:
commit
916b75fd4e
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
@ -17,7 +17,7 @@ env:
|
|||||||
GOCACHE: /home/runner/work/go/pkg/build
|
GOCACHE: /home/runner/work/go/pkg/build
|
||||||
GOPATH: /home/runner/work/go
|
GOPATH: /home/runner/work/go
|
||||||
DOWNLOAD_CACHE: /home/runner/work/download_cache
|
DOWNLOAD_CACHE: /home/runner/work/download_cache
|
||||||
BITCOIN_VERSION: 0.19.1
|
BITCOIN_VERSION: 0.20.1
|
||||||
GO_VERSION: 1.15.2
|
GO_VERSION: 1.15.2
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -236,14 +236,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: '~${{ env.GO_VERSION }}'
|
go-version: '~${{ env.GO_VERSION }}'
|
||||||
|
|
||||||
- name: bitcoin cache
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: /home/runner/bitcoin/bitcoin-${{ env.BITCOIN_VERSION }}/bin
|
|
||||||
key: lnd-${{ runner.os }}-bitcoin-${{ env.BITCOIN_VERSION }}
|
|
||||||
restore-keys: |
|
|
||||||
lnd-${{ runner.os }}-bitcoin-${{ env.BITCOIN_VERSION }}
|
|
||||||
|
|
||||||
- name: install bitcoind
|
- name: install bitcoind
|
||||||
run: ./scripts/install_bitcoind.sh
|
run: ./scripts/install_bitcoind.sh
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
language: go
|
language: go
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- ~/bitcoin/bitcoin-0.19.1/bin
|
|
||||||
- $DOWNLOAD_CACHE
|
- $DOWNLOAD_CACHE
|
||||||
- $GOCACHE
|
- $GOCACHE
|
||||||
- $GOPATH/pkg/mod
|
- $GOPATH/pkg/mod
|
||||||
@ -23,6 +22,7 @@ env:
|
|||||||
global:
|
global:
|
||||||
- GOCACHE=$HOME/.go-build
|
- GOCACHE=$HOME/.go-build
|
||||||
- DOWNLOAD_CACHE=$HOME/download_cache
|
- DOWNLOAD_CACHE=$HOME/download_cache
|
||||||
|
- BITCOIN_VERSION=0.20.1
|
||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
|
@ -2,17 +2,9 @@
|
|||||||
|
|
||||||
set -ev
|
set -ev
|
||||||
|
|
||||||
export BITCOIND_VERSION=0.20.0
|
BITCOIND_VERSION=${BITCOIN_VERSION:-0.20.1}
|
||||||
|
|
||||||
if sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind
|
|
||||||
then
|
|
||||||
echo "found cached bitcoind"
|
|
||||||
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
|
|
||||||
|
|
||||||
|
docker pull ruimarinho/bitcoin-core:$BITCOIND_VERSION
|
||||||
|
CONTAINER_ID=$(docker create ruimarinho/bitcoin-core:$BITCOIND_VERSION)
|
||||||
|
sudo docker cp $CONTAINER_ID:/opt/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind
|
||||||
|
docker rm $CONTAINER_ID
|
||||||
|
Loading…
Reference in New Issue
Block a user