forked from FriendsOfPHP/Sami
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
48 lines (40 loc) · 1.53 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
language: php
env:
global:
- TWIG=2.x
matrix:
include:
- php: 5.3
env: TWIG=1.x
- php: 5.4
env: TWIG=1.x
- php: 5.5
- php: 5.6
- php: 5.6
env: BLACKFIRE=on
- php: 7.0
- php: hhvm
sudo: false
cache:
- $HOME/.composer/cache/files
before_install:
- |
if [[ "$BLACKFIRE" = "on" ]]; then
openssl aes-256-cbc -K $encrypted_16ab3ffdcd52_key -iv $encrypted_16ab3ffdcd52_iv -in .blackfire.travis.ini.enc -out ~/.blackfire.ini -d
curl -L https://blackfire.io/api/v1/releases/agent/linux/amd64 | tar zxpf -
chmod 755 agent && ./agent --config=~/.blackfire.ini --socket=unix:///tmp/blackfire.sock &
fi
- if [[ "$TWIG" = "2.x" ]]; then sed -i 's/~1.20|~2.0/~2.0/g' composer.json; composer update; fi
- if [[ "$TWIG" = "1.x" ]]; then sed -i 's/~1.20|~2.0/~1.20/g' composer.json; composer update; fi
install:
- travis_retry composer install
before_script:
- phpenv config-rm xdebug.ini || true
- |
if [[ "$BLACKFIRE" = "on" ]]; then
curl -L https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$(phpenv version-name | tr -d '.')-zts | tar zxpf -
echo "extension=$(pwd)/$(ls blackfire-*.so | tr -d '[[:space:]]')" > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/blackfire.ini
echo "blackfire.agent_socket=unix:///tmp/blackfire.sock" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/blackfire.ini
fi
script:
- phpunit