From 90480aade2df3626decd58c9682bc7d69d6809f3 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 17 Jul 2017 16:39:10 +0100 Subject: [PATCH] travis: Split build scripts --- .travis.yml | 24 ++++++++++++------------ .travis/build-x86_64-linux.sh | 14 ++++++++++++++ .travis/build-x86_64-macos.sh | 11 +++++++++++ .travis/build.sh | 26 -------------------------- .travis/deps-x86_64-linux.sh | 13 +++++++++++++ .travis/deps-x86_64-macos.sh | 9 +++++++++ .travis/deps.sh | 15 --------------- 7 files changed, 59 insertions(+), 53 deletions(-) create mode 100755 .travis/build-x86_64-linux.sh create mode 100755 .travis/build-x86_64-macos.sh delete mode 100755 .travis/build.sh create mode 100755 .travis/deps-x86_64-linux.sh create mode 100755 .travis/deps-x86_64-macos.sh delete mode 100755 .travis/deps.sh diff --git a/.travis.yml b/.travis.yml index 6f5748eb..24db30d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,18 +5,18 @@ matrix: - os: linux sudo: required dist: trusty + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-6 + - g++-6 + - lib32stdc++6 # For CMake + install: ./.travis/deps-x86_64-linux.sh + script: ./.travis/build-x86_64-linux.sh - os: osx sudo: false osx_image: xcode7.3 - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-6 - - g++-6 - - lib32stdc++6 # For CMake - -install: ./.travis/deps.sh -script: ./.travis/build.sh + install: ./.travis/deps-x86_64-macos.sh + script: ./.travis/build-x86_64-macos.sh diff --git a/.travis/build-x86_64-linux.sh b/.travis/build-x86_64-linux.sh new file mode 100755 index 00000000..e1c5fc4f --- /dev/null +++ b/.travis/build-x86_64-linux.sh @@ -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 diff --git a/.travis/build-x86_64-macos.sh b/.travis/build-x86_64-macos.sh new file mode 100755 index 00000000..c4b91439 --- /dev/null +++ b/.travis/build-x86_64-macos.sh @@ -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 diff --git a/.travis/build.sh b/.travis/build.sh deleted file mode 100755 index 82dbbb2f..00000000 --- a/.travis/build.sh +++ /dev/null @@ -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 diff --git a/.travis/deps-x86_64-linux.sh b/.travis/deps-x86_64-linux.sh new file mode 100755 index 00000000..4d7231fd --- /dev/null +++ b/.travis/deps-x86_64-linux.sh @@ -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 diff --git a/.travis/deps-x86_64-macos.sh b/.travis/deps-x86_64-macos.sh new file mode 100755 index 00000000..96bfc4a4 --- /dev/null +++ b/.travis/deps-x86_64-macos.sh @@ -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 .. diff --git a/.travis/deps.sh b/.travis/deps.sh deleted file mode 100755 index 5a825bff..00000000 --- a/.travis/deps.sh +++ /dev/null @@ -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