bitcoin-s/.travis.yml

106 lines
4.2 KiB
YAML

language: scala
env:
matrix:
- TEST_COMMAND="bitcoindRpcTest/test bitcoindRpc/coverageReport bitcoindRpc/coverageAggregate bitcoindRpc/coveralls eclairRpcTest/test eclairRpc/coverageReport eclairRpc/coverageAggregate eclairRpc/coveralls"
- TEST_COMMAND="appServerTest/test chainTest/test chain/coverageReport chain/coverageAggregate chain/coveralls nodeTest/test node/coverageReport node/coverageAggregate node/coveralls cryptoTest/test crypto/coverageReport crypto/coverageAggregate crypto/coveralls coreTest/test core/coverageReport core/coverageAggregate core/coveralls secp256k1jni/test zmq/test zmq/coverageReport zmq/coverageAggregate zmq/coveralls"
- TEST_COMMAND="keyManagerTest/test keyManager/coverageReport keyManager/coverageAggregate keyManager/coveralls walletTest/test wallet/coverageReport wallet/coverageAggregate wallet/coveralls"
os: linux
scala:
- 2.12.11
- 2.13.2
# Fiddling with Travis config is not fun:-(
# To avoid spending too much time waiting on Travis, you
# can use this tool to parse the config file locally: https://github.com/travis-ci/travis-yml
# After getting it set up, do:
# $ curl -X POST --data-binary @.travis.yml localhost:9292/v1/parse | jq
# this should return a big JSON object, where especially
# config.matrix.include tells you a lot about what the build
# is going to look like
matrix:
include:
- os: linux
name: "Secp256k1 Disabled Core Test"
env:
- DISABLE_SECP256K1="true"
- TEST_COMMAND="coreTest/test cryptoTest/test"
scala:
- 2.13.2
- os: linux
name: "PostgreSQL tests"
env:
- PG_ENABLED="1"
- TEST_COMMAND="dbCommonsTest/test chainTest/test nodeTest/test walletTest/test"
scala:
- 2.13.2
- os: osx
name: "macOS bitcoind and eclair tests"
env:
- TEST_COMMAND="bitcoindRpcTest/test bitcoindRpc/coverageReport bitcoindRpc/coverageAggregate bitcoindRpc/coveralls eclairRpcTest/test eclairRpc/coverageReport eclairRpc/coverageAggregate eclairRpc/coveralls"
scala:
- 2.13.2
# skip all test tagged as UsesExperimentalBitcoind
# TODO remove this condition once we have a neutrino enabled bitcoind binary for OSX
- os: osx
name: "macOS wallet and node tests"
env:
- CI="1"
- TEST_COMMAND="walletTest/test wallet/coverageReport wallet/coverageAggregate wallet/coveralls nodeTest/test node/coverageReport node/coverageAggregate node/coveralls"
scala:
- 2.13.2
# compile website, to check for documentation regressions
- stage: test
name: Compile website and check formatting
env:
- TEST_COMMAND="scalafmtCheck test:scalafmtCheck docs/mdoc"
scala:
- 2.13.2
# Release snapshots/versions of all libraries
# run ci-release only if previous stages passed
- stage: release
jdk: openjdk8
name: Publish library
script: sbt ci-release
# run website push only if website compilation passed
# we use custom sbt task that first compiles Scaladocs
# and then calls the docusaurusPublishGhpages task
- script: sbt docs/publishWebsite
name: Publish website
# These directories are cached to S3 at the end of the build
# https://www.scala-sbt.org/1.x/docs/Travis-CI-with-sbt.html#Caching
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt/boot/
- $HOME/.bitcoin-s/binaries/
# https://www.scala-sbt.org/1.x/docs/Travis-CI-with-sbt.html#Caching
before_cache:
# Cleanup the cached directories to avoid unnecessary cache updates
- rm -fv $HOME/.ivy2/.sbt.ivy.lock
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete
before_script:
- git fetch --tags
- git submodule sync
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:
# Modify PATH to include binaries we are about to download
- sbt ++$TRAVIS_SCALA_VERSION downloadBitcoind downloadEclair coverage $TEST_COMMAND