forked from krakjoe/cmark
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
75 lines (69 loc) · 2.76 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
language: php
compiler:
- gcc
addons:
apt:
packages:
- valgrind
php:
- 7.2
- 7.3
- 7.4snapshot
- nightly
env:
global:
- REPORT_EXIT_STATUS=1
- CONF="without-cmark-coverage"
- 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=0 TEST_PHP_ARGS="$DEF" CONF="with-cmark-coverage" RULE="cmark-test-coverage-travis"
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=0 TEST_PHP_ARGS="$DEF" CONF="with-cmark-coverage" RULE="cmark-test-coverage-travis"
before_install:
- test $CONF != "with-cmark-coverage" || pip install --user cpp-coveralls
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=cmark.so" > $HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/etc/conf.d/cmark.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
- git clone --depth=1 https://github.com/commonmark/cmark $HOME/libcmark-src
- cd $HOME/libcmark-src
- mkdir $HOME/libcmark
- mkdir build
- cd build
- cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/libcmark
- make
- make install
script:
- cd $TRAVIS_BUILD_DIR
- phpize
- wget -q -O run-tests.php https://raw.githubusercontent.com/php/php-src/master/run-tests.php
- ./configure --$CONF --with-cmark=$HOME/libcmark
- make $RULE
- make install
- php run-tests.php -P
after_success:
- test $CONF != "with-cmark-coverage" || coveralls -b $TRAVIS_BUILD_DIR -E Zend --gcov-options '\-lp'