forked from reactphp/event-loop
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
90 lines (82 loc) · 3.78 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
language: php
# lock distro so new future defaults will not break the build
dist: xenial
matrix:
include:
- php: 5.3
dist: precise
before_install: [] # skip libuv
- php: 5.4
dist: trusty
before_install: [] # skip libuv
- php: 5.5
dist: trusty
before_install: [] # skip libuv
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
- php: hhvm-3.18
dist: trusty
before_install: [] # skip libuv
install:
- composer require phpunit/phpunit:^5 --dev --no-interaction # requires legacy phpunit & skip ./travis-init.sh
- name: "Windows"
os: windows
language: shell # no built-in php support
before_install:
- choco install php
- choco install composer
- export PATH="$(powershell -Command '("Process", "Machine" | % { [Environment]::GetEnvironmentVariable("PATH", $_) -Split ";" -Replace "\\$", "" } | Select -Unique | % { cygpath $_ }) -Join ":"')"
install:
- composer install
- name: "Windows PHP 7.2 with ext-event"
os: windows
language: shell # no built-in php support
before_install:
- curl -OL https://windows.php.net/downloads/pecl/releases/event/2.5.3/php_event-2.5.3-7.2-nts-vc15-x64.zip # latest version as of 2019-12-23
- choco install php --version=7.2.26 # latest version supported by ext-event as of 2019-12-23
- choco install composer
- export PATH="$(powershell -Command '("Process", "Machine" | % { [Environment]::GetEnvironmentVariable("PATH", $_) -Split ";" -Replace "\\$", "" } | Select -Unique | % { cygpath $_ }) -Join ":"')"
- php -r "\$z=new ZipArchive();\$z->open(glob('php_event*.zip')[0]);\$z->extractTo(dirname(php_ini_loaded_file()).'/ext','php_event.dll');"
- php -r "file_put_contents(php_ini_loaded_file(),'extension_dir=ext'.PHP_EOL,FILE_APPEND);"
- php -r "file_put_contents(php_ini_loaded_file(),'extension=sockets'.PHP_EOL,FILE_APPEND);" # ext-sockets needs to be loaded before ext-event
- php -r "file_put_contents(php_ini_loaded_file(),'extension=event'.PHP_EOL,FILE_APPEND);"
install:
- composer install
- name: "Windows PHP 7.4 with ext-uv"
os: windows
language: shell # no built-in php support
before_install:
- curl -OL https://windows.php.net/downloads/pecl/releases/uv/0.2.4/php_uv-0.2.4-7.4-nts-vc15-x64.zip # latest version as of 2019-12-23
- choco install php --version=7.4.0 # latest version supported by ext-uv as of 2019-12-23
- choco install composer
- export PATH="$(powershell -Command '("Process", "Machine" | % { [Environment]::GetEnvironmentVariable("PATH", $_) -Split ";" -Replace "\\$", "" } | Select -Unique | % { cygpath $_ }) -Join ":"')"
- php -r "\$z=new ZipArchive();\$z->open(glob('php_uv*.zip')[0]);\$z->extractTo(dirname(php_ini_loaded_file()).'/ext','php_uv.dll');\$z->extractTo(dirname(php_ini_loaded_file()),'libuv.dll');"
- php -r "file_put_contents(php_ini_loaded_file(),'extension_dir=ext'.PHP_EOL,FILE_APPEND);"
- php -r "file_put_contents(php_ini_loaded_file(),'extension=sockets'.PHP_EOL,FILE_APPEND);" # ext-sockets needs to be loaded before ext-uv
- php -r "file_put_contents(php_ini_loaded_file(),'extension=uv'.PHP_EOL,FILE_APPEND);"
install:
- composer install
allow_failures:
- php: hhvm-3.18
- os: windows
sudo: false
addons:
apt:
packages:
- libevent-dev # Used by 'event' and 'libevent' PHP extensions
cache:
directories:
- $HOME/.composer/cache/files
before_install:
- sudo add-apt-repository ppa:ondrej/php -y
- sudo apt-get update -q
- sudo apt-get install libuv1-dev
install:
- ./travis-init.sh
- composer install
script:
- ./vendor/bin/phpunit --coverage-text