-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
78 lines (70 loc) · 3.02 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
70
71
72
73
74
75
76
77
78
language: php
dist: trusty
sudo: required
env:
global:
- SECP256K1_REMOTE=https://github.com/bitcoin-core/secp256k1.git
- SECP256K1_COMMIT=fa3301713549d118e57ebe6551d062903ddd6b63
- DOCKER_CACHE_DIR=/home/travis/docker
cache:
directories:
- ${DOCKER_CACHE_DIR}
matrix:
include:
- php: 7.3
env:
- COVERAGE=true
- PHPQA_PHP_VERSION=7.3.7
- SECP256K1_REMOTE=https://github.com/jonasnick/secp256k1.git
- SECP256K1_COMMIT=a228e2f54d64692230ccb2937b12dd746c5157ed
- SECP256K1_CONFIGURE="--enable-module-ecdh --enable-module-recovery --enable-module-schnorrsig"
- EXT_SECP256K1_CONFIGURE="--with-secp256k1-config --with-module-recovery --with-module-ecdh --with-module-schnorrsig"
- php: 7.3
env:
- VALGRIND=true
- PHPQA_PHP_VERSION=7.3.7
- SECP256K1_REMOTE=https://github.com/jonasnick/secp256k1.git
- SECP256K1_COMMIT=a228e2f54d64692230ccb2937b12dd746c5157ed
- SECP256K1_CONFIGURE="--enable-module-ecdh --enable-module-recovery --enable-module-schnorrsig"
- EXT_SECP256K1_CONFIGURE="--with-secp256k1-config --with-module-recovery --with-module-ecdh --with-module-schnorrsig"
- php: 7.2
env:
- SECP256K1_CONFIGURE="--enable-module-ecdh --enable-module-recovery"
- php: 7.1
env:
- SECP256K1_CONFIGURE="--enable-module-ecdh --enable-module-recovery"
- php: 7.0
env:
- SECP256K1_CONFIGURE="--enable-module-ecdh --enable-module-recovery"
before_install:
- sudo apt-get install -qq libssl-dev
- if [ "${COVERAGE}" = "true" ]; then ./travis/docker-load-cache.sh secp256k1-${PHPQA_PHP_VERSION} || echo "failed"; fi
- if [ "${VALGRIND}" = "true" ]; then ./travis/docker-load-cache.sh secp256k1-${PHPQA_PHP_VERSION} || echo "failed"; fi
install:
- |
git clone $SECP256K1_REMOTE libsecp256k1 \
&& cd libsecp256k1 && git checkout $SECP256K1_COMMIT \
&& ./autogen.sh \
&& ./configure --enable-tests=no --enable-benchmark=no \
--enable-experimental $SECP256K1_CONFIGURE \
&& make -j$(nproc) && sudo make install && cd ..
- |
cd secp256k1 && phpize \
&& ./configure $EXT_SECP256K1_CONFIGURE \
&& make -j$(nproc) && sudo make install \
&& cd ..
- composer update
before_script:
- |
if [ "${COVERAGE}" = "true" ]; then \
cd travis/phpqa/ && ./build_container.sh && cd ../.. && \
./travis/docker-save-cache.sh secp256k1-{$PHPQA_PHP_VERSION}
fi
script:
- travis/verify_stubs.sh
- cd secp256k1/ && REPORT_EXIT_STATUS=1 make test || (find tests/*.log -type f -exec cat {} + ; exit 1) && cd ..
- travis/run_coverage_test.sh || exit 1
- travis/run_valgrind_test.sh || exit 1
- travis/validate_examples.sh || exit 1
after_script:
- bash <(curl -s https://codecov.io/bash)