forked from happypixels/laravel-shopr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (54 loc) · 1.71 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
dist: xenial
language: php
env:
global:
- ICU_VERSION=58.2
matrix:
include:
- php: 7.1
- php: 7.2
- php: 7.3
services:
- mysql
cache:
directories:
- /home/travis/.build/php-icu-58.2
- /home/travis/.build/icu-58.2
before_install:
- sudo apt-get update
- travis_retry composer self-update
- |
if [[ $ICU_VERSION ]]; then
ICU_DIR=$HOME/.build/icu-$ICU_VERSION
ICU_PHP_VERSION=$(php -r "echo PHP_VERSION;")
ICU_PHP_DIR=$HOME/.build/php-icu-$ICU_VERSION
echo $ICU_PHP_DIR
export ICU_PHP=$ICU_PHP_DIR/bin/php
if [ -f $ICU_PHP ]; then
echo "Using cached PHP directory."
else
wget -O icu-src.tgz http://download.icu-project.org/files/icu4c/$ICU_VERSION/icu4c-$(echo $ICU_VERSION | tr '.' '_')-src.tgz
mkdir icu-src && tar xzf icu-src.tgz -C icu-src --strip-components=1
pushd icu-src/source
./configure --prefix=$ICU_DIR
make && make install
popd
wget -O php-src.tgz http://us1.php.net/get/php-$ICU_PHP_VERSION.tar.gz/from/this/mirror
mkdir php-src && tar xzf php-src.tgz -C php-src --strip-components=1
pushd php-src
./configure --prefix=$ICU_PHP_DIR --enable-intl --with-icu-dir=$ICU_DIR
make && make install
popd
fi
$ICU_PHP -r "echo INTL_ICU_VERSION.PHP_EOL;"
$ICU_PHP -r "var_dump((new ReflectionClass('Normalizer'))->getConstants());"
fi
- $ICU_PHP -i
install:
- travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest
script:
- $ICU_PHP ./vendor/bin/phpunit
branches:
only:
- master
- improve-travis-build