Skip to content

Commit

Permalink
Re-enable Build.PL for osx and leverage Travis cache for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
alranel committed Nov 8, 2018
1 parent bc4af97 commit 868ed58
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
36 changes: 16 additions & 20 deletions package/linux/travis-build-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package/osx/travis-build-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 868ed58

Please sign in to comment.