forked from zephir-lang/zephir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (60 loc) · 2.78 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
language: php
sudo: false
env:
global:
secure: lRYAjibgHrvbte19lJCP2AhoGCR1asJlSNeF+QAn/ZYdd+J+StqK7DybaBbgk6cs7uodJ34OuGlOsAmE3B/EG4Qb/r+nbjEt7cA0+6+YyUs0sBpHoQ3XeFbZSSRsYvY0jKVn5/yl24GTobTTejc6MOW5N1/KErJynmylyW6q+Z4=
php:
- 5.4
- 5.5
- 5.6
- 7.0
cache:
- apt
before_install:
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then openssl aes-256-cbc -k "$encryption_key" -in id_rsa.enc -out ~/.ssh/id_rsa -d; chmod 600 ~/.ssh/id_rsa; fi
- git config push.default simple
- git config --global user.email "[email protected]"
- git config --global user.name "TravisCI"
- git submodule --quiet update --init --recursive
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then git remote set-url origin [email protected]:phalcon/zephir.git; fi
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:
- $(phpenv which php) -d safe_mode=Off -d enable_dl=On 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_success:
- export ZEPHIR_TARGET="legacy"
- if [[ "$TRAVIS_PHP_VERSION" = "5.6" ]]; then export ZEPHIR_TARGET="ZendEngine_2"; fi
- if [[ "$TRAVIS_PHP_VERSION" = "7.0" ]]; then export ZEPHIR_TARGET="ZendEngine_3"; fi
- git checkout $TRAVIS_BRANCH
- rm -rf generated/$ZEPHIR_TARGET/{*,.*}
- cp -a ext/test/. generated/$ZEPHIR_TARGET
- git add -A generated/$ZEPHIR_TARGET
- 'git commit -m "chore($ZEPHIR_TARGET): $TRAVIS_COMMIT: regenerate test sources [ci skip]" generated/$ZEPHIR_TARGET'
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$ZEPHIR_TARGET" != "legacy" ]]; then git fetch && git rebase --autostash FETCH_HEAD && git push; fi
- if [[ "$TRAVIS_PULL_REQUEST" == "true" ]]; then git log -1 -p; fi
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