administrativa
[m6w6/ext-psi] / scripts / gen_travis_yml.php
index 572e7b3723e9ce19836a1070d6ff7acb51b5b30b..5de7ab9119c8cd14ec6d7b4ddd0afafa2467d1b2 100755 (executable)
@@ -1,15 +1,20 @@
 #!/usr/bin/env php
 # autogenerated file; do not edit
 language: c
-sudo: false
+sudo: required
+dist: trusty
 
 addons:
  apt:
   packages:
    - php5-cli
    - php-pear
+   - valgrind
+   - gdb
+   - apport
    - re2c
    - libidn11-dev
+   - libsqlite3-dev
 
 env:
  matrix:
@@ -17,11 +22,11 @@ env:
 
 $gen = include __DIR__."/../travis/pecl/gen-matrix.php";
 $env = $gen([
-       "PHP" => ["7.0", "7.1", "master"],
+       "PHP" => ["master"],
        "enable_debug",
        #"enable_maintainer_zts",
        "enable_psi" => ["yes"],
-       "enable_psi_posix" => ["all"]
+       "enable_psi_posix" => ["all"],
 ]);
 foreach ($env as $e) {
        printf("  - %s\n", $e);
@@ -29,12 +34,35 @@ foreach ($env as $e) {
 
 ?>
 
-before_script:
+before_install:
+ # make sure we do not try to regenerate files with broken bison or old re2c
+ - touch src/parser_proc_grammar.y
+ - touch src/parser_proc.c
+ - touch src/parser_proc.h
+ - touch src/parser.re
+ - touch src/parser.c
+ - touch src/parser.h
+
+install:
  - make -f travis/pecl/Makefile php
- - make -f travis/pecl/Makefile ext PECL=psi
+
+before_script:
+ - ulimit -c unlimited -S
+ - export TEST_PHP_ARGS="--no-clean"
 
 script:
+ - make -f travis/pecl/Makefile ext PECL=psi
  - make -f travis/pecl/Makefile test
 
 after_failure:
- - cat config.log
+ - cat config.log | curl -F 'sprunge=<-' http://sprunge.us
+ - cat tests/parser/dump001.psi | curl -F 'sprunge=<-' http://sprunge.us
+ - test -f core* && gdb -q -ex bt --batch $HOME/job-$TRAVIS_JOB_NUMBER/bin/php core*
+
+notifications:
+  webhooks:
+    urls:
+      - https://webhooks.gitter.im/e/30aebb6c0b03f1117817
+    on_success: change
+    on_failure: always
+    on_start: never