forked from Bit-Wasp/bitcoin-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
76 lines (67 loc) · 3.26 KB
/
.travis.yml
File metadata and controls
76 lines (67 loc) · 3.26 KB
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
70
71
72
73
74
75
76
language: php
php:
- hhvm
- 5.6
- 7.0
env:
- EXT_SECP256K1="-dextension=secp256k1.so" EXT_BITCOINCONSENSUS="-dextension=bitcoinconsensus.so"
- EXT_SECP256K1="-dextension=secp256k1.so"
- EXT_BITCOINCONSENSUS="-dextension=bitcoinconsensus.so"
- EXT_SECP256K1=""
install:
- |
sh -c 'if [ "$EXT_SECP256K1" != "" ]; then \
git clone https://github.com/bitcoin/secp256k1.git \
&& cd secp256k1 \
&& ./autogen.sh && ./configure --disable-jni --enable-module-recovery --enable-module-ecdh --enable-module-schnorr --enable-experimental && make && sudo make install \
&& cd ..; fi'
- |
sh -c 'if [ "$EXT_SECP256K1" != "" ] && [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then \
git clone -b v0.0 https://github.com/Bit-Wasp/secp256k1-php \
&& cd secp256k1-php/secp256k1 \
&& phpize && ./configure && make && sudo make install \
&& cd ../..; fi';
- |
sh -c 'if [ "$EXT_SECP256K1" != "" ] && [ "$TRAVIS_PHP_VERSION" = "7.0" ]; then \
git clone -b v0.1 https://github.com/Bit-Wasp/secp256k1-php \
&& cd secp256k1-php/secp256k1 \
&& phpize && ./configure && make && sudo make install \
&& cd ../..; fi';
- |
sh -c 'if [ "$EXT_BITCOINCONSENSUS" != "" ]; then \
wget https://bitcoin.org/bin/bitcoin-core-0.13.0/test.rc1/bitcoin-0.13.0rc1-x86_64-linux-gnu.tar.gz && \
tar xvf bitcoin-0.13.0rc1-x86_64-linux-gnu.tar.gz && \
cd bitcoin-0.13.0 && \
sudo cp include/bitcoinconsensus.h /usr/include && \
sudo cp lib/libbitcoinconsensus.so.0.0.0 /usr/lib && \
sudo ln -s /usr/lib/libbitcoinconsensus.so.0.0.0 /usr/lib/libbitcoinconsensus.so && \
sudo ln -s /usr/lib/libbitcoinconsensus.so.0.0.0 /usr/lib/libbitcoinconsensus.so.0 && \
cd .. && \
git clone https://github.com/Bit-Wasp/bitcoinconsensus-php && \
cd bitcoinconsensus-php/bitcoinconsensus && \
phpize && ./configure --with-bitcoinconsensus && make && sudo make install && \
cd ../..; fi';
- composer update
script:
- php $EXT_SECP256K1 $EXT_BITCOINCONSENSUS vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- php vendor/bin/phpcs -n --standard=PSR1,PSR2 --report=full src/
## - php bin/phpmd src/ text build/rulesets/phpmd.xml
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi;'
matrix:
fast_finish: true
exclude:
- php: hhvm
env: EXT_SECP256K1="-dextension=secp256k1.so"
- php: hhvm
env: EXT_BITCOINCONSENSUS="-dextension=bitcoinconsensus.so"
- php: hhvm
env: EXT_SECP256K1="-dextension=secp256k1.so" EXT_BITCOINCONSENSUS="-dextension=bitcoinconsensus.so"
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/75311bf6cc64a613a399
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false