From ba04be5071e9ac932b4d99007ea2e6953b049223 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Fri, 2 Sep 2016 12:57:16 +0100 Subject: [PATCH] travis: Build on OS X --- .travis.yml | 3 +++ .travis/build.sh | 26 +++++++++++++++++++------- .travis/deps.sh | 14 ++++++++++---- src/frontend/arm_types.h | 1 + 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7552996b..6f5748eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,9 @@ matrix: - os: linux sudo: required dist: trusty + - os: osx + sudo: false + osx_image: xcode7.3 addons: apt: diff --git a/.travis/build.sh b/.travis/build.sh index acea8d2d..d1a65b13 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -3,12 +3,24 @@ set -e set -x -export CC=gcc-6 -export CXX=g++-6 -export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH +cmake --version -mkdir build && cd build -cmake .. -DDYNARMIC_USE_SYSTEM_BOOST=0 -DBoost_INCLUDE_DIRS=externals/ext-boost -make -j4 +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 -ctest -VV -C Release + mkdir build && cd build + cmake .. -DDYNARMIC_USE_SYSTEM_BOOST=0 -DBoost_INCLUDE_DIRS=externals/ext-boost + 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=externals/ext-boost -DDYNARMIC_TESTS=0 + xcodebuild -configuration Release +fi diff --git a/.travis/deps.sh b/.travis/deps.sh index ee1ce6c1..1d1b5f07 100755 --- a/.travis/deps.sh +++ b/.travis/deps.sh @@ -3,11 +3,17 @@ set -e set -x -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 - # 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 +elif [ "$TRAVIS_OS_NAME" = "osx" ]; then + brew update > /dev/null # silence the very verbose output + brew unlink cmake || true + brew install cmake +fi diff --git a/src/frontend/arm_types.h b/src/frontend/arm_types.h index e37c542b..5a185970 100644 --- a/src/frontend/arm_types.h +++ b/src/frontend/arm_types.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include #include