bitcoin-s/.travis.yml
Nadav Kohen 4d9692f61e
Crypto Project Refactor (#1380)
* Added crypto project and decoupled BitcoinSLogger from NetworkElement

Decoupled BitcoinSLogger from Factory

Moved NetworkElement into crypto project

Moved Factory and BitcoinSUtil (renamed to BytesUtil) to crypto project

Moved MaskedToString to crypto project

Added BytesUtil to imports and cleaned up CryptoUtil.recoverPoint

Moved the rest of crypto stuff to the crypto project

Moved crypto tests to crypto-test project

* Added documentation for crypto project
2020-04-30 12:34:53 -05:00

108 lines
4.3 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:
# this way of including jobs is not ideal... unfortunately it's not
# possible to nest env.matrix. could a better solution be to write
# a small script that generates a Travis config for us?
- os: linux
name: "Linux compile for 2.11"
env:
- TEST_COMMAND="test:compile"
scala:
- 2.11.12
- os: linux
name: "Secp256k1 Disabled Core Test"
env:
- DISABLE_SECP256K1="true"
- TEST_COMMAND="coreTest/test cryptoTest/test"
scala:
- 2.13.1
- 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.1
# 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.1
# compile website, to check for documentation regressions
- stage: test
name: Compile website and check formatting
env:
- TEST_COMMAND="test:scalafmtCheck docs/mdoc"
scala:
- 2.13.1
# 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