18dccde8273ea594c31b3b553967b219453382b1
[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 = "7.3";
31 $env = $gen([
32 // most useful for all additional versions except current
33 "PHP" => ["7.0", "7.1", "7.2", "master"],
34 "enable_debug" => "yes",
35 "enable_maintainer_zts" => "yes",
36 "enable_json" => "yes",
37 "enable_hash" => "yes",
38 "enable_iconv" => "yes",
39 ], [
40 // everything disabled for current
41 "PHP" => $cur,
42 "with_http_libicu_dir" => "no",
43 "with_http_libidn_dir" => "no",
44 "with_http_libidn2_dir" => "no",
45 "with_http_libcurl_dir" => "no",
46 "with_http_libevent_dir" => "no",
47 "with_http_libbrotli_dir" => "no",
48 ], [
49 // everything enabled for current, switching on CC and debug/zts
50 "PHP" => $cur,
51 "CC" => ["gcc", "clang"],
52 "enable_debug",
53 "enable_maintainer_zts",
54 "enable_json" => "yes",
55 "enable_hash" => "yes",
56 "enable_iconv" => "yes",
57 ], [
58 // once everything enabled for current, with coverage
59 "CFLAGS" => "'-O0 -g --coverage'",
60 "CXXFLAGS" => "'-O0 -g --coverage'",
61 "PHP" => $cur,
62 "enable_json" => "yes",
63 "enable_hash" => "yes",
64 "enable_iconv" => "yes",
65 [
66 "with_http_libicu_dir",
67 "with_http_libidn_dir",
68 "with_http_libidn2_dir",
69 ],
70 ]);
71 foreach ($env as $grp) {
72 foreach ($grp as $e) {
73 printf(" - %s\n", $e);
74 }
75 }
76 ?>
77
78 matrix:
79 fast_finish: true
80 allow_failures:
81 <?php
82 $allow_failures = array_merge( ... array_map(function($a) {
83 return preg_grep('/^PHP=master /', $a);
84 }, $env));
85 foreach ($allow_failures as $e) {
86 printf(" - env: %s\n", $e);
87 }
88 ?>
89
90 install:
91 - |
92 if test "$PHP" = master; then \
93 make -f travis/pecl/Makefile reconf; \
94 make -f travis/pecl/Makefile pecl-rm pecl-clean PECL=ext-raphf.git:raphf:master; \
95 make -f travis/pecl/Makefile pecl-rm pecl-clean PECL=ext-propro.git:propro:master; \
96 fi
97 - make -f travis/pecl/Makefile php || make -f travis/pecl/Makefile clean php
98 - make -f travis/pecl/Makefile pecl PECL=ext-raphf.git:raphf:master
99 - make -f travis/pecl/Makefile pecl PECL=ext-propro.git:propro:master
100
101 script:
102 - make -f travis/pecl/Makefile ext PECL=http
103 - make -f travis/pecl/Makefile test
104
105 after_script:
106 - make -f travis/pecl/Makefile cppcheck
107 after_failure:
108 - test -e tests/helper/server.log && cat tests/helper/server.log
109 after_success:
110 - test -n "$CFLAGS" && cd src/.libs && bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
111
112 notifications:
113 webhooks:
114 urls:
115 - https://webhooks.gitter.im/e/28d35158ac7e385bd14d
116 on_success: change
117 on_failure: always
118 on_start: never