forked from zephir-lang/zephir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (44 loc) · 1.59 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
language: php
sudo: false
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
cache:
- apt
before_install:
- git submodule --quiet update --init --recursive
- ./unit-tests/ci/before_install.sh
install:
- export LD_LIBRARY_PATH="$TRAVIS_BUILD_DIR/build/lib":$LD_LIBRARY_PATH
- export LIBRARY_PATH="$TRAVIS_BUILD_DIR/build/lib":$LIBRARY_PATH
- export C_INCLUDE_PATH="$TRAVIS_BUILD_DIR/build/include"
- composer --prefer-source install
- ./install
before_script:
- if [[ "$TRAVIS_PHP_VERSION" == "7.0" ]]; then rm unit-tests/Extension/PregmatchTest.php; fi
- $(phpenv which php) compiler.php generate
- $(phpenv which php) compiler.php stubs
- $(phpenv which php) compiler.php api
- (cd ext; export CFLAGS="-g3 -O1 -fno-delete-null-pointer-checks -Wall -fvisibility=hidden -DZEPHIR_RELEASE=1"; phpize && ./configure --silent --enable-test && make -j2 && make install && phpenv config-add ../unit-tests/ci/test.ini)
- ulimit -c unlimited || true
script:
- vendor/bin/phpcs --standard=PSR2 --report=emacs --extensions=php --warning-severity=0 Library/ unit-tests/Extension/ unit-tests/Zephir/
- valgrind --read-var-info=yes --error-exitcode=1 --fullpath-after= --track-origins=yes --leak-check=full phpunit --debug --coverage-clover coverage.clover
after_failure:
- sudo apt-get -qq install gdb
- ./unit-tests/ci/after_failure.sh
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
notifications:
email:
addons:
apt:
packages:
- re2c
- valgrind