forked from sonic-pi-net/sonic-pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (78 loc) · 2.76 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: ruby
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:
- env: USE_QT4=1
- 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
- |
if [[ $USE_QT4 ]]
then
sudo apt-get --yes install libqscintilla2-dev qt4-dev-tools qt4-default
else
sudo apt-get --yes install libqt5scintilla2-dev qtbase5-dev qttools5-dev qttools5-dev-tools qt5-default
fi
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 "***********************************"
if [[ $USE_QT4 ]]
then
echo "* Compiling Sonic Pi GUI with Qt4 *"
else
echo "* Compiling Sonic Pi GUI with Qt5 *"
fi
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