ci: add autoconf caching
authorMike Blumenkrantz <zmike@samsung.com>
Wed, 11 Jul 2018 23:00:47 +0000 (19:00 -0400)
committerYoungbok Shin <youngb.shin@samsung.com>
Thu, 26 Jul 2018 08:26:36 +0000 (17:26 +0900)
this enables caching of the autoreconf and ./configure stages of the build
using autotools-provided caching mechanisms in order to speed up these steps

fix T7136

Differential Revision: https://phab.enlightenment.org/D6608

.ci/ci-configure.sh
.travis.yml

index 86e280e..4af6763 100755 (executable)
@@ -7,7 +7,7 @@ CI_BUILD_TYPE="$1"
 export MAKEFLAGS="-j5"
 export EIO_MONITOR_POLL=1
 
-DEFAULT_LINUX_COPTS="--prefix=/usr/ --with-tests=regular --disable-cxx-bindings"
+DEFAULT_LINUX_COPTS="--prefix=/usr/ --with-tests=regular --disable-cxx-bindings -C"
 
 WAYLAND_LINUX_COPTS=" --enable-wayland --enable-elput --enable-drm \
 --enable-wayland-ivi-shell --enable-gl-drm --with-opengl=es --enable-egl"
@@ -54,7 +54,7 @@ if [ "$DISTRO" != "" ] ; then
     --env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
     $(cat $HOME/cid) ./autogen.sh $OPTS
 else
-  OSX_COPTS="--disable-cxx-bindings"
+  OSX_COPTS="--disable-cxx-bindings -C"
 
   # Prepare OSX env for build
   mkdir -p ~/Library/LaunchAgents
index f3ba713..bd38420 100644 (file)
@@ -1,5 +1,9 @@
 language: c
-cache: ccache
+cache:
+  directories:
+    - $HOME/cachedir
+    - $HOME/.ccache
+    - $HOME/autom4te.cache
 sudo: required
 dist: trusty
 
@@ -73,10 +77,14 @@ before_script:
       if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
         docker version
         docker run --cidfile $HOME/cid -t -d -v `pwd`:/src -v $HOME/.ccache:/root/.ccache -w /src stefanschmidt1/ci-support-files:$DISTRO bash
-        cat $HOME/cid
+        cp $HOME/cachedir/config.cache . || true
       fi
 
   - .ci/ci-ccache-stats.sh
+  - |
+       if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
+         cp $HOME/cachedir/config.cache . || true
+       fi
 
 script:
   - .ci/ci-configure.sh "$CI_BUILD_TYPE"
@@ -99,9 +107,15 @@ script:
 before_cache:
   - .ci/ci-ccache-stats.sh
   - |
+       mkdir -p $HOME/cachedir
        if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
          sudo chown travis:travis $HOME/.ccache
+         mkdir -p $HOME/cachedir/
+         sudo cp config.cache $HOME/cachedir/
+         sudo chown travis:travis $HOME/cachedir/config.cache
+         sudo chown travis:travis $HOME/autom4te.cache
        else
+         cp config.cache $HOME/cachedir
        fi
 
 after_success: