This repository has been archived by the owner on Feb 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
132 lines (119 loc) · 4.02 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
language: php
dist: trusty
sudo: false
matrix:
include:
- php: 7.1.3
- php: 7.2
- php: 7.3
fast_finish: true
allow_failures:
- php: 7.3
git:
depth: 1
cache:
# See: https://github.com/travis-ci/travis-ci/issues/8714
edge: true
apt: true
ccache: true
timeout: 604800
directories:
- .temp
- $HOME/.ccache
- $HOME/.composer/cache
- $HOME/pear
- $HOME/.local/opt/re2c
- $HOME/.cache/re2c
services:
- redis-server
- mysql
env:
global:
- MIN_PHP=7.1.3
- setup=stable
- CC="ccache gcc"
- PATH="$PATH:$HOME/bin"
- ZEPHIR_PARSER_VERSION="v1.1.2"
- RE2C_VERSION="1.0.3"
- REPORT_EXIT_STATUS=1
- NO_INTERACTION=1
- TEST_PHP_ARGS="--show-diff"
# Generating a valgrind log
# For more see: https://bugs.php.net/bugs-getting-valgrind-log.php
#
# Uncomment to correctly show the stack frames for extensions compiled as shared libraries
# - ZEND_DONT_UNLOAD_MODULES=1
# Uncomment to disable Zend memory manager before running PHP with valgrind
# - USE_ZEND_ALLOC=0
before_install:
- mysql -e "create database IF NOT EXISTS test;" -uroot
- phpenv config-add ci/redis.ini
- if [[ ! -z "${GH_TOKEN}" ]]; then composer config github-oauth.github.com ${GH_TOKEN}; echo "Configured Github token"; fi;
- export PHP_MAJOR="$(`phpenv which php` -r 'echo phpversion();' | cut -d '.' -f 1)"
- export PHP_MINOR="$(`phpenv which php` -r 'echo phpversion();' | cut -d '.' -f 2)"
- bash ci/pear_setup.sh
install:
- composer install --no-interaction --no-ansi --no-progress --dev --prefer-dist --no-suggest #--ignore-platform-reqs
# We'll do this in future for the all 7.x series
- bash ci/install-re2c $RE2C_VERSION
- bash ci/install_zephir_parser.sh
- bash ci/install_zephir.sh
# We still need this until end of support of PHP 5.x
- |
zephir generate --backend=ZendEngine3
# Use `-g -O0' for debug purposes
- export CFLAGS="-g3 -O1 -std=gnu90 -Wall"
- cd ${TRAVIS_BUILD_DIR}/ext
# Creating precompiled headers.
# If a `*.gch' file is not found then the normal header files will be used.
# For more see: http://en.wikipedia.org/wiki/Precompiled_header
- |
for file in `find kernel -name "*.h"`; do
echo -e "Creating a precompiled header: ext/${file} => ext/${file}.ghc ...";
$CC "$file" -I. $(php-config --includes) -o "$file.ghc";
done
# You may need to remove all `&> /dev/null' and `--silent' for debug purposes
- $(phpenv which phpize) &> /dev/null
- ./configure --silent --with-php-config=$(phpenv which php-config) --enable-leevel &> /dev/null
- make --silent -j"$(getconf _NPROCESSORS_ONLN)" &> /dev/null
- make --silent install
- phpenv config-add $TRAVIS_BUILD_DIR/ci/leevel.ini
# We use this file as our custom PHP config
- phpenv config-add $TRAVIS_BUILD_DIR/ci/ci.ini
# Some debug info is located here
- ls -al `$(phpenv which php-config) --extension-dir`
- $(phpenv which php) -v
- $(phpenv which php) -m
- $(phpenv which php) --ri leevel
before_script:
- ulimit -c unlimited -S || true
# Uncomment for debug purposes
# - echo '/tmp/core_%e.%p' | sudo tee /proc/sys/kernel/core_pattern &> /dev/null
# attempt to workaroung "ptrace: Operation not permitted"
# - sudo chmod +s $(which gdb)
script:
- cd $TRAVIS_BUILD_DIR
# To avoud this:
# sh: 1: /home/travis/build/phalcon/cphalcon/libtool: not found
- ln -s $TRAVIS_BUILD_DIR/ext/libtool $TRAVIS_BUILD_DIR/libtool
# Syntax recognize tests
- |
$(phpenv which php) $TRAVIS_BUILD_DIR/ext/run-tests.php \
-p $(phpenv which php) \
-g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" \
--offline \
--show-diff \
--set-timeout 120
# Run tests
- mkdir -p logs
- mkdir -p build/logs
- php vendor/bin/phinx migrate -e testing
- vendor/bin/phpunit -c phpunit.xml.dist
# Uncomment for debug purposes
# after_failure:
# - bash ci/after_failure.sh
notifications:
# Stop spam me. I already live on Travis CI and GitHub
email:
on_success: never
on_failure: never