diff --git a/.travis.yml b/.travis.yml index 7b8a55635..873bf5bd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,18 @@ +os: + - linux + sudo: required dist: trusty -language: cpp + +languages: c++ compiler: gcc -#matrix: - #include: - #- env: TARGET_OS=win32 - #- env: TARGET_OS=win64 + before_install: - - sh ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.before_install.sh + - sh ${TRAVIS_BUILD_DIR}/.travis/before_install.sh install: - - sh ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.install.sh + - sh ${TRAVIS_BUILD_DIR}/.travis/install.sh script: - - sh ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.script.sh + - sh ${TRAVIS_BUILD_DIR}/.travis/script-linux.sh + - sh ${TRAVIS_BUILD_DIR}/.travis/script-macos.sh + - sh ${TRAVIS_BUILD_DIR}/.travis/script-win32.sh + - sh ${TRAVIS_BUILD_DIR}/.travis/script-win64.sh diff --git a/.travis/linux..before_install.sh b/.travis/before_install.sh old mode 100644 new mode 100755 similarity index 53% rename from .travis/linux..before_install.sh rename to .travis/before_install.sh index 7bdd3daaf..ed5603082 --- a/.travis/linux..before_install.sh +++ b/.travis/before_install.sh @@ -1,4 +1,8 @@ +#!/bin/bash + sudo add-apt-repository ppa:kxstudio-debian/kxstudio -y +sudo add-apt-repository ppa:kxstudio-debian/mingw -y +sudo add-apt-repository ppa:kxstudio-debian/toolchain -y sudo apt-get update -qq sudo apt-get install kxstudio-repos sudo apt-get update -qq diff --git a/.travis/install.sh b/.travis/install.sh new file mode 100755 index 000000000..6ad40644e --- /dev/null +++ b/.travis/install.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +set -e + +sudo apt-get install -y \ + pkg-config \ + pyqt5-dev-tools \ + python3-pyqt5.qtsvg \ + python3-rdflib \ + libgtk2.0-dev \ + libgtk-3-dev \ + libqt4-dev \ + qtbase5-dev \ + libasound2-dev \ + libpulse-dev \ + libmagic-dev \ + libgl1-mesa-dev \ + libx11-dev \ + liblo-static \ + fluidsynth-static \ + apple-x86-setup \ + mingw32-x-gcc \ + mingw32-x-fluidsynth \ + mingw32-x-liblo \ + mingw32-x-pkgconfig \ + mingw64-x-gcc \ + mingw64-x-fluidsynth \ + mingw64-x-liblo \ + mingw64-x-pkgconfig \ + wine-rt-dev + +mkdir /tmp/osx-macports-pkgs +pushd /tmp/osx-macports-pkgs +wget https://launchpad.net/~kxstudio-team/+archive/ubuntu/builds/+files/apple-macports-flac_1.2.1-1_all.deb +wget https://launchpad.net/~kxstudio-team/+archive/ubuntu/builds/+files/apple-macports-libiconv_1.14-0_all.deb +wget https://launchpad.net/~kxstudio-team/+archive/ubuntu/builds/+files/apple-macports-liblo_0.26-1_all.deb +wget https://launchpad.net/~kxstudio-team/+archive/ubuntu/builds/+files/apple-macports-libogg_1.3.0-1_all.deb +wget https://launchpad.net/~kxstudio-team/+archive/ubuntu/builds/+files/apple-macports-libsndfile_1.0.25-0_all.deb +wget https://launchpad.net/~kxstudio-team/+archive/ubuntu/builds/+files/apple-macports-libvorbis_1.3.3-0_all.deb +popd +rm -r /tmp/osx-macports-pkgs diff --git a/.travis/linux..install.sh b/.travis/linux..install.sh deleted file mode 100644 index 3563257cb..000000000 --- a/.travis/linux..install.sh +++ /dev/null @@ -1,6 +0,0 @@ -sudo apt-get install -y pkg-config \ - pyqt4-dev-tools libqt4-dev libgtk2.0-dev \ - libasound2-dev libpulse-dev libmagic-dev libx11-dev libxft-dev \ - libgl1-mesa-dev libglu1-mesa-dev \ - liblo-static fftw3-static mxml-static zlib-static ntk-static \ - fluidsynth-static diff --git a/.travis/linux..script.sh b/.travis/linux..script.sh deleted file mode 100644 index 2a413266e..000000000 --- a/.travis/linux..script.sh +++ /dev/null @@ -1,8 +0,0 @@ -export CFLAGS=-I/opt/kxstudio/include -export CXXFLAGS=-I/opt/kxstudio/include -export LDFLAGS=-L/opt/kxstudio/lib -export PATH=/opt/kxstudio/bin:$PATH -export PKG_CONFIG_PATH=/opt/kxstudio/lib/pkgconfig:$PKG_CONFIG_PATH - -make features -make diff --git a/.travis/linux.win32.before_install.sh b/.travis/linux.win32.before_install.sh deleted file mode 100644 index 73c14aedd..000000000 --- a/.travis/linux.win32.before_install.sh +++ /dev/null @@ -1,2 +0,0 @@ -sudo add-apt-repository ppa:tobydox/mingw-x-precise -y -sudo apt-get update -qq diff --git a/.travis/linux.win32.install.sh b/.travis/linux.win32.install.sh deleted file mode 100644 index 00fdcc1c6..000000000 --- a/.travis/linux.win32.install.sh +++ /dev/null @@ -1,6 +0,0 @@ -sudo apt-get install -y pkg-config \ - mingw32-x-gcc - -# mingw32-x-gcc mingw32-x-pkgconfig -# mingw32-x-liblo mingw32-x-fftw3 mingw32-x-mxml mingw32-x-zlib -# mingw32-x-fluidsynth diff --git a/.travis/linux.win32.script.sh b/.travis/linux.win32.script.sh deleted file mode 100644 index 2e21faf5d..000000000 --- a/.travis/linux.win32.script.sh +++ /dev/null @@ -1,21 +0,0 @@ -export PATH=/opt/mingw64/bin:/opt/mingw64/x86_64-w64-mingw32/bin:$PATH -export AR=x86_64-w64-mingw32-ar -export CC=x86_64-w64-mingw32-gcc -export CXX=x86_64-w64-mingw32-g++ -export MOC=x86_64-w64-mingw32-moc -export RCC=x86_64-w64-mingw32-rcc -export UIC=x86_64-w64-mingw32-uic -export STRIP=x86_64-w64-mingw32-strip -export WINDRES=x86_64-w64-mingw32-windres - -export PKGCONFIG=x86_64-w64-mingw32-pkg-config -export PKG_CONFIG_PATH=/opt/mingw64/lib/pkgconfig - -export CFLAGS="-DBUILDING_CARLA_FOR_WINDOWS -DPTW32_STATIC_LIB -I/opt/mingw64/include" -export CXXFLAGS="$CFLAGS -DFLUIDSYNTH_NOT_A_DLL" - -export WIN32=true -export WIN64=true - -make features -make -j4 diff --git a/.travis/linux.win64.before_install.sh b/.travis/linux.win64.before_install.sh deleted file mode 100644 index a598ff1ca..000000000 --- a/.travis/linux.win64.before_install.sh +++ /dev/null @@ -1 +0,0 @@ -sh .travis/linux.win32.before_install.sh diff --git a/.travis/linux.win64.install.sh b/.travis/linux.win64.install.sh deleted file mode 100644 index 1bd477759..000000000 --- a/.travis/linux.win64.install.sh +++ /dev/null @@ -1,6 +0,0 @@ -sudo apt-get install -y pkg-config \ - mingw64-x-gcc - -# mingw64-x-gcc mingw64-x-pkgconfig -# mingw64-x-liblo mingw64-x-fftw3 mingw64-x-mxml mingw64-x-zlib -# mingw64-x-fluidsynth diff --git a/.travis/linux.win64.script.sh b/.travis/linux.win64.script.sh deleted file mode 100644 index 518ca6b19..000000000 --- a/.travis/linux.win64.script.sh +++ /dev/null @@ -1,20 +0,0 @@ -export PATH=/opt/mingw32/bin:/opt/mingw32/i686-w64-mingw32/bin:$PATH -export AR=i686-w64-mingw32-ar -export CC=i686-w64-mingw32-gcc -export CXX=i686-w64-mingw32-g++ -export MOC=i686-w64-mingw32-moc -export RCC=i686-w64-mingw32-rcc -export UIC=i686-w64-mingw32-uic -export STRIP=i686-w64-mingw32-strip -export WINDRES=i686-w64-mingw32-windres - -export PKGCONFIG=i686-w64-mingw32-pkg-config -export PKG_CONFIG_PATH=/opt/mingw32/lib/pkgconfig - -export CFLAGS="-DBUILDING_CARLA_FOR_WINDOWS -DPTW32_STATIC_LIB -I/opt/mingw32/include" -export CXXFLAGS="$CFLAGS -DFLUIDSYNTH_NOT_A_DLL" - -export WIN32=true - -make features -make -j4 diff --git a/.travis/script-linux.sh b/.travis/script-linux.sh new file mode 100755 index 000000000..91bfa80a3 --- /dev/null +++ b/.travis/script-linux.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Preparation +_FLAGS="-I/opt/kxstudio/include -Werror" +export CFLAGS="${_FLAGS}" +export CXXFLAGS="${_FLAGS}" +export LDFLAGS="-L/opt/kxstudio/lib" +export PATH=/opt/kxstudio/bin:${PATH} +export PKG_CONFIG_PATH=/opt/kxstudio/lib/pkgconfig:${PKG_CONFIG_PATH} + +# Start clean +make distclean >/dev/null + +# Print available features +make features + +# Build native stuff +make all posix32 + +# Build wine bridges +make wine32 wine64 + +# Build windows binaries for bridges +env PATH=/opt/mingw32/bin:${PATH} make win32 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ +env PATH=/opt/mingw64/bin:${PATH} make win64 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ diff --git a/.travis/script-macos.sh b/.travis/script-macos.sh new file mode 100755 index 000000000..3216a1d4e --- /dev/null +++ b/.travis/script-macos.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +# Preparation +_FLAGS="-Wno-attributes -Wno-deprecated-declarations -Werror" +export CFLAGS="${_FLAGS}" +export CXXFLAGS="${_FLAGS}" +export MACOS_OLD=true +export CROSS_COMPILING=true +source /usr/bin/apple-cross-setup.env + +# Start clean +make distclean >/dev/null + +# Print available features +make features + +# Build native stuff +make diff --git a/.travis/script-win32.sh b/.travis/script-win32.sh new file mode 100755 index 000000000..7c2dad5a6 --- /dev/null +++ b/.travis/script-win32.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +# Preparation +_FLAGS="-DFLUIDSYNTH_NOT_A_DLL -DPTW32_STATIC_LIB -Werror" +_PREFIX=i686-w64-mingw32 +export AR=${_PREFIX}-ar +export CC=${_PREFIX}-gcc +export CXX=${_PREFIX}-g++ +export CFLAGS="${_FLAGS}" +export CXXFLAGS="${_FLAGS}" +export PATH=/opt/mingw32/${_PREFIX}/bin:/opt/mingw32/bin:${PATH} +export PKG_CONFIG_PATH=/opt/mingw32/lib/pkgconfig:${PKG_CONFIG_PATH} + +# Start clean +make distclean >/dev/null + +# Print available features +make features + +# Build native stuff +make BUILDING_FOR_WINDOWS=true diff --git a/.travis/script-win64.sh b/.travis/script-win64.sh new file mode 100755 index 000000000..6d50ce6cb --- /dev/null +++ b/.travis/script-win64.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +# Preparation +_FLAGS="-DFLUIDSYNTH_NOT_A_DLL -DPTW32_STATIC_LIB -Werror" +_PREFIX=x86_64-w64-mingw32 +export AR=${_PREFIX}-ar +export CC=${_PREFIX}-gcc +export CXX=${_PREFIX}-g++ +export CFLAGS="${_FLAGS}" +export CXXFLAGS="${_FLAGS}" +export PATH=/opt/mingw64/${_PREFIX}/bin:/opt/mingw64/bin:${PATH} +export PKG_CONFIG_PATH=/opt/mingw64/lib/pkgconfig:${PKG_CONFIG_PATH} + +# Start clean +make distclean >/dev/null + +# Print available features +make features + +# Build native stuff +make BUILDING_FOR_WINDOWS=true