travis: fix build
[m6w6/ext-http] / scripts / gen_travis_yml.php
1 #!/usr/bin/env php
2 # autogenerated file; do not edit
3 language: c
4
5 addons:
6 apt:
7 packages:
8 - php-cli
9 - php-pear
10 - libcurl4-openssl-dev
11 - libidn11-dev
12 - libidn2-0-dev
13 - libicu-dev
14 - libevent-dev
15 - libbrotli-dev
16
17 dist: xenial
18
19 cache:
20 apt: true
21 directories:
22 - $HOME/cache
23 before_cache:
24 - find $HOME/cache -name '*.gcda' -o -name '*.gcno' -delete
25
26 env:
27 <?php
28
29 $gen = include "./travis/pecl/gen-matrix.php";
30 $cur = "8.0";
31 $env = $gen([
32 // most useful for all additional versions except current
33 "PHP" => ["master"],
34 "enable_debug" => "yes",
35 "enable_zts" => "yes",
36 "enable_iconv" => "yes",
37 ], [
38 // everything disabled for current
39 "PHP" => $cur,
40 "with_http_libicu_dir" => "no",
41 "with_http_libidn_dir" => "no",
42 "with_http_libidn2_dir" => "no",
43 "with_http_libcurl_dir" => "no",
44 "with_http_libevent_dir" => "no",
45 "with_http_libbrotli_dir" => "no",
46 ], [
47 // everything enabled for current, switching debug/zts
48 "PHP" => $cur,
49 // "PECLs" => "event", // for tests/client029.phpt
50 // "enable_sockets" => "yes", // needed by pecl/event
51 "enable_debug",
52 "enable_zts",
53 "enable_iconv" => "yes",
54 ], [
55 // once everything enabled for current, with coverage
56 "CFLAGS" => "'-O0 -g --coverage'",
57 "CXXFLAGS" => "'-O0 -g --coverage'",
58 "PHP" => $cur,
59 // "PECLs" => "event", // for tests/client029.phpt
60 // "enable_sockets" => "yes", // needed by pecl/event
61 "enable_iconv" => "yes",
62 [
63 "with_http_libicu_dir",
64 "with_http_libidn_dir",
65 "with_http_libidn2_dir",
66 ],
67 ]);
68 foreach ($env as $grp) {
69 foreach ($grp as $e) {
70 printf(" - %s\n", $e);
71 }
72 }
73 ?>
74
75 matrix:
76 fast_finish: true
77 allow_failures:
78 <?php
79 $allow_failures = array_merge( ... array_map(function($a) {
80 return preg_grep('/^PHP=(master) /', $a);
81 }, $env));
82 foreach ($allow_failures as $e) {
83 printf(" - env: %s\n", $e);
84 }
85 ?>
86
87 install:
88 - |
89 if test "$PHP" = master; then \
90 make -f travis/pecl/Makefile reconf; \
91 make -f travis/pecl/Makefile pecl-rm pecl-clean PECL=m6w6/ext-raphf.git:raphf:master; \
92 fi
93 - make -f travis/pecl/Makefile php || make -f travis/pecl/Makefile clean php
94 - make -f travis/pecl/Makefile pecl PECL=m6w6/ext-raphf.git:raphf:master
95 - |
96 if test -n "$PECLs"; then \
97 IFS=$','; \
98 for pecl in $PECLs; do \
99 make -f travis/pecl/Makefile pecl PECL=$pecl; \
100 done; \
101 unset IFS; \
102 fi
103
104 script:
105 - make -f travis/pecl/Makefile ext PECL=http
106 - make -f travis/pecl/Makefile test
107
108 after_script:
109 - make -f travis/pecl/Makefile cppcheck
110 after_failure:
111 - test -e tests/helper/server.log && cat tests/helper/server.log
112 after_success:
113 - test -n "$CFLAGS" && cd src/.libs && bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
114
115 notifications:
116 webhooks:
117 urls:
118 - https://webhooks.gitter.im/e/28d35158ac7e385bd14d
119 on_success: change
120 on_failure: always
121 on_start: never