-
Notifications
You must be signed in to change notification settings - Fork 174
/
.travis.yml
82 lines (75 loc) · 2.77 KB
/
.travis.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
# 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 --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:
# Ruby/Gosu
- ~/rake -rgosu test
# Compile C++ examples
- mkdir -p examples/build && cd examples/build && cmake .. && make && cd ../..