bitcoin-s/.travis.yml
Torkel Rogstad 2dcda7da25 Tweak error logging of bitcoind responses
In this commit we move the error handling part of bitcoind responses
closer to the source of where they will happen, hopefully
giving better error messages.
2019-07-22 13:33:22 +02:00

82 lines
2.7 KiB
YAML

# We've been seeing very strange errors
# where bitcoind returns a 503 error.
# We have a suspicion that this comes from
# a service running on the Travis servers
# in non-sudo mode
sudo: true
language: scala
#https://docs.travis-ci.com/user/reference/osx#jdk-and-os-x
#Note: osx uses jdk10 by default which is NOT officially supported by scala
#This does not seem to be causing any errors right now
os:
- linux
- osx
scala:
- 2.11.12
- 2.12.8
# These directories are cached to S3 at the end of the build
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt/boot/
before_cache:
# Tricks to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
install:
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export PLATFORM="x86_64-linux-gnu"; else export PLATFORM="osx64"; fi
# # # bitcoind v16
- wget https://bitcoincore.org/bin/bitcoin-core-0.16.3/bitcoin-0.16.3-${PLATFORM}.tar.gz
- tar -xzf bitcoin-0.16.3-${PLATFORM}.tar.gz
- export BITCOIND_V16_PATH=$(pwd)/bitcoin-0.16.3/bin
# # # bitcoind v17
- wget https://bitcoincore.org/bin/bitcoin-core-0.17.0.1/bitcoin-0.17.0.1-${PLATFORM}.tar.gz
- tar -xzf bitcoin-0.17.0.1-${PLATFORM}.tar.gz
# tar places the unpacked directory in a not so intuitive location
- export BITCOIND_V17_PATH=$(pwd)/bitcoin-0.17.0/bin
# set default bitcoind to randomly choose between 0.16 and 0.17
- if [ $(($RANDOM%2)) == 1 ]; then BITCOIND_PATH=$BITCOIND_V16_PATH; else BITCOIND_PATH=$BITCOIND_V17_PATH; fi;
- export PATH=$BITCOIND_PATH:$PATH
# # # Eclair
- wget https://github.com/ACINQ/eclair/releases/download/v0.3.1/eclair-node-0.3.1-6906ecb.jar
- export ECLAIR_PATH=$(pwd)
before_script:
- git fetch --tags
stages:
- name: test
if:
commit_message !~ /^Docs:/ AND NOT
((branch = master AND type = push) OR (tag IS present))
# don't run tests on merge builds, just publish library
# and website
- name: release
if: ((branch = master AND type = push) OR (tag IS present)) AND NOT fork
script: sbt ++$TRAVIS_SCALA_VERSION coverage test &&
sbt ++$TRAVIS_SCALA_VERSION core/coverageReport &&
sbt ++$TRAVIS_SCALA_VERSION chain/coverageReport &&
sbt ++$TRAVIS_SCALA_VERSION coverageAggregate &&
sbt ++$TRAVIS_SCALA_VERSION coveralls
jobs:
include:
- stage: test
name: Compile website
script: sbt docs/mdoc
# run ci-release only if previous stages passed
- stage: release
name: Publish library
script: sbt ci-release
# run website push only if previous stages passed
# we use custom sbt task that first compiles Scaladocs
# and then calls the docusaurusPublishGhpages task
- script: sbt docs/publishWebsite
name: Publish website