try to enable caching in travis
MODIFY
.travis.yml
.travis.yml
@@ -3,7 +3,12 @@ rust:
- stable
- beta
- nightly
-cache: cargo
+
+cache:
+ cargo: true
+ ccache: true
+ directories:
+ - opencv
sudo: true
dist: xenial
@@ -40,11 +45,12 @@ env:
- Atlas_ROOT_DIR=/usr/include/ # for cmake to find lapacke.h
before_script:
- - wget -O- https://github.com/opencv/opencv/archive/$OPENCV_VERSION.tar.gz | tar -xzC ~/build
- - wget -O- https://github.com/opencv/opencv_contrib/archive/$OPENCV_VERSION.tar.gz | tar -xzC ~/build
- - mkdir -p ~/build/opencv-$OPENCV_VERSION-build
- - pushd ~/build/opencv-$OPENCV_VERSION-build
- - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DINSTALL_TESTS=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_opencv_apps=ALL -DWITH_IPP=OFF -DPYTHON_EXECUTABLE=OFF -DINSTALL_PYTHON_EXAMPLES=OFF -DWITH_LAPACK=ON -DWITH_EIGEN=ON -DBUILD_SHARED_LIBS=ON -DWITH_TBB=ON -DOPENCV_ENABLE_NONFREE=ON -DCMAKE_INSTALL_PREFIX=/usr -DOPENCV_EXTRA_MODULES_PATH=~/build/opencv_contrib-$OPENCV_VERSION/modules ~/build/opencv-$OPENCV_VERSION
+ - mkdir ~/build/opencv
+ - wget -O- https://github.com/opencv/opencv/archive/$OPENCV_VERSION.tar.gz | tar -xzC ~/build/opencv
+ - wget -O- https://github.com/opencv/opencv_contrib/archive/$OPENCV_VERSION.tar.gz | tar -xzC ~/build/opencv
+ - mkdir -p ~/build/opencv/opencv-$OPENCV_VERSION-build
+ - pushd ~/build/opencv/opencv-$OPENCV_VERSION-build
+ - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DINSTALL_TESTS=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_opencv_apps=ALL -DWITH_IPP=OFF -DPYTHON_EXECUTABLE=OFF -DINSTALL_PYTHON_EXAMPLES=OFF -DWITH_LAPACK=ON -DWITH_EIGEN=ON -DBUILD_SHARED_LIBS=ON -DWITH_TBB=ON -DOPENCV_ENABLE_NONFREE=ON -DCMAKE_INSTALL_PREFIX=/usr -DOPENCV_EXTRA_MODULES_PATH=~/build/opencv/opencv_contrib-$OPENCV_VERSION/modules ~/build/opencv/opencv-$OPENCV_VERSION
- sudo make -j4 install
- tree .
- popd

try to enable caching in travis