Permalink
Fetching contributors…
Cannot retrieve contributors at this time
82 lines (74 sloc) 2.78 KB
language: cpp
matrix:
include:
# Ubuntu 14.04 Trusty Tahr
- os: linux
dist: trusty
sudo: required
compiler: gcc
# OS X 10.11 El Capitan
- os: osx
osx_image: xcode7.3
compiler: clang
# Xcode 8 beta
- os: osx
osx_image: xcode8
compiler: clang
# Linux dependencies
# See: https://github.com/gosu/gosu/wiki/Getting-Started-on-Linux
addons:
apt:
packages:
- libsdl2-dev
- libsdl2-ttf-dev
- libpango1.0-dev
- libgl1-mesa-dev
- libopenal-dev
- libsndfile1-dev
# For Ruby
- ruby-dev
- rake
# For C++
- cmake
before_install:
# Mac dependencies
# See: https://github.com/gosu/gosu/wiki/Getting-Started-on-OS-X
- if [ $TRAVIS_OS_NAME == osx ]; then brew update; brew install sdl2; fi
# Do not use RVM - it's been a mess for compiling Gosu on macOS.
- rvm use system
# Print the Ruby configuration to see what's up with CXXFLAGS etc.
- ruby -rrbconfig -e 'RbConfig::CONFIG.each { |k, v| puts [k, v].join("=") }'
# But update the system RubyGems on OS X and install CocoaPods.
# Also install a very specific version of ActiveSupport, see:
# https://github.com/CocoaPods/CocoaPods/issues/4711#issuecomment-230096751
# Also install gem binaries into /usr/local/bin to work around SIP on macOS 10.11+
- if [ $TRAVIS_OS_NAME == osx ]; then sudo gem update --system; sudo gem install activesupport -v 4.2.6; sudo gem install cocoapods -n /usr/local/bin; fi
# Dependencies for 'rake gem' (not for actually using Gosu)
# We have to install binaries into ~ because of Apple's System Integrity Protection.
- sudo gem install rake rake-compiler minitest --no-ri --no-rdoc -n ~
# Minimal git coverage (for now).
branches:
only:
- master
git:
depth: 1
env:
global:
# 'rake gem' relies on this.
- GOSU_RELEASE_VERSION=9.9.9
# To silence this warning:
# "WARNING: CocoaPods requires your terminal to be using UTF-8 encoding."
- LANG=en_US.UTF-8
install:
# Ruby/Gosu
- ~/rake gem
- sudo gem install pkg/gosu-9.9.9.gem --no-ri --no-rdoc
# Gosu for C++ using CMake
- mkdir -p cmake/build && cd cmake/build && cmake .. && make && sudo make install && cd ../..
# Gosu for OS X using CocoaPods
- if [ $TRAVIS_OS_NAME == osx ]; then cd examples/Tutorial && pod install && xcodebuild build -workspace Tutorial.xcworkspace -scheme Tutorial && cd ../..; fi
# Gosu for iOS using CocoaPods
- if [ $TRAVIS_OS_NAME == osx ]; then cd examples/Tutorial-Touch && pod install && xcodebuild build -workspace Tutorial-Touch.xcworkspace -scheme Tutorial-Touch -destination 'platform=iOS Simulator,name=iPad Air' && cd ../..; fi
script:
# Run Ruby/Gosu tests and compile C++ examples
- ~/rake -rgosu test && mkdir -p examples/build && cd examples/build && cmake .. && make