xref: /PHP-7.4/.travis.yml (revision 46d6daea)
1git:
2  quiet: true
3
4dist: xenial
5language: c
6sudo: required
7addons:
8  apt:
9    packages:
10      - locales
11      - language-pack-de
12      - re2c
13      - ccache
14      - mysql-server
15      - libaspell-dev
16      - libbz2-dev
17      - libcurl4-gnutls-dev
18      - libenchant-dev
19      - libfreetype6-dev
20      - libgmp-dev
21      - libicu-dev
22      - libjpeg-dev
23      - libkrb5-dev
24      - libonig-dev
25      - libpng-dev
26      - libpq-dev
27      - libpspell-dev
28      - libsasl2-dev
29      - libsqlite3-dev
30      - libsodium-dev
31      - libtidy-dev
32      - libwebp-dev
33      - libxml2-dev
34      - libxpm-dev
35      - libxslt1-dev
36      - libzip-dev
37
38
39services:
40  - mysql
41  - postgresql
42
43notifications:
44    email:
45       on_failure: change
46    irc:
47      template:
48        - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} -  Change view : %{compare_url} - Build details : %{build_url}"
49      channels:
50        - "irc.efnet.org#php.pecl"
51      on_success: change
52      on_failure: always
53
54cache:
55    apt: true
56    ccache: true
57
58env:
59    global:
60      - MYSQL_TEST_HOST=127.0.0.1
61      - MYSQL_TEST_USER=travis
62      - PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
63      - PDO_MYSQL_TEST_USER=travis
64      - PDO_MYSQL_TEST_PASS=
65      - PDO_MYSQL_TEST_HOST=127.0.0.1
66      - PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password="
67      - REPORT_EXIT_STATUS=1
68
69jobs:
70    include:
71        - env: ENABLE_MAINTAINER_ZTS=0 ENABLE_DEBUG=0
72          arch: amd64
73          if: type = cron
74        - env: ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1
75          arch: amd64
76          if: type = cron
77        - env: ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1 SKIP_IO_CAPTURE_TESTS=1 ARM64=1
78          arch: arm64
79          if: type = cron
80
81before_script:
82    - ccache --version
83    - ccache --zero-stats
84    - export USE_CCACHE=1
85    # Enable IPv6
86    - sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
87    # Compile PHP
88    - travis_wait ./travis/compile.sh
89    # Setup Extensions
90    - ./travis/setup-mysql.sh
91    - ./travis/setup-pgsql.sh
92
93# Run PHPs run-tests.php
94script:
95    # ARM64 CI reports nproc=32, which is excessive.
96    - if [ -z "$ARM64" ]; then export JOBS=$(nproc); else export JOBS=16; fi
97    - ./sapi/cli/php run-tests.php -P -d extension=`pwd`/modules/zend_test.so $(if [ $ENABLE_DEBUG == 0 ]; then echo "-d opcache.enable_cli=1 -d opcache.protect_memory=1 -d zend_extension=`pwd`/modules/opcache.so"; fi) -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --offline --show-diff --show-slow 1000 --set-timeout 120 -j$JOBS
98    - sapi/cli/php -d extension_dir=`pwd`/modules -r 'dl("zend_test");'
99
100after_success:
101    - ccache --show-stats
102