Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use xenial for base dist on Travis #4983

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
# - deploy to dl.slic3r.org (except for the cppgui branch)

language: generic
dist: trusty
dist: xenial

before_install:
- sh package/common/travis-decrypt-key
- export SLIC3R_GIT_VERSION=$(git rev-parse --short HEAD)

script:
- if [[ "${TRAVIS_OS_NAME}" == "linux" && "$TARGET" == "main" ]]; then ./package/linux/travis-build-main.sh || travis_terminate 1; fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" && "$TARGET" == "cpp" ]]; then ./package/linux/travis-build-cpp.sh || travis_terminate 1; fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" && "$TARGET" == "main" ]]; then ./package/linux/travis-build-main.sh -p -b -w || travis_terminate 1; fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" && "$TARGET" == "cpp" ]]; then ./package/linux/travis-build-cpp.sh -b -w || travis_terminate 1; fi
- if [[ "${TRAVIS_OS_NAME}" == "osx" && "$TARGET" == "main" ]]; then ./package/osx/travis-build-main.sh || travis_terminate 1; fi
- if [[ "${TRAVIS_OS_NAME}" == "osx" && "$TARGET" == "cpp" ]]; then ./package/osx/travis-build-cpp.sh || travis_terminate 1; fi

Expand All @@ -28,24 +28,33 @@ branches:
- master
- cppgui
- coverity-scan
- use-xenial

addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: "ppa:mhier/libboost-latest"
packages:
- g++-7
- gcc-7
- g++-8
- gcc-8
- g++
- gcc
- libgtk2.0-0
- libgtk2.0-dev
- freeglut3
- cmake
- wx3.0-headers
- perl
- wx3.0-i18n
- libwx-perl
- libwxgtk3.0-0v5
- libwxgtk3.0-dev
- wx-common
ssh_known_hosts: dl.slic3r.org
- libboost1.70
- libboost1.70-dev
- liblocal-lib-perl
- libopengl-perl


ssh_known_hosts: dl.slic3r.org

matrix:
include:
Expand All @@ -54,12 +63,9 @@ matrix:
- TARGET=main
cache:
directories:
- $HOME/boost_1_63_0
- $HOME/perl5
- $HOME/wx302
- local-lib
after_success:
- if [[ "${TRAVIS_BRANCH}" != "cppgui" ]]; then source ${HOME}/perl5/perlbrew/etc/bashrc; perlbrew switch slic3r-perl; ./package/linux/travis-deploy-main.sh || travis_terminate 1; fi
- if [[ "${TRAVIS_BRANCH}" != "cppgui" ]]; then ./package/linux/travis-deploy-main.sh || travis_terminate 1; fi

- os: linux
env:
Expand Down
65 changes: 48 additions & 17 deletions package/linux/travis-build-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,62 @@
### set -euo pipefail
set -eo pipefail

if [ ! -d $HOME/perl5/perlbrew/perls/slic3r-perl ]; then
echo "Downloading slic3r-perlbrew-5.28.tar.bz2"
curl -L "http://www.siusgs.com/slic3r/buildserver/slic3r-perl.528.gcc81.travis.tar.bz2" -o /tmp/slic3r-perlbrew-5.28.tar.bz2;
tar -C$HOME/perl5/perlbrew/perls -xjf /tmp/slic3r-perlbrew-5.28.tar.bz2
fi
USE_CC=gcc
USE_CXX=g++

while getopts ":c:pbw" opt; do
case ${opt} in
c )
USE_CC=gcc-${OPTARG}
USE_CXX=g++-${OPTARG}
;;
p )
CACHED_PERL="no"
;;
b )
CACHED_BOOST="no"
;;
w )
CACHED_WX="no"
;;
esac
done

source $HOME/perl5/perlbrew/etc/bashrc
perlbrew switch slic3r-perl
if [ ! ${CACHED_PERL} == "no" ]; then
if [ ! -d $HOME/perl5/perlbrew/perls/slic3r-perl ]; then
echo "Downloading slic3r-perlbrew-5.28.tar.bz2"
curl -L "http://www.siusgs.com/slic3r/buildserver/slic3r-perl.528.gcc81.travis.tar.bz2" -o /tmp/slic3r-perlbrew-5.28.tar.bz2;
tar -C$HOME/perl5/perlbrew/perls -xjf /tmp/slic3r-perlbrew-5.28.tar.bz2
fi

if [ ! -e $HOME/boost_1_63_0/boost/version.hpp ]; then
echo "Downloading boost_1_69_0.built.gcc-8.1.0-buildserver.tar.bz2"
curl -L "http://www.siusgs.com/slic3r/buildserver/boost_1_69_0.built.gcc-8.1.0-buildserver.tar.bz2" -o /tmp/boost-compiled.tar.bz2
tar -C$HOME -xjf /tmp/boost-compiled.tar.bz2
source $HOME/perl5/perlbrew/etc/bashrc
perlbrew switch slic3r-perl
fi

if [ ! -e ./local-lib/lib/perl5/x86_64-linux-thread-multi/Wx.pm ]; then
echo "Downloading slic3r-dependencies.gcc81.travis-wx302.tar.bz2"
curl -L "http://www.siusgs.com/slic3r/buildserver/slic3r-dependencies.gcc81.travis-wx302.tar.bz2" -o /tmp/local-lib-wx302.tar.bz2
tar -C$TRAVIS_BUILD_DIR -xjf /tmp/local-lib-wx302.tar.bz2
if [ ! ${CACHED_BOOST} == "no" ]; then
if [ ! -e $HOME/boost_1_63_0/boost/version.hpp ]; then
echo "Downloading boost_1_69_0.built.gcc-8.1.0-buildserver.tar.bz2"
curl -L "http://www.siusgs.com/slic3r/buildserver/boost_1_69_0.built.gcc-8.1.0-buildserver.tar.bz2" -o /tmp/boost-compiled.tar.bz2
tar -C$HOME -xjf /tmp/boost-compiled.tar.bz2
fi
fi

if [ ! ${CACHED_WX} == "no" ]; then
if [ ! -e ./local-lib/lib/perl5/x86_64-linux-thread-multi/Wx.pm ]; then
echo "Downloading slic3r-dependencies.gcc81.travis-wx302.tar.bz2"
curl -L "http://www.siusgs.com/slic3r/buildserver/slic3r-dependencies.gcc81.travis-wx302.tar.bz2" -o /tmp/local-lib-wx302.tar.bz2
tar -C$TRAVIS_BUILD_DIR -xjf /tmp/local-lib-wx302.tar.bz2
fi
fi

cpanm local::lib
eval $(perl -Mlocal::lib=${TRAVIS_BUILD_DIR}/local-lib)
CC=g++-8 CXX=g++-8 cpanm ExtUtils::CppGuess --force
CC=g++-8 CXX=g++-8 BOOST_DIR=$HOME/boost_1_69_0 perl ./Build.PL
CC=${USE_CC} CXX=${USE_CXX} cpanm ExtUtils::CppGuess --force
if [ ! ${CACHED_BOOST} == "no" ]; then
CC=${USE_CC} CXX=${USE_CXX} BOOST_DIR=$HOME/boost_1_69_0 perl ./Build.PL
else
CC=${USE_CC} CXX=${USE_CXX} perl ./Build.PL
fi
excode=$?
if [ $excode -ne 0 ]; then exit $excode; fi
perl ./Build.PL --gui
Expand Down