-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
61 lines (49 loc) · 1.79 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
language: php
php:
- 7.0
- 7.1
- 7.2
- nightly
env:
# The default env behaviour: phpunit, no coverage, no style checks
- PHPUNIT=true BITCOIN_VERSION="0.16.0" NBOBTC_VERSION="2.0.2"
cache:
directories:
${HOME}/bitcoin
matrix:
fast_finish: true
exclude:
# Disable phpunit test on 7.0, reenable with COVERAGE
- php: 7.0
env: PHPUNIT=true BITCOIN_VERSION="0.16.0" NBOBTC_VERSION="2.0.2"
include:
# This reenables php7.0/phpunit test with COVERAGE
- php: 7.0
env: PHPUNIT=true BITCOIN_VERSION="0.16.0" COVERAGE=true CODESTYLE=true EXAMPLES=true
# 2.1.x
- php: 7.2
env: PHPUNIT=true BITCOIN_VERSION="0.16.0" NBOBTC_VERSION="2.1.0"
sudo: false
install:
- |
if [ "$BITCOIN_VERSION" != "" ] && [ ! -e "${HOME}/bitcoin" ]; then
mkdir ${HOME}/bitcoin
fi
- |
if [ "$BITCOIN_VERSION" != "" ] && [ ! -e "${HOME}/bitcoin/bitcoin-$BITCOIN_VERSION" ]; then
cd ${HOME}/bitcoin &&
wget https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz &&
tar xvf bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz &&
cd ${TRAVIS_BUILD_DIR}
else
echo "Had bitcoind"
fi
before_script:
- travis_retry composer install --prefer-source
- composer require nbobtc/bitcoind-php ${NBOBTC_VERSION}
- if [ "${COVERAGE}" != "true" ] && [ "${TRAVIS_PHP_VERSION}" != "nightly" ]; then phpenv config-rm xdebug.ini && echo "xdebug disabled"; fi
script:
- if [ "${PHPUNIT}" = "true" ]; then BITCOINDSERVER_DEBUG_START=true make phpunit-ci; fi
- if [ "${CODESTYLE}" = "true" ]; then make phpcs && echo "PHPCS OK"; fi
after_success:
- if [ "${COVERAGE}" = "true" ]; then make scrutinizer; fi