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