new build matrix
[m6w6/ext-http] / scripts / gen_travis_yml.php
index 635563e59a82185d888fe9238330a136d0e9d7bf..b1e4135f9adc592ca5fdb1459d03ab9b163881c6 100755 (executable)
@@ -15,28 +15,66 @@ addons:
    - libicu-dev
    - libevent-dev
 
+compiler:
+ - gcc
+ - clang
+
 env:
 <?php
 
 $gen = include "./travis/pecl/gen-matrix.php";
+$cur = "7.2";
 $env = $gen([
-       "PHP" => ["7.0", "7.1", "7.2", "master"],
+// most useful for all additional versions except current
+       "PHP" => ["7.0", "7.1",  "master"],
+       "enable_debug" => "yes",
+       "enable_maintainer_zts" => "yes",
+       "enable_json" => "yes",
+       "enable_hash" => "yes",
+       "enable_iconv" => "yes",
+       "with_http_libbrotli_dir" => "/home/travis/brotli"
+], [
+// everything disabled for current
+       "PHP" => $cur,
+       "with_http_libicu_dir" => "no",
+       "with_http_libidn_dir" => "no",
+       "with_http_libidn2_dir" => "no",
+       "with_http_libcurl_dir" => "no",
+       "with_http_libevent_dir" => "no",
+], [
+// everything enabled for current, switching on debug/zts
+       "PHP" => $cur,
        "enable_debug",
        "enable_maintainer_zts",
-       "enable_json",
-       "enable_hash" => ["yes"],
-       "enable_iconv" => ["yes"],
-       "with_http_libicu_dir",
+       "enable_json" => "yes",
+       "enable_hash" => "yes",
+       "enable_iconv" => "yes",
+       "with_http_libbrotli_dir" => "/home/travis/brotli",
+], [
+// once everything enabled for current, with coverage
+       "CFLAGS" => "'-O0 -g --coverage'",
+       "CXXFLAGS" => "'-O0 -g --coverage'",
+       "PHP" => $cur,
+       "enable_json" => "yes",
+       "enable_hash" => "yes",
+       "enable_iconv" => "yes",
+       "with_http_libbrotli_dir" => "/home/travis/brotli",
+       [
+               "with_http_libicu_dir",
+               "with_http_libidn_dir",
+               "with_http_libidn2_dir",
+       ],
 ]);
-foreach ($env as $e) {
-       printf(" - %s\n", $e);
+foreach ($env as $grp) {
+       foreach ($grp as $e) {
+               printf(" - %s\n", $e);
+       }
 }
 
 ?>
-# once with gcov
- - CFLAGS="-O0 -g --coverage" CXXFLAGS="-O0 -g --coverage" PHP=master enable_json=yes enable_hash=yes enable_iconv=yes
 
 before_script:
+ - ./travis/brotli.sh
  - make -f travis/pecl/Makefile php
  - make -f travis/pecl/Makefile pecl PECL=ext-raphf.git:raphf:master
  - make -f travis/pecl/Makefile pecl PECL=ext-propro.git:propro:master
@@ -44,7 +82,7 @@ before_script:
 
 script:
  - make -f travis/pecl/Makefile test
- - make -f travis/pecl/Makefile cppcheck
+ - make -f travis/pecl/Makefile cppcheck CPPCHECK_EXITCODE=0
 
 after_failure:
  - test -e tests/helper/server.log && cat tests/helper/server.log