Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
100 lines (93 sloc) 2.53 KB
language: c
sudo: false
_packages:
- &i386-packages
apt:
packages:
- gcc-multilib
- &arm-packages
apt:
packages:
- qemu-user
- gcc-arm-linux-gnueabihf
- libc6-dev-armhf-cross
_environments:
- &i386-env
- TOOLCHAIN=gcc-i686
- &i386-darwin-env
- TOOLCHAIN=gcc-darwin-i686
- &arm-env
- ARCH=arm
- TARGET=linux-gnueabihf
- TOOLCHAIN=gcc-generic
- CMAKE_OPTS=-DUSE_QEMU=ON
matrix:
include:
# Linux
# x86_64
- env: CONFIGURATION=Debug
compiler: gcc
- env: CONFIGURATION=RelWithDebInfo
compiler: gcc
# i386
- env: [CONFIGURATION=Debug, *i386-env]
addons: *i386-packages
compiler: gcc
- env: [CONFIGURATION=RelWithDebInfo, *i386-env]
addons: *i386-packages
compiler: gcc
# ARM
# These tests are currently broken; it's probably better to wait until
# we get a better CI toolchain for cross-arch testing
#- env: [CONFIGURATION=Debug, *arm-env]
# addons: *arm-packages
# compiler: gcc
#- env: [CONFIGURATION=RelWithDebInfo, *arm-env]
# addons: *arm-packages
# compiler: gcc
# OS X
# x86_64
- env: CONFIGURATION=Debug
os: osx
compiler: clang
- env: CONFIGURATION=RelWithDebInfo
os: osx
compiler: clang
- env: [CONFIGURATION=Debug, *i386-darwin-env]
os: osx
compiler: clang
- env: [CONFIGURATION=RelWithDebInfo, *i386-darwin-env]
os: osx
compiler: clang
before_install:
- if [ -z "${TARGET}" ]; then export TARGET=${ARCH}; fi
- if [ -n "${SUDO_PKG}" ]; then sudo apt-get install -qq ${SUDO_PKG}; fi
- |
if [ "${TESTS:-ON}" = "ON" ]; then
export PYTHON_BIN="python2"
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
export PATH="$("$PYTHON_BIN" -m site --user-base)/bin:$PATH"
fi
travis_retry pip2 install --user cram==0.7
fi
script:
- mkdir -p build && cd $_
- |
if [ -n "${TOOLCHAIN}" ]; then
TC_FILE="../.cmake/Toolchains/Toolchain-${TOOLCHAIN}.cmake"
if [ -n "${ARCH}" ]; then
export CMAKE_OPTS="${CMAKE_OPTS} -DARCH=${ARCH}"
export CMAKE_OPTS="${CMAKE_OPTS} -DTARGET=${TARGET}"
fi
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_TOOLCHAIN_FILE=${TC_FILE}"
fi
- >
cmake
-Wno-dev
-DCMAKE_BUILD_TYPE=${CONFIGURATION}
-DCMAKE_INSTALL_PREFIX=boxfort-${TRAVIS_TAG}
${CMAKE_OPTS}
..
- TERM=dumb cmake --build . -- -j4
- >
[ "${TESTS:-ON}" = "ON" ] && ctest --output-on-failure --timeout=10