Skip to content

Commit

Permalink
Merge .travis folder back into .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jlnr committed May 1, 2017
1 parent 2ce15ac commit 5b8558f
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 66 deletions.
98 changes: 71 additions & 27 deletions .travis.yml
Expand Up @@ -7,7 +7,7 @@ matrix:
dist: trusty
sudo: required
compiler: gcc
# OS X 10.11 El Capitan
# macOS 10.11 El Capitan
- os: osx
osx_image: xcode7.3
compiler: clang
Expand All @@ -33,28 +33,52 @@ addons:
- rake
# For C++
- cmake
# For Linux Soundtests (equivalent to xvfb)
# For Linux Soundtests (like xvfb for sound: lets us headlessly run audio tests)
- alsa-base

before_install:
# Cause multi-line snippets to fail on first error.
- set -ev

# 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.
# Print the Ruby configuration to see what's defined in CXXFLAGS etc.
- ruby -rrbconfig -e 'RbConfig::CONFIG.each { |k, v| puts [k, v].join("=") }'

# Do some OSX-Specific preparations
- if [ $TRAVIS_OS_NAME == osx ]; then ./.travis/before_install_osx.sh; fi
- |
if [ $TRAVIS_OS_NAME == osx ]; then
# Mac dependencies
# See: https://github.com/gosu/gosu/wiki/Getting-Started-on-OS-X
brew update
brew install sdl2
# 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+
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 ~

before_script:
# Enable "dummy" devices for audio and video on Linux
- if [ $TRAVIS_OS_NAME != osx ]; then . ./.travis/before_script_linux.sh ;fi
# Enable "dummy" devices for audio and video on Linux.
- |
if [ $TRAVIS_OS_NAME != osx ]; then
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sleep 3
sudo modprobe snd-dummy
sudo usermod -a -G audio $USER
fi
# Minimal git coverage (for now).
# Minimal git coverage.
branches:
only:
- master
Expand All @@ -70,27 +94,47 @@ env:
- LANG=en_US.UTF-8

install:
# Ruby/Gosu
- ~/rake gem
- sudo gem install pkg/gosu-9.9.9.gem --no-ri --no-rdoc
# Install Ruby/Gosu using RubyGems.
- |
~/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 ../.."
# Install Gosu for C++ using CMake.
- |
mkdir -p cmake/build
cd cmake/build
cmake ..
make
sudo make install
cd ../..
# Do some OSX-Specific preparations
- if [ $TRAVIS_OS_NAME == osx ]; then ./.travis/install_osx.sh ; fi
# Compile Gosu for macOS and iOS using CocoaPods.
- |
if [ $TRAVIS_OS_NAME == osx ]; then
cd examples/Tutorial
pod install
xcodebuild build -workspace Tutorial.xcworkspace -scheme Tutorial
cd ../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
- "if [ $TRAVIS_OS_NAME == osx ];
then
~/rake -rgosu test;
else
sg audio '~/rake -rgosu test';
fi"
- mkdir -p examples/build && cd examples/build && cmake .. && make
# Run Ruby/Gosu tests and compile C++ examples.
- |
if [ $TRAVIS_OS_NAME == osx ]; then
~/rake -rgosu test
else
sg audio '~/rake -rgosu test'
fi
# Compile C++ examples using CMake.
- |
mkdir -p examples/build &&
cd examples/build &&
cmake .. &&
make
# Reset the 'e' option to avoid a shell_session_update error from Travis.
- set +ev
17 changes: 0 additions & 17 deletions .travis/before_install_osx.sh

This file was deleted.

8 changes: 0 additions & 8 deletions .travis/before_script_linux.sh

This file was deleted.

14 changes: 0 additions & 14 deletions .travis/install_osx.sh

This file was deleted.

0 comments on commit 5b8558f

Please sign in to comment.