prepare release 2.1.5
[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 compiler:
15 - gcc
16 - clang
17
18 cache:
19 directories:
20 - $HOME/cache
21
22 before_cache:
23 - find $HOME/cache -name '*.gcda' -o -name '*.gcno' -delete
24
25 env:
26 global:
27 - PQ_DSN="postgres://postgres@localhost/test"
28 matrix:
29 <?php
30
31 $gen = include "./travis/pecl/gen-matrix.php";
32 $cur = "7.2";
33 $env = $gen([
34 "PHP" => ["7.0", "7.1", "7.3", "master"],
35 "enable_debug" => "yes",
36 "enable_maintainer_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_maintainer_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
61 install:
62 - |
63 if test "$PHP" = master; then \
64 make -f travis/pecl/Makefile reconf; \
65 make -f travis/pecl/Makefile pecl-rm pecl-clean PECL=raphf:raphf:2.0.0; \
66 fi
67 - make -f travis/pecl/Makefile php || make -f travis/pecl/Makefile clean php
68 - make -f travis/pecl/Makefile pecl PECL=raphf:raphf:2.0.0
69
70 before_script:
71 - psql -U postgres -c "CREATE DATABASE test"
72
73 script:
74 - make -f travis/pecl/Makefile ext PECL=pq
75 - make -f travis/pecl/Makefile test
76
77 after_success:
78 - test -n "$CFLAGS" && cd src/.libs && bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy