2018-06-25 20:28:41 +00:00
|
|
|
language: cpp
|
2018-06-27 01:55:19 +00:00
|
|
|
services:
|
|
|
|
- docker
|
2018-06-26 02:26:48 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
|
|
|
compiler: gcc
|
|
|
|
env: >-
|
|
|
|
TRAVIS_OS_NAME=linux
|
|
|
|
TRAVIS_COMPILER_NAME=gcc
|
|
|
|
TRAVIS_BUILD_SYSTEM=autotools
|
|
|
|
HYPERROGUE_USE_GLEW=1
|
|
|
|
HYPERROGUE_USE_PNG=1
|
|
|
|
- os: osx
|
|
|
|
compiler: clang
|
|
|
|
env: >-
|
|
|
|
TRAVIS_OS_NAME=osx
|
|
|
|
TRAVIS_COMPILER_NAME=clang
|
|
|
|
TRAVIS_BUILD_SYSTEM=autotools
|
|
|
|
HYPERROGUE_USE_GLEW=1
|
|
|
|
HYPERROGUE_USE_PNG=1
|
|
|
|
- os: linux
|
|
|
|
compiler: gcc
|
|
|
|
env: >-
|
|
|
|
TRAVIS_OS_NAME=linux
|
|
|
|
TRAVIS_COMPILER_NAME=gcc
|
|
|
|
TRAVIS_BUILD_SYSTEM=Makefile
|
|
|
|
HYPERROGUE_USE_GLEW=1
|
|
|
|
HYPERROGUE_USE_PNG=1
|
|
|
|
HYPERROGUE_USE_ROGUEVIZ=1
|
|
|
|
- os: linux
|
|
|
|
compiler: clang
|
|
|
|
env: >-
|
|
|
|
TRAVIS_OS_NAME=linux
|
|
|
|
TRAVIS_COMPILER_NAME=clang
|
|
|
|
TRAVIS_BUILD_SYSTEM=Makefile
|
|
|
|
HYPERROGUE_USE_GLEW=1
|
|
|
|
HYPERROGUE_USE_PNG=1
|
|
|
|
HYPERROGUE_USE_ROGUEVIZ=1
|
|
|
|
- os: osx
|
|
|
|
compiler: gcc
|
|
|
|
env: >-
|
|
|
|
TRAVIS_OS_NAME=osx
|
|
|
|
TRAVIS_COMPILER_NAME=gcc
|
|
|
|
TRAVIS_BUILD_SYSTEM=Makefile
|
|
|
|
HYPERROGUE_USE_GLEW=1
|
|
|
|
HYPERROGUE_USE_PNG=1
|
|
|
|
HYPERROGUE_USE_ROGUEVIZ=1
|
|
|
|
- os: osx
|
|
|
|
compiler: clang
|
|
|
|
env: >-
|
|
|
|
TRAVIS_OS_NAME=osx
|
|
|
|
TRAVIS_COMPILER_NAME=clang
|
|
|
|
TRAVIS_BUILD_SYSTEM=Makefile
|
|
|
|
HYPERROGUE_USE_GLEW=1
|
|
|
|
HYPERROGUE_USE_PNG=1
|
|
|
|
HYPERROGUE_USE_ROGUEVIZ=1
|
|
|
|
- os: osx
|
|
|
|
compiler: clang
|
|
|
|
env: >-
|
|
|
|
TRAVIS_OS_NAME=osx
|
|
|
|
TRAVIS_COMPILER_NAME=clang
|
|
|
|
TRAVIS_BUILD_SYSTEM=Makefile
|
|
|
|
HYPERROGUE_USE_GLEW=0
|
|
|
|
HYPERROGUE_USE_PNG=0
|
|
|
|
HYPERROGUE_USE_ROGUEVIZ=0
|
2018-06-27 01:55:19 +00:00
|
|
|
- os: linux
|
|
|
|
env: >-
|
|
|
|
TRAVIS_OS_NAME=linux
|
|
|
|
TRAVIS_COMPILER_NAME=emscripten
|
|
|
|
TRAVIS_BUILD_SYSTEM=emscripten
|
2018-06-26 02:26:48 +00:00
|
|
|
|
2018-07-01 00:57:28 +00:00
|
|
|
before_install:
|
2018-06-26 02:26:48 +00:00
|
|
|
- |-
|
|
|
|
# Install SDL
|
|
|
|
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
|
|
sudo apt-get update -qq
|
|
|
|
sudo apt-get install -qq libsdl1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev
|
|
|
|
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
brew update
|
|
|
|
brew install sdl sdl_gfx sdl_mixer sdl_ttf
|
|
|
|
# work around https://stackoverflow.com/questions/51034399/ for now
|
|
|
|
(cd /usr/local/include && ln -sf SDL/SDL.h)
|
|
|
|
else
|
|
|
|
exit 'Unsupported OS'
|
|
|
|
fi
|
|
|
|
- |-
|
|
|
|
# Install GLEW if asked for
|
|
|
|
if [[ "$HYPERROGUE_USE_GLEW" == "1" ]]; then
|
|
|
|
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
|
|
sudo apt-get install -qq libglew-dev
|
|
|
|
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
brew install glew
|
|
|
|
else
|
|
|
|
exit 'Unsupported OS'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
- |-
|
|
|
|
# Install libpng if asked for
|
|
|
|
if [[ "$HYPERROGUE_USE_PNG" == "1" ]]; then
|
|
|
|
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
|
|
echo 'libpng is installed by default'
|
|
|
|
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
brew install libpng
|
|
|
|
else
|
|
|
|
exit 'Unsupported OS'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
- |-
|
|
|
|
# Install autotools if asked for
|
|
|
|
if [[ "$TRAVIS_USE_AUTOTOOLS" == "1" ]]; then
|
|
|
|
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
|
|
echo 'autotools is installed by default'
|
|
|
|
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
brew install automake
|
|
|
|
else
|
|
|
|
exit 'Unsupported OS'
|
2018-07-01 00:57:28 +00:00
|
|
|
fi
|
2018-06-26 02:26:48 +00:00
|
|
|
fi
|
|
|
|
|
2018-06-25 20:28:41 +00:00
|
|
|
script:
|
2018-07-01 00:57:28 +00:00
|
|
|
- |-
|
|
|
|
# Build hyperrogue.
|
2018-06-26 02:26:48 +00:00
|
|
|
if [[ "$TRAVIS_BUILD_SYSTEM" == "autotools" ]]; then
|
|
|
|
autoreconf -vi
|
|
|
|
./configure CXXFLAGS="-Wall -Werror -Wno-error=unused-result"
|
|
|
|
make
|
|
|
|
elif [[ "$TRAVIS_BUILD_SYSTEM" == "Makefile" ]]; then
|
|
|
|
make -f Makefile.simple
|
2018-06-27 01:55:19 +00:00
|
|
|
elif [[ "$TRAVIS_BUILD_SYSTEM" == "emscripten" ]]; then
|
|
|
|
docker run --rm -v $(pwd):/src trzeci/emscripten make -f Makefile.simple emscripten
|
2018-06-26 02:26:48 +00:00
|
|
|
else
|
|
|
|
exit 'Unsupported build system'
|
|
|
|
fi
|
2018-07-01 00:57:28 +00:00
|
|
|
- |-
|
|
|
|
# Test hyperrogue.
|
2018-06-27 01:55:19 +00:00
|
|
|
if [[ "$TRAVIS_BUILD_SYSTEM" == "emscripten" ]]; then
|
|
|
|
ls -lAF hyper.html hyper.js hyper.wasm
|
|
|
|
else
|
|
|
|
./hyperrogue --help
|
|
|
|
fi
|
2018-07-01 00:57:28 +00:00
|
|
|
- |-
|
|
|
|
# Test "make dist". ("make distcheck" is expected to fail.)
|
2018-06-26 02:26:48 +00:00
|
|
|
if [[ "$TRAVIS_BUILD_SYSTEM" == "autotools" ]]; then make dist; fi
|
2018-07-01 00:57:28 +00:00
|
|
|
- |-
|
|
|
|
# Test "sudo make install".
|
2018-06-26 02:26:48 +00:00
|
|
|
if [[ "$TRAVIS_BUILD_SYSTEM" == "autotools" ]]; then sudo make install; fi
|