forked from lstrojny/php-nanotime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (60 loc) · 1.74 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
dist: trusty
sudo: required
php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- nightly
git:
depth: 1
compiler:
- gcc
- clang
cache:
apt: true
ccache: true
timeout: 691200
env:
global:
- NO_INTERACTION=1
- ZEND_DONT_UNLOAD_MODULES=1
matrix:
- CC="gcc" CFLAGS="-g3 -O2 -Wall"
- CC="clang" CFLAGS="-g3 -O2 -fcolor-diagnostics -Wall"
matrix:
fast_finish: true
allow_failures:
- php: nightly
before_install:
- phpenv config-rm xdebug.ini || true
- if [[ ! -z "${GH_TOKEN}" ]]; then composer config github-oauth.github.com ${GH_TOKEN}; echo "Configured Github token"; fi;
install:
- sudo apt-get update -qq
- sudo apt-get install -y check
- git clone --depth=1 -v https://github.com/lstrojny/nanotime.git
- (cd nanotime && ./autogen.sh && make --silent -j"$(getconf _NPROCESSORS_ONLN)" &> /dev/null && sudo make install)
- sudo ln -s /usr/local/lib/libnanotime-1.0.0.so.0.0.0 /usr/lib/libnanotime-1.0.0.so.0
- $(phpenv which phpize)
- ./configure --with-libnanotime-prefix=/usr/local --with-php-config=$(phpenv which php-config) --enable-nanotime
- make -j"$(getconf _NPROCESSORS_ONLN)"
- make install
- echo "extension=$(pwd)/modules/nanotime.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- $(phpenv which php) --ri nanotime
script:
- printf "n\n" | make test
- sh test-report.sh
- $(phpenv which php) -r 'echo nano\second() . PHP_EOL;'
- $(phpenv which php) -r 'echo nano\time() . PHP_EOL;'
addons:
apt:
packages:
- valgrind
notifications:
email:
recipients:
- serghei@phalconphp.com
on_success: change
on_failure: always