forked from php-build/php-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
96 lines (91 loc) · 2.65 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
language: c
addons:
apt:
update: true
homebrew:
update: true
matrix:
include:
- os: linux
dist: trusty
env: DEFINITION=5.2.17
- os: linux
dist: xenial
env: DEFINITION=8.1snapshot
- os: osx
osx_image: xcode9.4
env: DEFINITION=5.5.38
- os: osx
osx_image: xcode9.4
env: DEFINITION=5.6.40
- os: osx
osx_image: xcode9.4
env: DEFINITION=7.0.33
- os: osx
osx_image: xcode9.4
env: DEFINITION=7.1.33
- os: osx
osx_image: xcode9.4
env: DEFINITION=7.2.34
- os: osx
osx_image: xcode9.4
env: DEFINITION=7.3.33
- os: osx
osx_image: xcode9.4
env: DEFINITION=7.4.33
- os: osx
osx_image: xcode9.4
env: DEFINITION=8.0.30
- os: osx
osx_image: xcode9.4
env: DEFINITION=8.1.28
- os: osx
osx_image: xcode9.4
env: DEFINITION=8.2.19
- os: osx
osx_image: xcode9.4
env: DEFINITION=8.3.7
before_install:
- export PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j2"
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ "$DEFINITION" =~ ^("5.2.".*)$ ]]; then
export PHP_BUILD_CONFIGURE_OPTS="--with-libdir=lib/x86_64-linux-gnu"
fi
if [[ "$DEFINITION" =~ ^("7.3.".*)$ ]]; then
export PHP_BUILD_CONFIGURE_OPTS="--without-libzip"
fi
if [[ "$DEFINITION" =~ ^("7.4.".*)$ ]]; then
set -xe \
&& mkdir -p /tmp/oniguruma \
&& cd /tmp/oniguruma \
&& curl -Ls https://github.com/kkos/oniguruma/releases/download/v6.9.4/onig-6.9.4.tar.gz \
| tar xzC /tmp/oniguruma --strip-components=1 \
&& ./configure --prefix=/usr/local \
&& make -j $(nproc) \
&& sudo make install \
&& cd $TRAVIS_BUILD_DIR
fi
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ "$DEFINITION" =~ ^("5.".*)$ ]]; then
./build-openssl-1.0.sh
export PHP_BUILD_CONFIGURE_OPTS="$PHP_BUILD_CONFIGURE_OPTS --with-openssl=/usr/local/opt/[email protected]"
fi
if [[ "$DEFINITION" =~ ^("8.0".*)$ ]]; then
brew install bison
export PATH="/usr/local/opt/[email protected]/bin:/usr/local/opt/bison/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/[email protected]/lib -L/usr/local/opt/bison/lib"
fi
fi
install:
- ./install-dependencies.sh
- git clone https://github.com/sstephenson/bats
- bats/install.sh $HOME
- export PATH=$HOME/bin:$HOME/libexec:$PATH
- bats --version
script:
- ./run-tests.sh $DEFINITION
after_failure:
- head -1000 $(ls -r /tmp/php-build*.log | head -n 1)