summaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: ea8b9e5eac1c0524265a761d1e8bd5584dee3818 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
language: c
dist: trusty
sudo: required

os:
  - linux
  - osx

compiler:
  - gcc
  - clang

before_install:
- |
  if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
    CMAKE_URL="http://www.cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz"
    mkdir -p ${TRAVIS_BUILD_DIR}/deps/cmake && travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TRAVIS_BUILD_DIR}/deps/cmake
    export PATH=${TRAVIS_BUILD_DIR}/deps/cmake/bin:${PATH}
  fi

# Build steps
script:
  - mkdir build
  - cd build
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; sudo apt-get --no-install-suggests --no-install-recommends install libsdl2-dev; fi
  - if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then brew update; brew install sdl2; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl; else cmake ..; fi
  - cmake --build .
  - ctest --output-on-failure