This repository has been archived by the owner on Mar 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (52 loc) · 1.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
sudo: false
language: php
cache:
directories:
- $HOME/.composer/cache
- $HOME/.build
- $HOME/.ccache
php:
- 7.1
- 7.2
- nightly
matrix:
allow_failures:
- php: nightly
env:
- PHP_V8=v0.2.1
PHP_REF=v0.5.0
addons:
apt:
sources:
- sourceline: ppa:pinepain/libv8-6.4
packages:
- libv8-6.4
- libv8-6.4-dev
- libv8-6.4-dbg
- ccache
before_install:
- pwd
- env
- export PATH="/usr/lib/ccache:$PATH"
- if [ ! -d "$HOME/.build/php-v8" ]; then cd $HOME/.build && git clone git://github.com/pinepain/php-v8.git; else cd $HOME/.build/php-v8 && git fetch; fi
- cd $HOME/.build/php-v8 && git checkout $PHP_V8
- if [ ! -d "$HOME/.build/php-ref" ]; then cd $HOME/.build && git clone git://github.com/pinepain/php-ref.git; else cd $HOME/.build/php-ref && git fetch; fi
- cd $HOME/.build/php-ref && git checkout $PHP_REF
install:
- cd $HOME/.build/php-v8 && phpize && ./configure && make install && make clean && phpize --clean && cd $TRAVIS_BUILD_DIR
- echo "extension=v8.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- cd $HOME/.build/php-ref && phpize && ./configure && make install && make clean && phpize --clean && cd $TRAVIS_BUILD_DIR
- echo "extension=ref.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- php --ri v8
- php --ri ref
- ccache -s
before_script:
- composer install
script:
- vendor/bin/phpstan analyse -c phpstan.neon --level 7 src || true
- vendor/bin/phpunit --coverage-text --configuration phpunit.xml --coverage-clover=coverage.clover
after_script:
- if [ "nightly" != "${TRAVIS_PHP_VERSION}" ]; then
wget https://scrutinizer-ci.com/ocular.phar &&
php ocular.phar code-coverage:upload --format=php-clover coverage.clover;
fi