travis: allow_failures
[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 - php5-cli
9 - php-pear
10 - libcurl4-openssl-dev
11 - libidn11-dev
12 - libidn2-0-dev
13 - libicu-dev
14 - libevent-dev
15
16 compiler:
17 - gcc
18 - clang
19
20 cache:
21 apt: true
22 directories:
23 - $HOME/cache
24 before_cache:
25 - find $HOME/cache -name '*.gcda' -o -name '*.gcno' -delete
26
27 env:
28 <?php
29
30 $gen = include "./travis/pecl/gen-matrix.php";
31 $cur = "7.3";
32 $env = $gen([
33 // most useful for all additional versions except current
34 "PHP" => ["7.0", "7.1", "7.2", "master"],
35 "enable_debug" => "yes",
36 "enable_maintainer_zts" => "yes",
37 "enable_json" => "yes",
38 "enable_hash" => "yes",
39 "enable_iconv" => "yes",
40 "with_http_libbrotli_dir" => "/home/travis/brotli"
41 ], [
42 // everything disabled for current
43 "PHP" => $cur,
44 "with_http_libicu_dir" => "no",
45 "with_http_libidn_dir" => "no",
46 "with_http_libidn2_dir" => "no",
47 "with_http_libcurl_dir" => "no",
48 "with_http_libevent_dir" => "no",
49 ], [
50 // everything enabled for current, switching on debug/zts
51 "PHP" => $cur,
52 "enable_debug",
53 "enable_maintainer_zts",
54 "enable_json" => "yes",
55 "enable_hash" => "yes",
56 "enable_iconv" => "yes",
57 "with_http_libbrotli_dir" => "/home/travis/brotli",
58 ], [
59 // once everything enabled for current, with coverage
60 "CFLAGS" => "'-O0 -g --coverage'",
61 "CXXFLAGS" => "'-O0 -g --coverage'",
62 "PHP" => $cur,
63 "enable_json" => "yes",
64 "enable_hash" => "yes",
65 "enable_iconv" => "yes",
66 "with_http_libbrotli_dir" => "/home/travis/brotli",
67 [
68 "with_http_libicu_dir",
69 "with_http_libidn_dir",
70 "with_http_libidn2_dir",
71 ],
72 ]);
73 $allow_failures = [];
74 foreach ($env as $grp) {
75 foreach ($grp as $e) {
76 if (!strncmp($e, "PHP=master", strlen("PHP=master"))) {
77 $allow_failures[] = $e;
78 }
79 printf(" - %s\n", $e);
80 }
81 }
82 ?>
83
84 matrix:
85 fast_finish: true
86 allow_failures:
87 <?php
88 foreach ($allow_failures as $e) {
89 printf(" - env: %s\n", $e);
90 }
91 ?>
92
93 install:
94 - ./travis/brotli.sh v1.0.2
95 - |
96 if test "$PHP" = master; then \
97 make -f travis/pecl/Makefile reconf; \
98 make -f travis/pecl/Makefile pecl-rm pecl-clean PECL=ext-raphf.git:raphf:master; \
99 make -f travis/pecl/Makefile pecl-rm pecl-clean PECL=ext-propro.git:propro:master; \
100 fi
101 - make -f travis/pecl/Makefile php || make -f travis/pecl/Makefile clean php
102 - make -f travis/pecl/Makefile pecl PECL=ext-raphf.git:raphf:master
103 - make -f travis/pecl/Makefile pecl PECL=ext-propro.git:propro:master
104
105 script:
106 - make -f travis/pecl/Makefile ext PECL=http
107 - make -f travis/pecl/Makefile test
108
109 after_script:
110 - make -f travis/pecl/Makefile cppcheck
111 after_failure:
112 - test -e tests/helper/server.log && cat tests/helper/server.log
113 after_success:
114 - test -n "$CFLAGS" && cd src/.libs && bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
115
116 notifications:
117 webhooks:
118 urls:
119 - https://webhooks.gitter.im/e/28d35158ac7e385bd14d
120 on_success: change
121 on_failure: always
122 on_start: never