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