From 809d2c5578e30a6610126c7cd149905596ca946f Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Tue, 24 May 2016 20:32:08 +0500 Subject: [PATCH] cache openssl download --- .travis.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bc2662b..61bcc3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,10 @@ os: linux language: cpp compiler: gcc +env: + global: + - OPENSSL_VERSION=1.0.1r + matrix: fast_finish: true include: @@ -24,10 +28,14 @@ addons: before_script: - unset CC; unset CXX +install: + - if [ ! -d download-cache ]; then mkdir download-cache; fi + - if [ ! -f download-cache/openssl-${OPENSSL_VERSION}.tar.gz ]; then wget -O download-cache/openssl-${OPENSSL_VERSION}.tar.gz https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz; fi + script: - cppcheck --force --enable=warning,missingInclude --error-exitcode=1 . >build.log 2>&1 || (cat build.log && exit 1) - mkdir image - - wget https://www.openssl.org/source/openssl-1.0.1r.tar.gz && tar zxf openssl-1.0.1r.tar.gz && cd openssl-1.0.1r + - tar zxf download-cache/openssl-${OPENSSL_VERSION}.tar.gz && cd openssl-${OPENSSL_VERSION} - ./Configure --prefix=/ --cross-compile-prefix=${CHOST}- shared $m no-multilib no-capieng --openssldir=/etc/ssl --libdir=/lib -static-libgcc >build.log 2>&1 || (cat build.log && exit 1) - make install INSTALL_PREFIX="${HOME}/image" INSTALLTOP="/" MANDIR="/tmp" >build.log 2>&1 || (cat build.log && exit 1) - cd .. && autoreconf -i -v @@ -36,4 +44,6 @@ script: - ./configure --prefix=/ --libdir=/lib --host=$CHOST --build=x86_64-pc-linux-gnu --program-prefix='' && make cache: - -apt + apt: true + directories: + - download-cache