From ab4b024df4b8ed86fe82dad34051559280365a1a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 28 Jul 2018 17:22:12 -0700 Subject: [PATCH] Travis CI support --- .travis.yml | 27 +++++++++++++++++++++++ app/app.pro | 3 +++ moonlight-common-c/moonlight-common-c.pro | 3 +++ moonlight-qt.pro | 3 +++ opus/opus.pro | 3 +++ qmdnsengine/qmdnsengine.pro | 3 +++ 6 files changed, 42 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..68a6c318 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,27 @@ +language: cpp + +git: + depth: 1 + +matrix: + include: + - sudo: required + dist: xenial + addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt596-xenial' + packages: + - qt59base + - qt59quickcontrols2 + - qt59svg + - libesd0-dev + - libgl-dev + +script: + - if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then source /opt/qt59/bin/qt59-env.sh; fi + - if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then export SDL2_VER=2.0.8 && wget https://www.libsdl.org/release/SDL2-$SDL2_VER.tar.gz && tar -xvf SDL2-$SDL2_VER.tar.gz && cd SDL2-$SDL2_VER && ./configure && make && sudo make install && cd ..; fi + - if [[ "$CC" == "gcc" ]]; then qmake moonlight-qt.pro -spec linux-g++; fi + - if [[ "$CC" == "clang" ]]; then qmake moonlight-qt.pro -spec linux-clang; fi + - make debug + - make release diff --git a/app/app.pro b/app/app.pro index 39a250c1..25272f0a 100644 --- a/app/app.pro +++ b/app/app.pro @@ -8,6 +8,9 @@ unix:!macx { TARGET = Moonlight } +# Support debug and release builds from command line for CI +CONFIG += debug_and_release + TEMPLATE = app # The following define makes your compiler emit warnings if you use diff --git a/moonlight-common-c/moonlight-common-c.pro b/moonlight-common-c/moonlight-common-c.pro index 2a0a498e..c667802d 100644 --- a/moonlight-common-c/moonlight-common-c.pro +++ b/moonlight-common-c/moonlight-common-c.pro @@ -9,6 +9,9 @@ QT -= core gui TARGET = moonlight-common-c TEMPLATE = lib +# Support debug and release builds from command line for CI +CONFIG += debug_and_release + win32 { INCLUDEPATH += $$PWD/../libs/windows/include } diff --git a/moonlight-qt.pro b/moonlight-qt.pro index 96fdd92e..f8446804 100644 --- a/moonlight-qt.pro +++ b/moonlight-qt.pro @@ -7,6 +7,9 @@ SUBDIRS = \ CONFIG += ordered +# Support debug and release builds from command line for CI +CONFIG += debug_and_release + # Run our compile tests load(configure) qtCompileTest(SLVideo) diff --git a/opus/opus.pro b/opus/opus.pro index 5f583f6d..6af71b1c 100644 --- a/opus/opus.pro +++ b/opus/opus.pro @@ -3,6 +3,9 @@ QT -= core gui TARGET = opus TEMPLATE = lib +# Support debug and release builds from command line for CI +CONFIG += debug_and_release + OPUS_DIR = $$PWD/opus DEFINES += \ USE_ALLOCA=1 \ diff --git a/qmdnsengine/qmdnsengine.pro b/qmdnsengine/qmdnsengine.pro index c7bdfda1..0e9f1b8e 100644 --- a/qmdnsengine/qmdnsengine.pro +++ b/qmdnsengine/qmdnsengine.pro @@ -4,6 +4,9 @@ QT += network TARGET = qmdnsengine TEMPLATE = lib +# Support debug and release builds from command line for CI +CONFIG += debug_and_release + QMDNSE_DIR = $$PWD/qmdnsengine/src DEFINES += \ QT_NO_SIGNALS_SLOTS_KEYWORDS