bitcoin-s/.travis.yml
2019-06-03 17:00:11 +02:00

70 lines
2.3 KiB
YAML

# Use container-based infrastructure
sudo: false
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.2-beta8/eclair-node-0.2-beta8-52821b8.jar
- export ECLAIR_PATH=$(pwd)
before_script:
- git fetch --tags
stages:
- name: test
if: commit_message !~ /^Docs:/
- 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 coverageAggregate &&
sbt ++$TRAVIS_SCALA_VERSION coveralls
jobs:
include:
# 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