-
-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy path.travis.yml
152 lines (130 loc) · 4.17 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Other projects which deals with images in PHP and uses travis:
# https://github.com/JBZoo/Image
# https://travis-ci.org/peter279k/php-image-converter/builds
language: php
#php:
# - 5.6
# - 7.1
# - 7.2
# - 7.3
# cache composer?
# https://blog.wyrihaximus.net/2015/07/composer-cache-on-travis/
# https://github.com/thephpleague/glide/blob/master/.travis.yml
cache:
#apt: true
directories:
- "$HOME/opt" # cache our imagick/gmagick install
- $HOME/vips
addons:
apt:
packages:
- libjpeg-dev
- libpng-dev
- libwebp-dev
# following for vips (taken from https://github.com/libvips/php-vips/blob/master/.travis.yml)
- gobject-introspection
- libcfitsio3-dev
- libfftw3-dev
- libgif-dev
- libgs-dev
- libgsf-1-dev
- libmatio-dev
- libopenslide-dev
- liborc-0.4-dev
- libpango1.0-dev
- libpoppler-glib-dev
sudo: false
matrix:
fast_finish: true
include:
- name: "PHP 8.0, Xenial"
php: 8.0
#dist: trusty
#dist: focal
#dist: bionic
dist: xenial
env:
- UPLOADCOVERAGE=0
- PHPSTAN=1
- INSTALLVIPS=1
#- VIPS_VERSION="8.6.3" # PS: This results in Vips WITH webp support
- VIPS_VERSION="8.10.6" # PS: This results in Vips WITHOUT webp support
- INSTALLIMAGEMAGICK=1
- IMAGEMAGICK_VERSION="7.0.11-11"
- XDEBUG_MODE=coverage
- PHPUNIT_VERSION="^9.3"
- COMPOSER_TEST_SCRIPT="test"
- name: "PHP 7.4, Xenial - With upload coverage"
php: 7.4
dist: xenial
env:
- UPLOADCOVERAGE=1
- PHPSTAN=1
- INSTALLVIPS=1
#- VIPS_VERSION="8.6.3"
- VIPS_VERSION="8.7.4"
- INSTALLIMAGICK=1
- IMAGEMAGICK_VERSION="7.0.8-43"
- PHPUNIT_VERSION="^8.0"
- COMPOSER_TEST_SCRIPT="test"
- name: "PHP 7.2, Xenial"
php: 7.2
dist: xenial
env:
- UPLOADCOVERAGE=0
- PHPSTAN=1
- INSTALLVIPS=1
- VIPS_VERSION="8.6.3"
#- VIPS_VERSION="8.7.4"
- INSTALLIMAGICK=1
- IMAGEMAGICK_VERSION="7.0.8-43"
- PHPUNIT_VERSION="^8.0"
- COMPOSER_TEST_SCRIPT="test-41"
- name: "PHP 5.6, Trusty"
php: 5.6
dist: trusty
#dist: xenial
#dist: bionic
env:
- UPLOADCOVERAGE=0
- PHPSTAN=0
- INSTALLVIPS=0
#- VIPS_VERSION="8.7.4"
- INSTALLIMAGEMAGICK=0 # imagemagick.org is currently down... - so installation cannot download gzip
- PHPUNIT_VERSION="5.7.27"
- COMPOSER_TEST_SCRIPT="test-41"
#allow_failures:
before_install:
# VIPS
- if [[ $INSTALLVIPS == 1 ]]; then bash install-vips.sh; fi
# Update PATH so that travis can find our imagemagick / gmagick
- export PATH=$HOME/opt/bin:$PATH
# ImageMagick
- if [[ $INSTALLIMAGEMAGICK == 1 ]]; then bash install-imagemagick-with-webp.sh; fi
# install imagick extension (if not already there)
# hm, not working
#- echo '' | pecl install imagick
# GMagick
- bash install-gmagick-with-webp.sh
#- export GMAGICK_PATH=$HOME/opt/bin
# Hm, extension is not working yet. When I get to install the extension I get the message:
# "Please provide a path to GraphicsMagick-config program."
# According to here: https://stackoverflow.com/questions/8626558/please-provide-the-prefix-of-graphicsmagick-installation-autodetect
# it is because the libgraphicsmagick1-dev package is not installed
# But is that needed when we are building ?
#- echo '' | pecl install gmagick-beta
before_script:
#- echo $PATH
- (composer self-update; true)
- composer require "phpunit/phpunit:${PHPUNIT_VERSION}" --dev
- composer install
- if [[ $PHPSTAN == 1 ]]; then composer require --dev phpstan/phpstan:"^0.12.8"; fi
script:
- composer ${COMPOSER_TEST_SCRIPT}
- if [[ $PHPSTAN == 1 ]]; then vendor/bin/phpstan analyse src --level=4; fi
after_script:
- |
if [[ $UPLOADCOVERAGE == 1 ]]; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi