-
Notifications
You must be signed in to change notification settings - Fork 31
/
.travis.yml
62 lines (58 loc) · 2.4 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
language: php
compiler:
- gcc
addons:
apt:
packages:
- valgrind
php:
- 8.0
- nightly
env:
global:
- REPORT_EXIT_STATUS=1
- RULE="all"
- DEF="-q --show-diff"
- MEMCHECK="-m --show-mem"
matrix:
- OPCACHE=0 TEST_PHP_ARGS="$DEF"
- OPCACHE=1 TEST_PHP_ARGS="$DEF"
- OPCACHE=0 TEST_PHP_ARGS="$DEF $MEMCHECK"
- OPCACHE=1 TEST_PHP_ARGS="$DEF $MEMCHECK"
matrix:
allow_failures:
- php: nightly
env: OPCACHE=0 TEST_PHP_ARGS="$DEF"
- php: nightly
env: OPCACHE=1 TEST_PHP_ARGS="$DEF"
- php: nightly
env: OPCACHE=0 TEST_PHP_ARGS="$DEF $MEMCHECK"
- php: nightly
env: OPCACHE=1 TEST_PHP_ARGS="$DEF $MEMCHECK"
before_script:
- echo "{" >> $HOME/default.supp
- echo "String_Equality_Intentionally_Reads_Uninit_Memory" >> $HOME/default.supp
- echo "Memcheck:Cond" >> $HOME/default.supp
- echo "fun:zend_string_equal_val" >> $HOME/default.supp
- echo "}" >> $HOME/default.supp
- echo "#!/bin/bash" >> $HOME/bin/valgrind
- echo "/usr/bin/valgrind --suppressions=$HOME/default.supp \$@" >> $HOME/bin/valgrind
- chmod +x $HOME/bin/valgrind
- export PATH=$HOME/bin:$PATH
- echo "variables_order=EGPCS" >> $HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/php.ini
- echo > $HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/conf.d/xdebug.ini
- echo "extension=pcov.so" > $HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/conf.d/pcov.ini
- echo "pcov.enabled=1" >> $HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/conf.d/pcov.ini
- echo "opcache.enable_cli=$OPCACHE" > $HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/conf.d/opcache.ini
- echo "opcache.optimization_level=0x7FFEBFFF" >> $HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/conf.d/opcache.ini
script:
- phpize
- wget -q -O run-tests.php https://raw.githubusercontent.com/php/php-src/master/run-tests.php
- ./configure --$CONF
- make $RULE
- make install
- php run-tests.php -P
- git clone --depth=1 https://github.com/sebastianbergmann/php-code-coverage
- cd php-code-coverage
- composer install --ignore-platform-reqs
- vendor/bin/phpunit -c phpunit.xml