Skip to content

Commit

Permalink
Travis: Outsource build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-w committed Jan 15, 2015
1 parent d4d26a6 commit bd4a93c
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 29 deletions.
33 changes: 4 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,20 @@
language: cpp
compiler: gcc
matrix:
exclude:
- os: linux

This comment has been minimized.

Copy link
@tresf

tresf Feb 25, 2016

Member

FYI, @lukas-w this commit is the one which removed the TARGET_OS export for Linux which is what makes the release block execute for all. I don't see any non-Windows uploads happening in the immediate (or even distant) future, so for now, we should be safe with something like $TARGET_OS == win* && ! $QT5 (not tested)

include:
- env: TARGET_OS=linux
- env: TARGET_OS=win32
- env: TARGET_OS=win64
- os: osx
before_install:
- if [ $TRAVIS_OS_NAME == linux ]; then
if [ $TARGET_OS != linux ]; then sudo add-apt-repository ppa:tobydox/mingw -y; fi;
if [ $TARGET_OS == linux ]; then sudo add-apt-repository ppa:kalakris/cmake -y; fi;
sudo apt-get update -qq;
fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew update; fi
- sh ./travis/${TRAVIS_OS_NAME}.${TARGET_OS}.before_install.sh
install:
- if [ $TRAVIS_OS_NAME == linux ]; then
if [ $TARGET_OS == linux ]; then
sudo apt-get install -y cmake libqt4-dev libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev libgig-dev;
fi;
if [ $TARGET_OS != linux ]; then sudo apt-get install -y nsis cloog-isl libmpc2 mingw32; fi;
if [ $TARGET_OS != linux ]; then sudo apt-get install -y mingw32-x-qt mingw32-x-sdl mingw32-x-libvorbis mingw32-x-fluidsynth mingw32-x-stk mingw32-x-glib2 mingw32-x-portaudio mingw32-x-libsndfile mingw32-x-fftw mingw32-x-flac mingw32-x-fltk mingw32-x-libsamplerate mingw32-x-pkgconfig mingw32-x-binutils mingw32-x-gcc mingw32-x-runtime mingw32-x-libgig; fi;
if [ $TARGET_OS == win64 ]; then sudo apt-get install -y mingw64-x-qt mingw64-x-sdl mingw64-x-libvorbis mingw64-x-fluidsynth mingw64-x-stk mingw64-x-glib2 mingw64-x-portaudio mingw64-x-libsndfile mingw64-x-fftw mingw64-x-flac mingw64-x-fltk mingw64-x-libsamplerate mingw64-x-pkgconfig mingw64-x-binutils mingw64-x-gcc mingw64-x-runtime mingw64-x-libgig; fi;
fi
- if [ $TRAVIS_OS_NAME == osx ]; then
brew install qt libsndfile fftw libvorbis libogg jack sdl libsamplerate stk fluid-synth portaudio fltk;
fi
- sh ./travis/${TRAVIS_OS_NAME}.${TARGET_OS}.install.sh
before_script:
- mkdir build && cd build
script:
- if [ $TRAVIS_OS_NAME == linux ]; then
if [ $TARGET_OS == win32 ]; then ../build_mingw32 || ../build_mingw32; fi;
if [ $TARGET_OS == win64 ]; then ../build_mingw64 || ../build_mingw64; fi;
if [ $TARGET_OS == linux ]; then cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..; fi
fi
- if [ $TRAVIS_OS_NAME == osx ]; then
cmake ..;
fi
- sh ./travis/${TRAVIS_OS_NAME}.${TARGET_OS}.script.sh
- make -j4 VERBOSE=1
- if [ $TARGET_OS == linux ]; then make tests && ./tests/tests; fi;
- if [[ $TARGET_OS != win* ]]; then make tests && ./tests/tests; fi;
before_deploy: make package
deploy:
provider: releases
Expand Down
2 changes: 2 additions & 0 deletions .travis/linux..before_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sudo add-apt-repository ppa:kalakris/cmake -y;
sudo apt-get update -qq
4 changes: 4 additions & 0 deletions .travis/linux..install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sudo apt-get install -y cmake libqt4-dev libsndfile-dev fftw3-dev libvorbis-dev \
libogg-dev libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev \
libstk0-dev libfluidsynth-dev portaudio19-dev wine-dev g++-multilib \
libfltk1.3-dev libgig-dev
1 change: 1 addition & 0 deletions .travis/linux..script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
2 changes: 2 additions & 0 deletions .travis/linux.win32.before_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sudo add-apt-repository ppa:tobydox/mingw -y
sudo apt-get update -qq
7 changes: 7 additions & 0 deletions .travis/linux.win32.install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sudo apt-get install -y nsis cloog-isl libmpc2 mingw32

sudo apt-get install -y mingw32-x-qt mingw32-x-sdl mingw32-x-libvorbis \
mingw32-x-fluidsynth mingw32-x-stk mingw32-x-glib2 mingw32-x-portaudio \
mingw32-x-libsndfile mingw32-x-fftw mingw32-x-flac mingw32-x-fltk \
mingw32-x-libsamplerate mingw32-x-pkgconfig mingw32-x-binutils \
mingw32-x-gcc mingw32-x-runtime mingw32-x-libgig
1 change: 1 addition & 0 deletions .travis/linux.win32.script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../build_mingw32 || ../build_mingw32
1 change: 1 addition & 0 deletions .travis/linux.win64.before_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sh .travis/linux.win32.before_install.sh
7 changes: 7 additions & 0 deletions .travis/linux.win64.install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sh .travis/linux.win32.install.sh

sudo apt-get install -y mingw64-x-qt mingw64-x-sdl mingw64-x-libvorbis \
mingw64-x-fluidsynth mingw64-x-stk mingw64-x-glib2 mingw64-x-portaudio \
mingw64-x-libsndfile mingw64-x-fftw mingw64-x-flac mingw64-x-fltk \
mingw64-x-libsamplerate mingw64-x-pkgconfig mingw64-x-binutils mingw64-x-gcc\
mingw64-x-runtime mingw64-x-libgig
1 change: 1 addition & 0 deletions .travis/linux.win64.script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../build_mingw64 || ../build_mingw64
1 change: 1 addition & 0 deletions .travis/osx..before_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
brew update
1 change: 1 addition & 0 deletions .travis/osx..install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
brew install qt libsndfile fftw libvorbis libogg jack sdl libsamplerate stk fluid-synth portaudio fltk
1 change: 1 addition & 0 deletions .travis/osx..script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..

0 comments on commit bd4a93c

Please sign in to comment.