travis: update
[m6w6/ext-pq] / scripts / gen_travis_yml.php
1 #!/usr/bin/env php
2 # autogenerated file; do not edit
3 language: c
4 sudo: false
5
6 addons:
7 postgresql: 9.4
8 apt:
9 packages:
10 - php5-cli
11 - php-pear
12 - valgrind
13
14 cache:
15 directories:
16 - $HOME/cache
17
18 before_cache:
19 - find $HOME/cache -name '*.gcda' -o -name '*.gcno' -delete
20
21 env:
22 global:
23 - PQ_DSN="postgres://postgres@localhost/test"
24 matrix:
25 <?php
26
27 $gen = include "./travis/pecl/gen-matrix.php";
28 $cur = "7.3";
29 $env = $gen([
30 "PHP" => ["7.0", "7.1", "7.2", "master"],
31 "enable_debug" => "yes",
32 "enable_maintainer_zts" => "yes",
33 "enable_json" => "yes",
34 ], [
35 "PHP" => $cur,
36 "enable_json" => "no",
37 ], [
38 "PHP" => $cur,
39 "enable_json" => "yes",
40 "enable_debug",
41 "enable_maintainer_zts"
42 ], [
43 "PHP" => $cur,
44 "enable_json" => "yes",
45 "CFLAGS" => "'-O0 -g --coverage'",
46 "CXXFLAGS" => "'-O0 -g --coverage'",
47 ]);
48
49 foreach ($env as $g) {
50 foreach ($g as $e) {
51 printf(" - %s\n", $e);
52 }
53 }
54 ?>
55
56 matrix:
57 fast_finish: true
58 allow_failures:
59 <?php
60 $allow_failures = array_merge( ... array_map(function($a) {
61 return preg_grep('/^PHP=master /', $a);
62 }, $env));
63 foreach ($allow_failures as $e) {
64 printf(" - env: %s\n", $e);
65 }
66 ?>
67
68 install:
69 - |
70 if test "$PHP" = master; then \
71 make -f travis/pecl/Makefile reconf; \
72 make -f travis/pecl/Makefile pecl-rm pecl-clean PECL=raphf:raphf:2.0.0; \
73 fi
74 - make -f travis/pecl/Makefile php || make -f travis/pecl/Makefile clean php
75 - make -f travis/pecl/Makefile pecl PECL=raphf:raphf:2.0.0
76
77 before_script:
78 - psql -U postgres -c "CREATE DATABASE test"
79
80 script:
81 - make -f travis/pecl/Makefile ext PECL=pq
82 - make -f travis/pecl/Makefile test
83
84 after_success:
85 - test -n "$CFLAGS" && cd src/.libs && bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy