Skip to content

Commit

Permalink
Update .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hzulla committed Feb 18, 2016
1 parent 3c44c0f commit 20c5cd4
Showing 1 changed file with 68 additions and 5 deletions.
73 changes: 68 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,69 @@
language: ruby
rvm:
- "1.9.3"
- "2.1.2"
# uncomment this line if your project needs to run something other than `rake`:
script: cd app/server/sonicpi && rake test

os: linux
sudo: required
dist: trusty
compiler: gcc
cache:
- apt
- ccache

# in addition to the default settings (above),
# add test runs using the Travis rvm ruby binaries.
matrix:
include:
- rvm: 1.9.3
env: USE_RVM=1
- rvm: 2.1.2
env: USE_RVM=1
- rvm: 2.2.3
env: USE_RVM=1

before_install:
- sudo apt-get update
- sudo apt-get --yes install ruby-all-dev rake cmake pkg-config g++ libfftw3-dev libffi-dev libqt5scintilla2-dev qtbase5-dev qttools5-dev qttools5-dev-tools qt5-default

script:
- set -e
# the | starts a multiline YAML entry
- |
if [[ $USE_RVM ]]
then
# this compiles the gems and runs the Sonic Pi test suite with the ruby installed through Travis's rvm
echo ""
echo "***********************************"
echo "* Compiling the vendor/ ruby gems *"
echo "***********************************"
cd $TRAVIS_BUILD_DIR/app/server/bin
ruby ./compile-extensions.rb
echo ""
echo "***********************************"
echo "* Running the Sonic Pi test suite *"
echo "***********************************"
cd $TRAVIS_BUILD_DIR/app/server/sonicpi/test
rake test
else
# this compiles the gems and runs the Sonic Pi test suite for all ruby versions in Ubuntu Trusty (1.9.1 and 2.0.0)
echo ""
echo "***********************************"
echo "* Compiling the vendor/ ruby gems *"
echo "***********************************"
cd $TRAVIS_BUILD_DIR/app/server/bin
/usr/bin/ruby -e 'require "ruby_debian_dev"; include RubyDebianDev; SUPPORTED_RUBY_VERSIONS.each { |v, b| system(b + " ./compile-extensions.rb") or raise ("ruby gem compile failed for " + v) }'
echo ""
echo "***********************************"
echo "* Running the Sonic Pi test suite *"
echo "***********************************"
cd $TRAVIS_BUILD_DIR/app/server/sonicpi/test
/usr/bin/ruby -e 'require "ruby_debian_dev"; include RubyDebianDev; SUPPORTED_RUBY_VERSIONS.each { |v, b| system(b + " /usr/bin/rake test") or raise ("test failed for " + v) }'
# the following are the same steps as in ./app/gui/qt/rp-build-app
echo ""
echo "***********************************"
echo "* Compiling Sonic Pi GUI with Qt5 *"
echo "***********************************"
cd $TRAVIS_BUILD_DIR/app/gui/qt
cp -f ruby_help.tmpl ruby_help.h ; /usr/bin/ruby ../../server/bin/qt-doc.rb -o ruby_help.h
lrelease SonicPi.pro
qmake -o Makefile SonicPi.pro
make
fi

0 comments on commit 20c5cd4

Please sign in to comment.