message: Try to cache CGAL
diff: @@ -3,9 +3,6 @@ dist: xenial
  sudo: required
  git:
  depth: 3
  -cache:
  - directories:
  - - $HOME/.cache/pip
  env:
  global:
  - CGAL_VERSION='CGAL-4.13'
  @@ -20,6 +17,10 @@ env:
  - CMAKE_EXAMPLE='OFF' CMAKE_TEST='OFF' CMAKE_UTILITIES='OFF' CMAKE_PYTHON='OFF' MAKE_TARGET='doxygen'
  # Only Python, associated tests and sphinx documentation
  - CMAKE_EXAMPLE='OFF' CMAKE_TEST='OFF' CMAKE_UTILITIES='OFF' CMAKE_PYTHON='ON' MAKE_TARGET='test sphinx'
  +cache:
  + directories:
  + - $HOME/.cache/pip
  + - $HOME/$CGAL_VERSION
  compiler: gcc
  addons:
  apt:
  @@ -40,9 +41,9 @@ addons:
  # When installing through libcgal-dev apt, CMake Error at CGAL Exports.cmake The imported target "CGAL::CGAL Qt5" references the file
  install:
  - - echo "Download https://github.com/CGAL/cgal/releases/download/releases%2F${CGAL_VERSION}/${CGAL_VERSION}.tar.xz"
  - - curl -LO "https://github.com/CGAL/cgal/releases/download/releases%2F${CGAL_VERSION}/${CGAL_VERSION}.tar.xz"
  - - tar xf ${CGAL_VERSION}.tar.xz
  + - if [ ! -d "${CGAL_VERSION}" ]; then echo "Download https://github.com/CGAL/cgal/releases/download/releases%2F${CGAL_VERSION}/${CGAL_VERSION}.tar.xz"; fi
  + - if [ ! -d "${CGAL_VERSION}" ]; curl -LO "https://github.com/CGAL/cgal/releases/download/releases%2F${CGAL_VERSION}/${CGAL_VERSION}.tar.xz"; fi
  + - if [ ! -d "${CGAL_VERSION}" ]; tar xf ${CGAL_VERSION}.tar.xz; fi
  - cd ${CGAL_VERSION}
  - cmake -DCMAKE_BUILD_TYPE=Release -DCGAL_HEADER_ONLY=ON .
  - make all
  @@ -53,7 +54,8 @@ script:
  - rm -rf build
  - mkdir -p build
  - cd build
  - - cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=${CMAKE_EXAMPLE} -DWITH_GUDHI_TEST=${CMAKE_TEST} -DWITH_GUDHI_UTILITIES=${CMAKE_UTILITIES} -DWITH_GUDHI_PYTHON=${CMAKE_PYTHON} -DUSER_VERSION_DIR=version -DPython_ADDITIONAL_VERSIONS=3 -DCGAL_DIR=$HOME/${CGAL_VERSION} ..
  + - echo "CGAL_DIR = ${HOME}/${CGAL_VERSION}"
  + - cmake -DCGAL_DIR=${HOME}/${CGAL_VERSION} -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=${CMAKE_EXAMPLE} -DWITH_GUDHI_TEST=${CMAKE_TEST} -DWITH_GUDHI_UTILITIES=${CMAKE_UTILITIES} -DWITH_GUDHI_PYTHON=${CMAKE_PYTHON} -DUSER_VERSION_DIR=version -DPython_ADDITIONAL_VERSIONS=3 ..
  - make all ${MAKE_TARGET}
  - cd ..
  notifications:
  