forked from slic3r/Slic3r
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setting envionment variables via matrix
- Loading branch information
1 parent
3097a07
commit 1fd6558
Showing
2 changed files
with
41 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
#!/bin/bash | ||
# Script to configure travis environment prior to build | ||
WXVERSION=302 | ||
CACHE=$HOME/cache | ||
mkdir -p $CACHE | ||
if [ $TRAVIS_OS_NAME == "linux" ]; then | ||
export WXDIR=$HOME/wx${WXVERSION} | ||
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 | ||
fi | ||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then | ||
if [[ "$WXVERSION" -neq "pkg" ]]; then | ||
export WXDIR=$HOME/wx${WXVERSION} | ||
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 | ||
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 [ ! -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 | ||
fi | ||
|
||
tar -C$HOME -xjf $CACHE/boost-compiled.tar.bz2 | ||
tar -C$HOME -xjf $CACHE/wx${WXVERSION}.tar.bz2 | ||
fi | ||
|
||
tar -C$HOME -xjf $CACHE/boost-compiled.tar.bz2 | ||
tar -C$HOME -xjf $CACHE/wx${WXVERSION}.tar.bz2 | ||
|
||
# Set some env variables specific to Travis Linux | ||
export CXX=g++-7 | ||
export CC=gcc-7 | ||
elif [ $TRAVIS_OS_NAME == "osx" ]; then | ||
WXVERSION=311 | ||
WXVER_EXPANDED=${WXVERSION:0:1}.${WXVERSION:1:1}.${WXVERSION:2:1} | ||
export WXDIR=$HOME/wx${WXVERSION} | ||
if [ ! -e $CACHE/wx${WXVERSION}-${TRAVIS_OS_NAME}.tar.bz2 ]; then | ||
curl -L "https://github.com/wxWidgets/wxWidgets/releases/download/v${WXVER_EXPANDED}/wxWidgets-${WXVER_EXPANDED}.tar.bz2" -o $HOME/wx${WXVERSION}-src.tar.bz2 | ||
tar -C$HOME -xjf $HOME/wx${WXVERSION}-src.tar.bz2 | ||
mkdir $WXDIR | ||
cd $HOME/$WXDIR && cmake $HOME/wxWidgets-${WXVER_EXPANDED} -DwxBUILD_SHARED=OFF | ||
cmake --build . --target -- -j4 | ||
tar -C$HOME -cjf $CACHE/wx${WXVERSION}-${TRAVIS_OS_NAME}.tar.bz2 $(basename ${WXDIR}) | ||
else | ||
tar -C$HOME -xjf $CACHE/wx${WXVERSION}-${TRAVIS_OS_NAME}.tar.bz2 | ||
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then | ||
if [[ "$WXVERSION" -neq "pkg" ]]; then | ||
WXVER_EXPANDED=${WXVERSION:0:1}.${WXVERSION:1:1}.${WXVERSION:2:1} | ||
export WXDIR=$HOME/wx${WXVERSION} | ||
if [ ! -e $CACHE/wx${WXVERSION}-${TRAVIS_OS_NAME}.tar.bz2 ]; then | ||
curl -L "https://github.com/wxWidgets/wxWidgets/releases/download/v${WXVER_EXPANDED}/wxWidgets-${WXVER_EXPANDED}.tar.bz2" -o $HOME/wx${WXVERSION}-src.tar.bz2 | ||
tar -C$HOME -xjf $HOME/wx${WXVERSION}-src.tar.bz2 | ||
mkdir $WXDIR | ||
cd $HOME/$WXDIR && cmake $HOME/wxWidgets-${WXVER_EXPANDED} -DwxBUILD_SHARED=OFF | ||
cmake --build . --target -- -j4 | ||
tar -C$HOME -cjf $CACHE/wx${WXVERSION}-${TRAVIS_OS_NAME}.tar.bz2 $(basename ${WXDIR}) | ||
else | ||
tar -C$HOME -xjf $CACHE/wx${WXVERSION}-${TRAVIS_OS_NAME}.tar.bz2 | ||
fi | ||
export PATH=${PATH}:${WXDIR} | ||
cd $TRAVIS_BUILD_DIR # go back to the build dir | ||
else | ||
brew install wxmac # install via homebrew | ||
fi | ||
export PATH=${PATH}:${WXDIR} | ||
cd $TRAVIS_BUILD_DIR # go back to the build dir | ||
brew install wxmac # install via homebrew | ||
fi |