forked from JoinMarket-Org/joinmarket-clientserver
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
69 lines (69 loc) · 2.24 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
- python-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