From fa905cdee781592732585f6556114f54c77c7ee3 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Fri, 12 Jun 2020 09:19:53 -0500 Subject: [PATCH 1/7] Use xenial as base distro --- .travis.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87f1d3e1bb..4aa997ab23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ # - deploy to dl.slic3r.org (except for the cppgui branch) language: generic -dist: trusty +dist: xenial before_install: - sh package/common/travis-decrypt-key @@ -31,13 +31,9 @@ branches: addons: apt: - sources: - - ubuntu-toolchain-r-test packages: - - g++-7 - - gcc-7 - - g++-8 - - gcc-8 + - g++ + - gcc - libgtk2.0-0 - libgtk2.0-dev - freeglut3 From 2f1fda79d19332bf1449edec733f8b6d75ad9bea Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Fri, 12 Jun 2020 09:20:16 -0500 Subject: [PATCH 2/7] Add branch to travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 4aa997ab23..5360bfa855 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,7 @@ branches: - master - cppgui - coverity-scan + - use-xenial addons: apt: From f86fa5764562d2277c31222e29175e2e7aa7d628 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Fri, 12 Jun 2020 16:34:35 -0500 Subject: [PATCH 3/7] Update build to not rely on cached components --- .travis.yml | 16 +++++--- package/linux/travis-build-main.sh | 65 ++++++++++++++++++++++-------- 2 files changed, 59 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5360bfa855..467396c01a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ before_install: - 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" == "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 || 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 @@ -32,6 +32,8 @@ branches: addons: apt: + sources: + - sourceline: "ppa:mhier/libboost-latest" packages: - g++ - gcc @@ -40,8 +42,15 @@ addons: - freeglut3 - cmake - wx3.0-headers + - perl + - wx3.0-i18n + - libwx-perl + - libwxgtk3.0-0v5 - libwxgtk3.0-dev - wx-common + - libboost + - libboost-dev + ssh_known_hosts: dl.slic3r.org matrix: @@ -51,12 +60,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: diff --git a/package/linux/travis-build-main.sh b/package/linux/travis-build-main.sh index 95fd6aa298..0b48c68baf 100755 --- a/package/linux/travis-build-main.sh +++ b/package/linux/travis-build-main.sh @@ -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 From f4cedb560e032be79b9742349e1f8ae4149642dc Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Fri, 12 Jun 2020 22:00:15 -0500 Subject: [PATCH 4/7] use correct package for boost. --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 467396c01a..70b0094652 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,10 +48,10 @@ addons: - libwxgtk3.0-0v5 - libwxgtk3.0-dev - wx-common - - libboost - - libboost-dev + - libboost1.70 + - libboost1.70-dev - ssh_known_hosts: dl.slic3r.org +ssh_known_hosts: dl.slic3r.org matrix: include: From 2582e2b2084180bae3bd326caaaa66b6f704a007 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sat, 13 Jun 2020 14:45:52 -0500 Subject: [PATCH 5/7] Install local::lib package. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 70b0094652..fae0090f5f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,6 +50,8 @@ addons: - wx-common - libboost1.70 - libboost1.70-dev + - liblocal-lib-perl + ssh_known_hosts: dl.slic3r.org From 2992082035a393e77553adbe32767a0ac23f4511 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sat, 13 Jun 2020 14:56:33 -0500 Subject: [PATCH 6/7] use system compiler for xenial --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fae0090f5f..229475338e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ before_install: script: - 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 || 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 From a7342f8582d43020d5f68bcd7d61dd35246fe4c3 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sat, 13 Jun 2020 15:09:42 -0500 Subject: [PATCH 7/7] Add perl-opengl to install list. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 229475338e..a460cba9b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,6 +51,7 @@ addons: - libboost1.70 - libboost1.70-dev - liblocal-lib-perl + - libopengl-perl ssh_known_hosts: dl.slic3r.org