travis: Split build scripts

This commit is contained in:
MerryMage 2017-07-17 16:39:10 +01:00
parent 5beb61913b
commit 90480aade2
7 changed files with 59 additions and 53 deletions

View file

@ -5,11 +5,7 @@ matrix:
- os: linux
sudo: required
dist: trusty
- os: osx
sudo: false
osx_image: xcode7.3
addons:
addons:
apt:
sources:
- ubuntu-toolchain-r-test
@ -17,6 +13,10 @@ addons:
- gcc-6
- g++-6
- lib32stdc++6 # For CMake
install: ./.travis/deps.sh
script: ./.travis/build.sh
install: ./.travis/deps-x86_64-linux.sh
script: ./.travis/build-x86_64-linux.sh
- os: osx
sudo: false
osx_image: xcode7.3
install: ./.travis/deps-x86_64-macos.sh
script: ./.travis/build-x86_64-macos.sh

14
.travis/build-x86_64-linux.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
set -e
set -x
export CC=gcc-6
export CXX=g++-6
export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
mkdir build && cd build
cmake .. -DDYNARMIC_USE_SYSTEM_BOOST=0 -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release
make -j4
ctest -VV -C Release

11
.travis/build-x86_64-macos.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -e
set -x
set -o pipefail
export MACOSX_DEPLOYMENT_TARGET=10.9
mkdir build && cd build
cmake .. -GXcode -DDYNARMIC_USE_SYSTEM_BOOST=0 -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DDYNARMIC_TESTS=0
xcodebuild -configuration Release

View file

@ -1,26 +0,0 @@
#!/bin/sh
set -e
set -x
cmake --version
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
export CC=gcc-6
export CXX=g++-6
export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
mkdir build && cd build
cmake .. -DDYNARMIC_USE_SYSTEM_BOOST=0 -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DCMAKE_BUILD_TYPE=Release
make -j4
ctest -VV -C Release
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
set -o pipefail
export MACOSX_DEPLOYMENT_TARGET=10.9
mkdir build && cd build
cmake .. -GXcode -DDYNARMIC_USE_SYSTEM_BOOST=0 -DBoost_INCLUDE_DIRS=${PWD}/../externals/ext-boost -DDYNARMIC_TESTS=0
xcodebuild -configuration Release
fi

13
.travis/deps-x86_64-linux.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
set -e
set -x
# TODO: This isn't ideal.
cd externals
git clone https://github.com/citra-emu/ext-boost
cd ..
mkdir -p $HOME/.local
curl -L https://cmake.org/files/v3.4/cmake-3.4.1-Linux-i386.tar.gz \
| tar -xz -C $HOME/.local --strip-components=1

9
.travis/deps-x86_64-macos.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
set -e
set -x
# TODO: This isn't ideal.
cd externals
git clone https://github.com/citra-emu/ext-boost
cd ..

View file

@ -1,15 +0,0 @@
#!/bin/sh
set -e
set -x
# TODO: This isn't ideal.
cd externals
git clone https://github.com/citra-emu/ext-boost
cd ..
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
mkdir -p $HOME/.local
curl -L https://cmake.org/files/v3.4/cmake-3.4.1-Linux-i386.tar.gz \
| tar -xz -C $HOME/.local --strip-components=1
fi