You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

69 lines
2.2 KiB

sudo: required
dist: xenial
matrix:
include:
- os: osx
env: PIP_DOWNLOAD_CACHE=$HOME/Library/Caches/pip
addons:
homebrew:
packages:
- bitcoin
- libsodium
update: true
- os: linux
env: PIP_DOWNLOAD_CACHE=$HOME/.cache/pip
addons:
apt:
packages:
- python3-dev
- python3-pip
- virtualenv
- libsodium18
- os: linux
services: docker
env: DOCKER_IMG_JM=xenial-py3
- os: linux
services: docker
env: DOCKER_IMG_JM=bionic-py3
- os: linux
services: docker
env: DOCKER_IMG_JM=stretch-py3
- os: linux
services: docker
env: DOCKER_IMG_JM=centos7-py3
- os: linux
services: docker
env: DOCKER_IMG_JM=fedora27-py3
before_install:
- do_on(){ if [ "$TRAVIS_OS_NAME" = "$1" ]; then shift; "$@" ; fi; }
- on_host(){ if [ -z "$DOCKER_IMG_JM" ]; then "$@" ; fi; }
- should_run_dockers(){ if [ "$TRAVIS_EVENT_TYPE" = cron ] || [ -n "$TRAVIS_TAG" ] || echo "${TRAVIS_COMMIT_MESSAGE[@]}" | grep -q "TRAVIS_RUN_DOCKERS"; then return 0; else return 1; fi; }
- on_docker(){ if [ -n "$DOCKER_IMG_JM" ]; then "$@" ; fi; }
- do_on osx pip install virtualenv
cache:
directories:
- $HOME/bitcoin/bitcoin-0.19.1/bin
- $HOME/downloads
- $HOME/.cache/pip
- $HOME/Library/Caches/pip
- $HOME/Library/Caches/Homebrew
before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
install:
- mkdir -p "$HOME/downloads"
- mkdir -p "$TRAVIS_BUILD_DIR/deps/cache/"
- find "$HOME/downloads" -type f -exec cp -v {} "$TRAVIS_BUILD_DIR/deps/cache/" \;
- on_host do_on linux ./test/travis/install_bitcoind.sh
- on_host do_on linux ./install.sh --develop --with-qt
- on_host do_on osx virtualenv --python=python3 jmvenv
- on_host find "$TRAVIS_BUILD_DIR/deps/cache/" -type f -exec cp -v {} "$HOME/downloads/" \;
before_script:
- on_host source jmvenv/bin/activate
script:
- on_host bitcoind --help | head -1
- on_host ./test/run_tests.sh
- on_host do_on linux flake8 jmbase jmbitcoin jmclient jmdaemon scripts test
- on_docker ./test/Dockerfiles/build_docker.sh
after_success:
- on_docker echo "Success !"
- on_host coveralls