traying to cache stuff on travis
authorMichael Wallner <mike@php.net>
Fri, 2 Mar 2018 14:44:21 +0000 (15:44 +0100)
committerMichael Wallner <mike@php.net>
Fri, 2 Mar 2018 14:44:21 +0000 (15:44 +0100)
.travis.yml
scripts/gen_travis_yml.php
travis/brotli.sh
travis/pecl

index 0ed05c3c963d21d76463c03303332987411721ef..5b5d773944a143f1a5fe8ab5f3906c1af3ccadf0 100644 (file)
@@ -1,6 +1,6 @@
 # autogenerated file; do not edit
 language: c
-sudo: required
+sudo: false
 dist: trusty
 
 addons:
@@ -18,6 +18,10 @@ compiler:
  - gcc
  - clang
 
+cache:
+ directories:
+  - $HOME/build
+
 env:
  - PHP=7.0 enable_debug=yes enable_maintainer_zts=yes enable_json=yes enable_hash=yes enable_iconv=yes with_http_libbrotli_dir=/home/travis/brotli
  - PHP=7.1 enable_debug=yes enable_maintainer_zts=yes enable_json=yes enable_hash=yes enable_iconv=yes with_http_libbrotli_dir=/home/travis/brotli
@@ -31,17 +35,18 @@ env:
  - CFLAGS='-O0 -g --coverage' CXXFLAGS='-O0 -g --coverage' PHP=7.2 enable_json=yes enable_hash=yes enable_iconv=yes with_http_libbrotli_dir=/home/travis/brotli with_http_libidn_dir=yes with_http_libicu_dir=no with_http_libidn2_dir=no 
  - CFLAGS='-O0 -g --coverage' CXXFLAGS='-O0 -g --coverage' PHP=7.2 enable_json=yes enable_hash=yes enable_iconv=yes with_http_libbrotli_dir=/home/travis/brotli with_http_libidn2_dir=yes with_http_libicu_dir=no with_http_libidn_dir=no 
 
-before_script:
- - ./travis/brotli.sh
+install:
+ - ./travis/brotli.sh v1.0.2
  - make -f travis/pecl/Makefile php
  - make -f travis/pecl/Makefile pecl PECL=ext-raphf.git:raphf:master
  - make -f travis/pecl/Makefile pecl PECL=ext-propro.git:propro:master
- - make -f travis/pecl/Makefile ext PECL=http
 
 script:
+ - make -f travis/pecl/Makefile ext PECL=http
  - make -f travis/pecl/Makefile test
- - make -f travis/pecl/Makefile cppcheck CPPCHECK_EXITCODE=0
 
+after_script:
+ - make -f travis/pecl/Makefile cppcheck
 after_failure:
  - test -e tests/helper/server.log && cat tests/helper/server.log
 after_success:
index b1e4135f9adc592ca5fdb1459d03ab9b163881c6..0d3b17e6b3ea0aceee5136ee79fbdcd8169556d2 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env php
 # autogenerated file; do not edit
 language: c
-sudo: required
+sudo: false
 dist: trusty
 
 addons:
@@ -19,6 +19,10 @@ compiler:
  - gcc
  - clang
 
+cache:
+ directories:
+  - $HOME/build
+
 env:
 <?php
 
@@ -73,17 +77,18 @@ foreach ($env as $grp) {
 
 ?>
 
-before_script:
- - ./travis/brotli.sh
+install:
+ - ./travis/brotli.sh v1.0.2
  - make -f travis/pecl/Makefile php
  - make -f travis/pecl/Makefile pecl PECL=ext-raphf.git:raphf:master
  - make -f travis/pecl/Makefile pecl PECL=ext-propro.git:propro:master
- - make -f travis/pecl/Makefile ext PECL=http
 
 script:
+ - make -f travis/pecl/Makefile ext PECL=http
  - make -f travis/pecl/Makefile test
- - make -f travis/pecl/Makefile cppcheck CPPCHECK_EXITCODE=0
 
+after_script:
+ - make -f travis/pecl/Makefile cppcheck
 after_failure:
  - test -e tests/helper/server.log && cat tests/helper/server.log
 after_success:
index 322a3c3d7d31cff9cc28c8c903ef15342f6b4369..d23dd19b87a4d9061ccbd22d8a7b08e45d613216 100755 (executable)
@@ -1,11 +1,19 @@
 #!/bin/bash
 
-if test -n "$with_http_libbrotli_dir" && test "$with_http_libbrotli_dir" != "no"; then
-       git clone https://github.com/google/brotli.git /home/travis/brotli.git
-       cd /home/travis/brotli.git
-       git checkout v1.0.2
+BROTLI_DIR="$with_http_libbrotli_dir"
+BROTLI_SRC="$BROTLI_DIR.git"
+
+if test -n "$BROTLI_DIR" && test "$BROTLI_DIR" != "no"; then
+       if test -d "$BROTLI_SRC"; then
+               cd "$BROTLI_SRC"
+               git pull
+       else
+               git clone https://github.com/google/brotli.git "$BROTLI_SRC"
+               cd "$BROTLI_SRC"
+       fi
+       git checkout $1
        ./bootstrap
-       ./configure --prefix=/home/travis/brotli
-       make -j2
-       make install
+       ./configure -C --prefix="$BROTLI_DIR"
+       make -j ${JOBS:2}
+       make install INSTALL=install
 fi
index 165f61f020ee6de84051c4a463e7f8b7d1f87958..2622a78d9eb346103f502445f6ac8d315ebfecc5 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 165f61f020ee6de84051c4a463e7f8b7d1f87958
+Subproject commit 2622a78d9eb346103f502445f6ac8d315ebfecc5