From 868ed58baa62d09559cc7bde22d6a1d9d5ace926 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 8 Nov 2018 11:15:14 +0100 Subject: [PATCH] Re-enable Build.PL for osx and leverage Travis cache for Linux --- .travis.yml | 11 ++++----- package/linux/travis-build-main.sh | 36 +++++++++++++----------------- package/osx/travis-build-main.sh | 2 +- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index a4a8da48a8..edea8c183a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ # - build # - test # - package -# - deploy to dl.slic3r.org +# - deploy to dl.slic3r.org (except for the cppgui branch) language: generic dist: trusty @@ -52,13 +52,14 @@ matrix: - os: linux env: - BUILD_PL=true - - CACHE=$HOME/cache cache: directories: - - $HOME/cache + - $HOME/boost_1_63_0 + - $HOME/perl5 + - $HOME/wx302 - local-lib after_success: - - package/linux/travis-deploy-main.sh + - if [[ "${TRAVIS_BRANCH}" != "cppgui" ]]; then ./package/linux/travis-deploy-main.sh; fi - os: linux env: @@ -81,7 +82,7 @@ matrix: - $HOME/Library/Caches/Homebrew - local-lib after_success: - - package/osx/travis-deploy-main.sh + - if [[ "${TRAVIS_BRANCH}" != "cppgui" ]]; then ./package/osx/travis-deploy-main.sh; fi - os: osx osx_image: xcode9.4 diff --git a/package/linux/travis-build-main.sh b/package/linux/travis-build-main.sh index 273eb03190..037c1d1bfb 100755 --- a/package/linux/travis-build-main.sh +++ b/package/linux/travis-build-main.sh @@ -3,34 +3,30 @@ # This is too strict for source $HOME/perl5/perlbrew/etc/bashrc: ### set -euo pipefail -mkdir -p $CACHE - -WXVERSION=302 -if [ ! -e $CACHE/slic3r-perlbrew-5.24.tar.bz2 ]; then - echo "Downloading http://www.siusgs.com/slic3r/buildserver/slic3r-perl.524.travis.tar.bz2 => $CACHE/slic3r-perlbrew-5.24.tar.bz2" - curl -L "http://www.siusgs.com/slic3r/buildserver/slic3r-perl.524.gcc49.travis.tar.bz2" -o $CACHE/slic3r-perlbrew-5.24.tar.bz2; +if [ ! -d $HOME/perl5/perlbrew/perls ]; then + echo "Downloading slic3r-perl.524.travis.tar.bz2" + curl -L "http://www.siusgs.com/slic3r/buildserver/slic3r-perl.524.gcc49.travis.tar.bz2" -o /tmp/slic3r-perlbrew-5.24.tar.bz2; + tar -C$HOME/perl5/perlbrew/perls -xjf $CACHE/slic3r-perlbrew-5.24.tar.bz2 fi -if [ ! -e $CACHE/boost-compiled.tar.bz2 ]; then - echo "Downloading http://www.siusgs.com/slic3r/buildserver/boost_1_63_0.built.gcc-4.9.4-buildserver.tar.bz2 => $CACHE/boost-compiled.tar.bz2" - curl -L "http://www.siusgs.com/slic3r/buildserver/boost_1_63_0.built.gcc-4.9.4-buildserver.tar.bz2" -o $CACHE/boost-compiled.tar.bz2 +if [ ! -d $HOME/boost_1_63_0 ]; then + echo "Downloading boost_1_63_0.built.gcc-4.9.4-buildserver.tar.bz2" + curl -L "http://www.siusgs.com/slic3r/buildserver/boost_1_63_0.built.gcc-4.9.4-buildserver.tar.bz2" -o /tmp/boost-compiled.tar.bz2 + tar -C$HOME -xjf /tmp/boost-compiled.tar.bz2 fi -if [ ! -e $CACHE/local-lib-wx${WXVERSION}.tar.bz2 ]; then - echo "Downloading http://www.siusgs.com/slic3r/buildserver/slic3r-dependencies.gcc49.travis-wx${WXVERSION}.tar.bz2 => $CACHE/local-lib-wx${WXVERSION}.tar.bz2" - curl -L "http://www.siusgs.com/slic3r/buildserver/slic3r-dependencies.travis-wx${WXVERSION}.tar.bz2" -o $CACHE/local-lib-wx${WXVERSION}.tar.bz2 +if [ ! -d $TRAVIS_BUILD_DIR/local-lib ]; then + echo "Downloading slic3r-dependencies.gcc49.travis-wx302.tar.bz2" + curl -L "http://www.siusgs.com/slic3r/buildserver/slic3r-dependencies.travis-wx302.tar.bz2" -o /tmp/local-lib-wx302.tar.bz2 + tar -C$TRAVIS_BUILD_DIR -xjf /tmp/local-lib-wx302.tar.bz2 fi -if [ ! -e $CACHE/wx${WXVERSION}.tar.bz2 ]; then - echo "Downloading http://www.siusgs.com/slic3r/buildserver/wx${WXVERSION}-libs.tar.bz2 => $CACHE/wx${WXVERSION}.tar.bz2" - curl -L "http://www.siusgs.com/slic3r/buildserver/wx${WXVERSION}-libs.tar.bz2" -o $CACHE/wx${WXVERSION}.tar.bz2 +if [ ! -d $HOME/wx302 ]; then + echo "Downloading buildserver/wx302-libs.tar.bz2" + curl -L "http://www.siusgs.com/slic3r/buildserver/wx302-libs.tar.bz2" -o /tmp/wx302.tar.bz2 + tar -C$HOME -xjf /tmp/wx302.tar.bz2 fi -tar -C$TRAVIS_BUILD_DIR -xjf $CACHE/local-lib-wx${WXVERSION}.tar.bz2 -tar -C$HOME/perl5/perlbrew/perls -xjf $CACHE/slic3r-perlbrew-5.24.tar.bz2 -tar -C$HOME -xjf $CACHE/boost-compiled.tar.bz2 -tar -C$HOME -xjf $CACHE/wx${WXVERSION}.tar.bz2 - source $HOME/perl5/perlbrew/etc/bashrc perlbrew switch slic3r-perl diff --git a/package/osx/travis-build-main.sh b/package/osx/travis-build-main.sh index 51df043d99..62b5bb8d2e 100755 --- a/package/osx/travis-build-main.sh +++ b/package/osx/travis-build-main.sh @@ -6,7 +6,7 @@ brew install boost perl cpanminus export SLIC3R_STATIC=1 export BOOST_DIR=/usr/local -#perl ./Build.PL +perl ./Build.PL # Only recompile Wx if it's not already there if !(perl -MWx -e1 2> /dev/null); then