Skip to content

Commit 34643d1

Browse files
committed
Cache travis dependencies
1 parent 58d0c18 commit 34643d1

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ matrix:
1414
apt: true
1515
directories:
1616
- $HOME/.ccache
17+
- $HOME/depcache
1718
timeout: 1000
1819
compiler: clang
1920
python: "3.3"

ci/travis/linux/before_install.sh

+10-5
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
# #
1414
###########################################################################
1515

16-
export DEBIAN_FRONTEND=noninteractive
17-
export CORES=2
18-
1916
##################################################
2017
#
2118
# Get precompiled dependencies
@@ -24,12 +21,20 @@ export CORES=2
2421

2522
pushd ${HOME}
2623

24+
# fetching data from github should be just as fast as S3
2725
curl -L https://github.com/opengisch/osgeo4travis/archive/qt5bin.tar.gz | tar -xzC /home/travis --strip-components=1
28-
curl -L https://cmake.org/files/v3.5/cmake-3.5.0-Linux-x86_64.tar.gz | tar --strip-components=1 -zxC /home/travis/osgeo4travis
26+
27+
# other dependencies live in a cached folder
28+
pushd depcache
29+
# Download newer version of cmake than in the repository
30+
[[ -f cmake-3.5.0-Linux-x86_64.tar.gz ]] || curl -O https://cmake.org/files/v3.5/cmake-3.5.0-Linux-x86_64.tar.gz
31+
tar --strip-components=1 -zx -f cmake-3.5.0-Linux-x86_64.tar.gz -C /home/travis/osgeo4travis
2932

3033
# Download OTB package for Processing tests
31-
wget https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-5.6.0-Linux64.run -O /home/travis/OTB-5.6.0-Linux64.run && sh /home/travis/OTB-5.6.0-Linux64.run
34+
[[ -f OTB-5.6.0-Linux64.run ]] || curl -O https://www.orfeo-toolbox.org/packages/archives/OTB/OTB-5.6.0-Linux64.run
35+
sh ./OTB-5.6.0-Linux64.run
3236

37+
popd
3338
popd
3439

3540
pip install psycopg2 numpy nose2 pyyaml mock future termcolor

0 commit comments

Comments
 (0)