forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
139 lines (129 loc) · 5.61 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
os: linux
dist: xenial
language: php
stages:
- test
- name: phar
if: (branch = master OR tag IS present) && type = push
php:
- 7.1
- 7.2
- 7.3
- 7.4
- master
env:
global:
secure: "EpvZZ1v6JvefnfhgYm3Y2WprJxjgr6zDw2FJs+WISEtd1PHJToFJOE59vW7DRTcr5ycR4jrHyANqqIJWbH1k3A3wuyavmkissNKHbFK6vmLtAC9TuI/x5zBd+/T5yQ6i6uBe43nDzbkrQDYtGyNMdn1FXhWV9Z/hNCZ6uD0aiO5+d49NFJoexUOt3+LCxrZAGCCsm49KYRff/62QxO2Wajlfdhx+PLO0igY/i9N3oUQoVfbBEbP1ZSAPLv7ZkZGL4XdMMYEGYqnOeMWk39MYID34RmCYteWRfED4oqYbi4rzOpW8YeA/YkuHGThIykSLBrjdAfwUpekVEAI9r1gdrh91Gkpm/W/trFygdfI2gqev5GVjbYgmKQMm50l1W8wiD+Tb+AMUIttEXGjgwd+K2rn1RBHjM+CjPEWWdppg/7OOYVIJg0gIr94TN2LCQWDfFN5SxIIf0BpQmWteGEPCDpxCc3jsjpaVFXQ2jrui69Pdjr8/u7XCisQD9zpn4sQ43GZkdHC4rGOoBrjXQDWMB/LZyYNymJ6fkkuceqSgn6vDyBEkp9UBR1CIv4P8Ray86qEPodDFbPZMVX2JqDwUHMH3HVl4FINPYtVW3/VNUK7VihKd33+AjoX7anRTeq0T8jXUT4IF6tAxbO4DaDBB4XjQ3vCBDH15WxwIxy81KKA="
before_script:
- if php --ri xdebug >/dev/null; then phpenv config-rm xdebug.ini; fi
- composer update --no-interaction
script:
- vendor/bin/phing
jobs:
allow_failures:
- php: master
- os: windows
include:
- stage: test
php: 7.3
name: Compiler tests
script:
- |
cd compiler && \
composer install --no-interaction && \
vendor/bin/phpunit -c tests/phpunit.xml tests && \
../bin/phpstan analyse -l 8 src tests && \
php bin/compile && \
../tmp/phpstan.phar
- stage: phar
php: 7.3
before_install:
- |
openssl aes-256-cbc -K $encrypted_bd816b4f73f9_key -iv $encrypted_bd816b4f73f9_iv -in build/key.gpg.enc -out build/key.gpg -d && \
gpg --batch --import build/key.gpg && \
rm build/key.gpg
script:
- |
composer install --working-dir=compiler && \
php compiler/bin/compile && \
GIT_LOG=$(git log ${TRAVIS_COMMIT_RANGE} --reverse --pretty='%H %s' | sed -e 's/^/https:\/\/github.com\/phpstan\/phpstan-src\/commit\//') && \
git clone https://${GITHUB_TOKEN}@github.com/phpstan/phpstan.git phpstan-dist > /dev/null 2>&1 && \
cp tmp/phpstan.phar phpstan-dist/phpstan.phar && \
cp tmp/phpstan.phar phpstan-dist/phpstan && \
cd phpstan-dist && \
git config user.email "ondrej@mirtes.cz" && \
git config user.name "Ondrej Mirtes" && \
git config --global user.signingkey CF1A108D0E7AE720 && \
rm phpstan.phar.asc && \
gpg --batch -ab phpstan.phar && \
gpg --verify phpstan.phar.asc && \
git add phpstan phpstan.phar phpstan.phar.asc
if [ "${TRAVIS_TAG}" != "" ]; then
COMMIT_MSG="PHPStan ${TRAVIS_TAG}"
else
COMMIT_MSG="Updated PHPStan to commit ${TRAVIS_COMMIT}"
fi
git commit -S -m "${COMMIT_MSG}" -m "${GIT_LOG}" && \
git push --quiet origin master
if [ "${TRAVIS_TAG}" != "" ]; then
git tag -s ${TRAVIS_TAG} -m "${TRAVIS_TAG}" && \
git push --quiet origin ${TRAVIS_TAG}
fi
- stage: test
os: windows
language: shell # No PHP currently
env: PHP_VERSION=7.1.32
install:
- choco install php --version=${PHP_VERSION} --package-parameters="/InstallDir:c:\tools\php"
- choco install composer --ia "/DEV=C:\tools\php"
- cp 'C:\tools\php\php.ini-production' 'C:\tools\php\php.ini'
- echo 'memory_limit=1G' >> 'C:\tools\php\php.ini'
- echo 'date.timezone="UTC"' >> 'C:\tools\php\php.ini'
- echo 'extension_dir=ext' >> 'C:\tools\php\php.ini'
- echo 'extension=php_curl.dll' >> 'C:\tools\php\php.ini'
- echo 'extension=php_mbstring.dll' >> 'C:\tools\php\php.ini'
- echo 'extension=php_openssl.dll' >> 'C:\tools\php\php.ini'
- export PATH=/c/tools/php:$PATH
script:
- vendor/bin/phing tests
- vendor/bin/phing phpstan
- stage: test
os: windows
language: shell # No PHP currently
env: PHP_VERSION=7.2.23
install:
- choco install php --version=${PHP_VERSION} --package-parameters="/InstallDir:c:\tools\php"
- choco install composer --ia "/DEV=C:\tools\php"
- cp 'C:\tools\php\php.ini-production' 'C:\tools\php\php.ini'
- echo 'memory_limit=1G' >> 'C:\tools\php\php.ini'
- echo 'date.timezone="UTC"' >> 'C:\tools\php\php.ini'
- echo 'extension_dir=ext' >> 'C:\tools\php\php.ini'
- echo 'extension=php_curl.dll' >> 'C:\tools\php\php.ini'
- echo 'extension=php_mbstring.dll' >> 'C:\tools\php\php.ini'
- echo 'extension=php_openssl.dll' >> 'C:\tools\php\php.ini'
- export PATH=/c/tools/php:$PATH
script:
- vendor/bin/phing tests
- vendor/bin/phing phpstan
- stage: test
os: windows
language: shell # No PHP currently
env: PHP_VERSION=7.3.10
install:
- choco install php --version=${PHP_VERSION} --package-parameters="/InstallDir:c:\tools\php"
- choco install composer --ia "/DEV=C:\tools\php"
- cp 'C:\tools\php\php.ini-production' 'C:\tools\php\php.ini'
- echo 'memory_limit=1G' >> 'C:\tools\php\php.ini'
- echo 'date.timezone="UTC"' >> 'C:\tools\php\php.ini'
- echo 'extension_dir=ext' >> 'C:\tools\php\php.ini'
- echo 'extension=php_curl.dll' >> 'C:\tools\php\php.ini'
- echo 'extension=php_mbstring.dll' >> 'C:\tools\php\php.ini'
- echo 'extension=php_openssl.dll' >> 'C:\tools\php\php.ini'
- export PATH=/c/tools/php:$PATH
script:
- vendor/bin/phing tests
- vendor/bin/phing phpstan
cache:
directories:
- $HOME/.composer/cache
- tmp