1
0
mirror of https://github.com/danog/ext-pq.git synced 2024-11-26 20:04:44 +01:00
ext-pq/scripts/gen_travis_yml.php

91 lines
1.8 KiB
PHP
Raw Permalink Normal View History

2018-03-02 17:01:54 +01:00
#!/usr/bin/env php
# autogenerated file; do not edit
language: c
sudo: false
addons:
2020-09-24 16:20:53 +02:00
postgresql: 10
2018-03-02 17:01:54 +01:00
apt:
packages:
2019-08-02 10:58:21 +02:00
- php-cli
2018-03-02 17:01:54 +01:00
- php-pear
- valgrind
2018-03-02 17:03:02 +01:00
cache:
directories:
2018-03-02 21:20:05 +01:00
- $HOME/cache
2018-03-05 16:52:52 +01:00
before_cache:
- find $HOME/cache -name '*.gcda' -o -name '*.gcno' -delete
2018-03-02 17:01:54 +01:00
env:
global:
- PQ_DSN="postgres://postgres@localhost/test"
matrix:
<?php
$gen = include "./travis/pecl/gen-matrix.php";
2019-12-04 17:45:33 +01:00
$cur = "7.4";
2018-03-02 17:01:54 +01:00
$env = $gen([
2020-09-24 12:39:03 +02:00
"PHP" => ["7.0", "7.1", "7.2", "7.3"],
2018-03-02 17:01:54 +01:00
"enable_debug" => "yes",
"enable_maintainer_zts" => "yes",
"enable_json" => "yes",
2020-09-24 12:39:03 +02:00
], [
"PHP" => ["8.0", "master"],
"enable_debug" => "yes",
"enable_zts" => "yes",
"enable_json" => "yes",
2018-03-02 17:01:54 +01:00
], [
"PHP" => $cur,
"enable_json" => "no",
], [
"PHP" => $cur,
"enable_json" => "yes",
"enable_debug",
"enable_maintainer_zts"
], [
"PHP" => $cur,
"enable_json" => "yes",
"CFLAGS" => "'-O0 -g --coverage'",
"CXXFLAGS" => "'-O0 -g --coverage'",
]);
foreach ($env as $g) {
foreach ($g as $e) {
printf(" - %s\n", $e);
}
}
2019-03-04 07:38:56 +01:00
?>
2018-03-02 17:01:54 +01:00
2019-03-04 07:38:56 +01:00
matrix:
fast_finish: true
allow_failures:
<?php
$allow_failures = array_merge( ... array_map(function($a) {
2019-12-04 17:45:33 +01:00
return preg_grep('/^PHP=(master) /', $a);
2019-03-04 07:38:56 +01:00
}, $env));
foreach ($allow_failures as $e) {
printf(" - env: %s\n", $e);
}
2018-03-02 17:01:54 +01:00
?>
install:
2018-07-19 13:26:45 +02:00
- |
if test "$PHP" = master; then \
make -f travis/pecl/Makefile reconf; \
make -f travis/pecl/Makefile pecl-rm pecl-clean PECL=raphf:raphf:2.0.0; \
fi
- make -f travis/pecl/Makefile php || make -f travis/pecl/Makefile clean php
2018-03-02 17:01:54 +01:00
- make -f travis/pecl/Makefile pecl PECL=raphf:raphf:2.0.0
before_script:
- psql -U postgres -c "CREATE DATABASE test"
script:
- make -f travis/pecl/Makefile ext PECL=pq
- make -f travis/pecl/Makefile test
after_success:
- test -n "$CFLAGS" && cd src/.libs && bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy