From f7f3fc70f46cade9e7dae1461f1c77858ccaf430 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Tue, 6 Mar 2018 16:26:28 +0100 Subject: [PATCH 01/10] Switch CI to Ubuntu 16.04 Arch Linux updates too quickly and sometimes it is broken. Use Ubuntu 16.04 with the KDE Neon stable repository that has up to date Qt and a stable operating system. Closes: #211 --- .travis.yml | 21 +-------------------- .travis/build.sh | 13 +++++++++++++ .travis/docker.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 20 deletions(-) create mode 100755 .travis/build.sh create mode 100755 .travis/docker.sh diff --git a/.travis.yml b/.travis.yml index 643037f0..9ab6e6e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,27 +16,8 @@ env: # DEPLOY_HOST - secure: "0L8BKnozSiwI5VMRAL6QAQ6gwVIrnBhoYq6NkACbIOchkQShZlQH9p/4/2A9/6Wu4pTrB7eTeR1JQahmjwAqUFoMfpZm+LCBZGnQpHnZd6ZgT1rcgd1MAWR4PBhoeHGbTBly00Ez9BlE5nwUxwV7XszVxbEab5tzP52JThetf+tOoL1FjUyYb3/YpPOZzlQ2gh1BeBGi8PE29i06Sa5vlGdTtJXBZmHqn2IZ2bDCNFaetI9yr6HwkxvmuhQew/vv4bsSuUidfgdZrwPodJMo0aO78INWcIl8qleHaaKvVw5sRpdk3qNPqSW517/FHMG4jDHimDnX4s2aWaq+iaVuRc4VmeQ4Ebp5Zjlf9qVuhkOCUbCy0ojrEROsqYy/oVfAH99O9lvUDBl8Q6taFJeBwhZAdDMUttqQdRSaDEspFjOk7zDoeCLN4DFzOElW1DT1XYUXUvE+WIZci5zTyhNRp6WSIKHJKHjltTqa6KscKlmWUYvroKh80SdUrjNxibM/PVl5PlFRSeXAxq3s9bC/8oNUj0CbhZBqzIP9JMbCTrjX5KnO4BPULKo94pi4LBzGtzQNs6qQ/K1srH4FsB1M9RxrD3Uqr3VcU4XbLCRLGB5rZR6Jph0IOYiRUKgQkxHnsS6mXqIizCCxDuVR6MdSvnyDcy5PuEcAEG3tC//JFnw=" -arch: - packages: - - qbs - - qt5-declarative - - qt5-quickcontrols2 - - qt5-graphicaleffects - - qt5-wayland - - qt5-svg - - qt5-doc - - qt5-tools - - extra-cmake-modules - - xorg-server-xvfb - #- clazy-git - script: - - qbs-setup-toolchains --detect - - qbs-setup-qt /usr/bin/qmake-qt5 qt5 - - qbs config profiles.qt5.baseProfile ${CC} - - eval `dbus-launch --sh-syntax` && xvfb-run -a -s "-screen 0 800x600x24" qbs build -d build -j $(nproc) --all-products profile:qt5 modules.qbs.installRoot:/ modules.lirideployment.prefix:/usr modules.lirideployment.qmlDir:/usr/lib/qt/qml projects.Fluid.useSystemQbsShared:false projects.Fluid.autotestEnabled:true projects.Fluid.deploymentEnabled:true - script: - - "curl -s https://raw.githubusercontent.com/lirios/repotools/develop/travis/docker-travis.sh | bash" + - ./.travis/build.sh deploy: - provider: script diff --git a/.travis/build.sh b/.travis/build.sh new file mode 100755 index 00000000..45766ed5 --- /dev/null +++ b/.travis/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +image=liridev/ci-ubuntu:latest + +env_vars="-e CC=$CC -e DEBIAN_FRONTEND=noninteractive" +for line in $(env | egrep -e '^(FTP|TRAVIS|CLAZY)'); do + env_vars="$env_vars -e $line" +done + +sudo docker pull $image +sudo docker run --rm -ti -v $(pwd):/home $env_vars --workdir /home $image ./.travis/docker.sh diff --git a/.travis/docker.sh b/.travis/docker.sh new file mode 100755 index 00000000..55871a5a --- /dev/null +++ b/.travis/docker.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +set -e + +msg() { + lightblue='\033[1;34m' + reset='\e[0m' + echo -e "${lightblue}$@${reset}" +} + +# Install +msg "Install packages..." +apt-get install -y \ + g++ clang \ + git \ + xvfb \ + dbus-x11 \ + qt5-default \ + qbs \ + qtbase5-dev qtbase5-dev-tools qtbase5-private-dev \ + qtdeclarative5-dev qtdeclarative5-dev-tools qtdeclarative5-private-dev \ + qtquickcontrols2-5-dev \ + libqt5svg5-dev \ + qttools5-dev qttools5-dev-tools qttools5-private-dev \ + qt5-doc qtbase5-doc qtdeclarative5-doc qttools5-doc qtquickcontrols2-5-doc \ + qml-module-qtquick2 qml-module-qtquick-window2 qml-module-qtquick-layouts qml-module-qttest \ + qml-module-qtgraphicaleffects qml-module-qtqml-models2 \ + qml-module-qtquick-controls2 qml-module-qtquick-templates2 qml-module-qt-labs-calendar + +# Configure qbs +msg "Setup qbs..." +qbs setup-toolchains --detect +qbs setup-qt $(which qmake) travis-qt5 +qbs config profiles.travis-qt5.baseProfile $CC + +# Build +msg "Build..." +eval `dbus-launch --sh-syntax` +xvfb-run -a -s "-screen 0 800x600x24" \ +qbs -d build -j $(nproc) --all-products profile:travis-qt5 \ + modules.lirideployment.prefix:/usr \ + modules.lirideployment.libDir:/usr/lib/x86_64-linux-gnu \ + modules.lirideployment.qmlDir:/usr/lib/x86_64-linux-gnu/qt5/qml \ + modules.lirideployment.pluginsDir:/usr/lib/x86_64-linux-gnu/qt5/plugins \ + projects.Fluid.autotestEnabled:true \ + projects.Fluid.useSystemQbsShared:false \ + projects.Fluid.deploymentEnabled:true From a9a3657164fe8a5ed83f6189981111303e6b1ceb Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Thu, 29 Mar 2018 23:08:58 +0200 Subject: [PATCH 02/10] Use dbus-run-session in CI --- .travis/docker.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/docker.sh b/.travis/docker.sh index 55871a5a..711e3e9b 100755 --- a/.travis/docker.sh +++ b/.travis/docker.sh @@ -14,7 +14,7 @@ apt-get install -y \ g++ clang \ git \ xvfb \ - dbus-x11 \ + dbus \ qt5-default \ qbs \ qtbase5-dev qtbase5-dev-tools qtbase5-private-dev \ @@ -35,7 +35,7 @@ qbs config profiles.travis-qt5.baseProfile $CC # Build msg "Build..." -eval `dbus-launch --sh-syntax` +dbus-run-session -- \ xvfb-run -a -s "-screen 0 800x600x24" \ qbs -d build -j $(nproc) --all-products profile:travis-qt5 \ modules.lirideployment.prefix:/usr \ From b65b0c9873f22326664096f909fb8c6a33f11555 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Thu, 29 Mar 2018 23:26:28 +0200 Subject: [PATCH 03/10] Rename CI scripts Use more appropriate names. --- .travis.yml | 2 +- .travis/build.sh | 48 ++++++++++++++++++++++++++++++++++++++++------- .travis/docker.sh | 47 ---------------------------------------------- .travis/run.sh | 13 +++++++++++++ 4 files changed, 55 insertions(+), 55 deletions(-) delete mode 100755 .travis/docker.sh create mode 100755 .travis/run.sh diff --git a/.travis.yml b/.travis.yml index 9ab6e6e1..d68e6df9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ env: - secure: "0L8BKnozSiwI5VMRAL6QAQ6gwVIrnBhoYq6NkACbIOchkQShZlQH9p/4/2A9/6Wu4pTrB7eTeR1JQahmjwAqUFoMfpZm+LCBZGnQpHnZd6ZgT1rcgd1MAWR4PBhoeHGbTBly00Ez9BlE5nwUxwV7XszVxbEab5tzP52JThetf+tOoL1FjUyYb3/YpPOZzlQ2gh1BeBGi8PE29i06Sa5vlGdTtJXBZmHqn2IZ2bDCNFaetI9yr6HwkxvmuhQew/vv4bsSuUidfgdZrwPodJMo0aO78INWcIl8qleHaaKvVw5sRpdk3qNPqSW517/FHMG4jDHimDnX4s2aWaq+iaVuRc4VmeQ4Ebp5Zjlf9qVuhkOCUbCy0ojrEROsqYy/oVfAH99O9lvUDBl8Q6taFJeBwhZAdDMUttqQdRSaDEspFjOk7zDoeCLN4DFzOElW1DT1XYUXUvE+WIZci5zTyhNRp6WSIKHJKHjltTqa6KscKlmWUYvroKh80SdUrjNxibM/PVl5PlFRSeXAxq3s9bC/8oNUj0CbhZBqzIP9JMbCTrjX5KnO4BPULKo94pi4LBzGtzQNs6qQ/K1srH4FsB1M9RxrD3Uqr3VcU4XbLCRLGB5rZR6Jph0IOYiRUKgQkxHnsS6mXqIizCCxDuVR6MdSvnyDcy5PuEcAEG3tC//JFnw=" script: - - ./.travis/build.sh + - ./.travis/run.sh deploy: - provider: script diff --git a/.travis/build.sh b/.travis/build.sh index 45766ed5..711e3e9b 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -2,12 +2,46 @@ set -e -image=liridev/ci-ubuntu:latest +msg() { + lightblue='\033[1;34m' + reset='\e[0m' + echo -e "${lightblue}$@${reset}" +} -env_vars="-e CC=$CC -e DEBIAN_FRONTEND=noninteractive" -for line in $(env | egrep -e '^(FTP|TRAVIS|CLAZY)'); do - env_vars="$env_vars -e $line" -done +# Install +msg "Install packages..." +apt-get install -y \ + g++ clang \ + git \ + xvfb \ + dbus \ + qt5-default \ + qbs \ + qtbase5-dev qtbase5-dev-tools qtbase5-private-dev \ + qtdeclarative5-dev qtdeclarative5-dev-tools qtdeclarative5-private-dev \ + qtquickcontrols2-5-dev \ + libqt5svg5-dev \ + qttools5-dev qttools5-dev-tools qttools5-private-dev \ + qt5-doc qtbase5-doc qtdeclarative5-doc qttools5-doc qtquickcontrols2-5-doc \ + qml-module-qtquick2 qml-module-qtquick-window2 qml-module-qtquick-layouts qml-module-qttest \ + qml-module-qtgraphicaleffects qml-module-qtqml-models2 \ + qml-module-qtquick-controls2 qml-module-qtquick-templates2 qml-module-qt-labs-calendar -sudo docker pull $image -sudo docker run --rm -ti -v $(pwd):/home $env_vars --workdir /home $image ./.travis/docker.sh +# Configure qbs +msg "Setup qbs..." +qbs setup-toolchains --detect +qbs setup-qt $(which qmake) travis-qt5 +qbs config profiles.travis-qt5.baseProfile $CC + +# Build +msg "Build..." +dbus-run-session -- \ +xvfb-run -a -s "-screen 0 800x600x24" \ +qbs -d build -j $(nproc) --all-products profile:travis-qt5 \ + modules.lirideployment.prefix:/usr \ + modules.lirideployment.libDir:/usr/lib/x86_64-linux-gnu \ + modules.lirideployment.qmlDir:/usr/lib/x86_64-linux-gnu/qt5/qml \ + modules.lirideployment.pluginsDir:/usr/lib/x86_64-linux-gnu/qt5/plugins \ + projects.Fluid.autotestEnabled:true \ + projects.Fluid.useSystemQbsShared:false \ + projects.Fluid.deploymentEnabled:true diff --git a/.travis/docker.sh b/.travis/docker.sh deleted file mode 100755 index 711e3e9b..00000000 --- a/.travis/docker.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e - -msg() { - lightblue='\033[1;34m' - reset='\e[0m' - echo -e "${lightblue}$@${reset}" -} - -# Install -msg "Install packages..." -apt-get install -y \ - g++ clang \ - git \ - xvfb \ - dbus \ - qt5-default \ - qbs \ - qtbase5-dev qtbase5-dev-tools qtbase5-private-dev \ - qtdeclarative5-dev qtdeclarative5-dev-tools qtdeclarative5-private-dev \ - qtquickcontrols2-5-dev \ - libqt5svg5-dev \ - qttools5-dev qttools5-dev-tools qttools5-private-dev \ - qt5-doc qtbase5-doc qtdeclarative5-doc qttools5-doc qtquickcontrols2-5-doc \ - qml-module-qtquick2 qml-module-qtquick-window2 qml-module-qtquick-layouts qml-module-qttest \ - qml-module-qtgraphicaleffects qml-module-qtqml-models2 \ - qml-module-qtquick-controls2 qml-module-qtquick-templates2 qml-module-qt-labs-calendar - -# Configure qbs -msg "Setup qbs..." -qbs setup-toolchains --detect -qbs setup-qt $(which qmake) travis-qt5 -qbs config profiles.travis-qt5.baseProfile $CC - -# Build -msg "Build..." -dbus-run-session -- \ -xvfb-run -a -s "-screen 0 800x600x24" \ -qbs -d build -j $(nproc) --all-products profile:travis-qt5 \ - modules.lirideployment.prefix:/usr \ - modules.lirideployment.libDir:/usr/lib/x86_64-linux-gnu \ - modules.lirideployment.qmlDir:/usr/lib/x86_64-linux-gnu/qt5/qml \ - modules.lirideployment.pluginsDir:/usr/lib/x86_64-linux-gnu/qt5/plugins \ - projects.Fluid.autotestEnabled:true \ - projects.Fluid.useSystemQbsShared:false \ - projects.Fluid.deploymentEnabled:true diff --git a/.travis/run.sh b/.travis/run.sh new file mode 100755 index 00000000..0304dd3a --- /dev/null +++ b/.travis/run.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +image=liridev/ci-ubuntu:latest + +env_vars="-e CC=$CC -e DEBIAN_FRONTEND=noninteractive" +for line in $(env | egrep -e '^(FTP|TRAVIS|CLAZY)'); do + env_vars="$env_vars -e $line" +done + +sudo docker pull $image +sudo docker run --rm -ti -v $(pwd):/home $env_vars --workdir /home $image ./.travis/build.sh From f8ca86a0cfd7385440c7b31f9bc65d623430df05 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Sun, 1 Apr 2018 00:57:47 +0200 Subject: [PATCH 04/10] Allow to skip building QML modules With this option we can build a Flatpak bundle for Fluid Demo without duplicating the QML plugins. --- README.md | 1 + fluid.qbs | 1 + src/imports/imports.qbs | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 74daa303..0c29f8d9 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ See also [System-wide installation](#system-wide-installation). You can also append the following options to the last line: * `projects.Fluid.withDemo:false`: Do not build the demo app. + * `projects.Fluid.withQmlModules:false`: Do not build QML modules. * `projects.Fluid.withDocumentation:false`: Do not build the documentation. * `projects.Fluid.useStaticAnalyzer:true` to enable the Clang static analyzer. * `projects.Fluid.useSystemQbsShared:true` to use a system-wide installation of qbs-shared diff --git a/fluid.qbs b/fluid.qbs index 20bb1119..edf9b9d6 100644 --- a/fluid.qbs +++ b/fluid.qbs @@ -19,6 +19,7 @@ Project { property bool withDocumentation: true property bool withDemo: true + property bool withQmlModules: true property bool installIcons: true diff --git a/src/imports/imports.qbs b/src/imports/imports.qbs index 6a4491ad..94d34967 100644 --- a/src/imports/imports.qbs +++ b/src/imports/imports.qbs @@ -2,6 +2,7 @@ import qbs 1.0 Project { name: "QML Plugins" + condition: project.withQmlModules references: [ "core/core.qbs", From a3bb0dba159f0bdf6e9b776d3572d87333da6e9d Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Sun, 1 Apr 2018 01:04:32 +0200 Subject: [PATCH 05/10] Install desktop entry and AppStream metadata for the demo We want to build a Flatpak bundle for the demo, hence we need a desktop entry and AppStream metadata. --- src/demo/demo.qbs | 16 ++++++++++++++++ src/demo/io.liri.Fluid.Demo.appdata.xml | 20 ++++++++++++++++++++ src/demo/io.liri.Fluid.Demo.desktop | 7 +++++++ src/demo/main.cpp | 1 + 4 files changed, 44 insertions(+) create mode 100644 src/demo/io.liri.Fluid.Demo.appdata.xml create mode 100644 src/demo/io.liri.Fluid.Demo.desktop diff --git a/src/demo/demo.qbs b/src/demo/demo.qbs index 178aa7b7..9d9dcbb7 100644 --- a/src/demo/demo.qbs +++ b/src/demo/demo.qbs @@ -62,6 +62,22 @@ Project { qbs.installSourceBase: destinationDirectory fileTagsFilter: isBundle ? ["bundle.content"] : product.type } + + Group { + condition: qbs.targetOS.contains("linux") + name: "Desktop File" + files: ["io.liri.Fluid.Demo.desktop"] + qbs.install: true + qbs.installDir: lirideployment.applicationsDir + } + + Group { + condition: qbs.targetOS.contains("linux") + name: "AppStream Metadata" + files: ["io.liri.Fluid.Demo.appdata.xml"] + qbs.install: true + qbs.installDir: lirideployment.appDataDir + } } /* diff --git a/src/demo/io.liri.Fluid.Demo.appdata.xml b/src/demo/io.liri.Fluid.Demo.appdata.xml new file mode 100644 index 00000000..99fcba60 --- /dev/null +++ b/src/demo/io.liri.Fluid.Demo.appdata.xml @@ -0,0 +1,20 @@ + + + io.liri.Fluid.Demo.desktop + CC0-1.0 + GPL-3.0+ + Fluid Demo + Demonstrate Fluid QML modules + +

+ Fluid is an implementation of the Material Design language for + Qt developers. +

+

+ This app shows what Fluid has to offer. +

+
+ + https://liri.io + info@liri.io +
diff --git a/src/demo/io.liri.Fluid.Demo.desktop b/src/demo/io.liri.Fluid.Demo.desktop new file mode 100644 index 00000000..2fc4a4df --- /dev/null +++ b/src/demo/io.liri.Fluid.Demo.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Fluid Demo +Comment=Demonstrate Fluid modules +Exec=fluid-demo +Terminal=false +Type=Application +Categories=X-Liri;Qt;Development; diff --git a/src/demo/main.cpp b/src/demo/main.cpp index c224fae7..38061e68 100644 --- a/src/demo/main.cpp +++ b/src/demo/main.cpp @@ -28,6 +28,7 @@ int main(int argc, char *argv[]) QQuickStyle::setStyle(QLatin1String("Material")); QGuiApplication app(argc, argv); + app.setDesktopFileName(QLatin1String("io.liri.Fluid.Demo.desktop")); app.setQuitOnLastWindowClosed(true); // @uri Fluid.Demo From cd4938274a1ef6c5222496ec88f9d04962856382 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Sun, 1 Apr 2018 01:08:09 +0200 Subject: [PATCH 06/10] Set autotest condition --- tests/auto/auto.qbs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/auto.qbs b/tests/auto/auto.qbs index e055967a..4d5b2adc 100644 --- a/tests/auto/auto.qbs +++ b/tests/auto/auto.qbs @@ -3,6 +3,7 @@ import qbs.FileInfo Project { name: "Autotests" + condition: project.autotestEnabled references: [ "controls/controls.qbs", From bbdbd1722526d2388b89d11a24adc2a4baeed10f Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Sun, 1 Apr 2018 01:12:20 +0200 Subject: [PATCH 07/10] Avoid errors when QML modules are not built --- src/deployment/tarball.qbs | 12 ++++++------ tests/auto/auto.qbs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/deployment/tarball.qbs b/src/deployment/tarball.qbs index 445842be..730981fd 100644 --- a/src/deployment/tarball.qbs +++ b/src/deployment/tarball.qbs @@ -8,10 +8,10 @@ InstallPackage { archiver.type: "tar" archiver.outputDirectory: project.buildDirectory - Depends { name: "fluid-demo" } - Depends { name: "fluidcontrolsplugin" } - Depends { name: "fluidcoreplugin" } - Depends { name: "fluideffectsplugin" } - Depends { name: "fluidlayoutsplugin" } - Depends { name: "fluidtemplatesplugin" } + Depends { name: "fluid-demo"; required: project.withDemo } + Depends { name: "fluidcontrolsplugin"; required: project.withQmlModules } + Depends { name: "fluidcoreplugin"; required: project.withQmlModules } + Depends { name: "fluideffectsplugin"; required: project.withQmlModules } + Depends { name: "fluidlayoutsplugin"; required: project.withQmlModules } + Depends { name: "fluidtemplatesplugin"; required: project.withQmlModules } } diff --git a/tests/auto/auto.qbs b/tests/auto/auto.qbs index 4d5b2adc..8dcb5deb 100644 --- a/tests/auto/auto.qbs +++ b/tests/auto/auto.qbs @@ -3,7 +3,7 @@ import qbs.FileInfo Project { name: "Autotests" - condition: project.autotestEnabled + condition: project.autotestEnabled && project.withQmlImports references: [ "controls/controls.qbs", From 972a05f94b0d251beef3d475da4ad17ac7e6c1e8 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Sun, 1 Apr 2018 01:19:01 +0200 Subject: [PATCH 08/10] Install desktop file and AppStream metadata only on Linux and *BSD --- src/demo/demo.qbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/demo/demo.qbs b/src/demo/demo.qbs index 9d9dcbb7..25b44f2a 100644 --- a/src/demo/demo.qbs +++ b/src/demo/demo.qbs @@ -64,7 +64,7 @@ Project { } Group { - condition: qbs.targetOS.contains("linux") + condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("darwin") name: "Desktop File" files: ["io.liri.Fluid.Demo.desktop"] qbs.install: true @@ -72,7 +72,7 @@ Project { } Group { - condition: qbs.targetOS.contains("linux") + condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("darwin") name: "AppStream Metadata" files: ["io.liri.Fluid.Demo.appdata.xml"] qbs.install: true From fd635db3653e564ec6a9646e275c67e601513bf5 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Thu, 5 Apr 2018 02:21:56 +0200 Subject: [PATCH 09/10] Update infra-travis --- .travis.yml | 7 ++++++- .travis/build.sh | 29 +++++------------------------ .travis/run.sh | 13 ------------- 3 files changed, 11 insertions(+), 38 deletions(-) delete mode 100755 .travis/run.sh diff --git a/.travis.yml b/.travis.yml index d68e6df9..4cabc09b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,13 @@ env: # DEPLOY_HOST - secure: "0L8BKnozSiwI5VMRAL6QAQ6gwVIrnBhoYq6NkACbIOchkQShZlQH9p/4/2A9/6Wu4pTrB7eTeR1JQahmjwAqUFoMfpZm+LCBZGnQpHnZd6ZgT1rcgd1MAWR4PBhoeHGbTBly00Ez9BlE5nwUxwV7XszVxbEab5tzP52JThetf+tOoL1FjUyYb3/YpPOZzlQ2gh1BeBGi8PE29i06Sa5vlGdTtJXBZmHqn2IZ2bDCNFaetI9yr6HwkxvmuhQew/vv4bsSuUidfgdZrwPodJMo0aO78INWcIl8qleHaaKvVw5sRpdk3qNPqSW517/FHMG4jDHimDnX4s2aWaq+iaVuRc4VmeQ4Ebp5Zjlf9qVuhkOCUbCy0ojrEROsqYy/oVfAH99O9lvUDBl8Q6taFJeBwhZAdDMUttqQdRSaDEspFjOk7zDoeCLN4DFzOElW1DT1XYUXUvE+WIZci5zTyhNRp6WSIKHJKHjltTqa6KscKlmWUYvroKh80SdUrjNxibM/PVl5PlFRSeXAxq3s9bC/8oNUj0CbhZBqzIP9JMbCTrjX5KnO4BPULKo94pi4LBzGtzQNs6qQ/K1srH4FsB1M9RxrD3Uqr3VcU4XbLCRLGB5rZR6Jph0IOYiRUKgQkxHnsS6mXqIizCCxDuVR6MdSvnyDcy5PuEcAEG3tC//JFnw=" +branches: + except: + - /^(?i:continuous)$/ + script: - - ./.travis/run.sh + - wget -c https://raw.githubusercontent.com/lirios/infra-travis/master/run + - bash run ./.travis/build.sh deploy: - provider: script diff --git a/.travis/build.sh b/.travis/build.sh index 711e3e9b..a19e6fbb 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -2,38 +2,18 @@ set -e -msg() { - lightblue='\033[1;34m' - reset='\e[0m' - echo -e "${lightblue}$@${reset}" -} - -# Install -msg "Install packages..." -apt-get install -y \ - g++ clang \ - git \ - xvfb \ - dbus \ - qt5-default \ - qbs \ - qtbase5-dev qtbase5-dev-tools qtbase5-private-dev \ - qtdeclarative5-dev qtdeclarative5-dev-tools qtdeclarative5-private-dev \ - qtquickcontrols2-5-dev \ - libqt5svg5-dev \ - qttools5-dev qttools5-dev-tools qttools5-private-dev \ - qt5-doc qtbase5-doc qtdeclarative5-doc qttools5-doc qtquickcontrols2-5-doc \ - qml-module-qtquick2 qml-module-qtquick-window2 qml-module-qtquick-layouts qml-module-qttest \ - qml-module-qtgraphicaleffects qml-module-qtqml-models2 \ - qml-module-qtquick-controls2 qml-module-qtquick-templates2 qml-module-qt-labs-calendar +source /usr/local/share/liri-travis/functions # Configure qbs +travis_start "qbs_setup" msg "Setup qbs..." qbs setup-toolchains --detect qbs setup-qt $(which qmake) travis-qt5 qbs config profiles.travis-qt5.baseProfile $CC +travis_end "qbs_setup" # Build +travis_start "build" msg "Build..." dbus-run-session -- \ xvfb-run -a -s "-screen 0 800x600x24" \ @@ -45,3 +25,4 @@ qbs -d build -j $(nproc) --all-products profile:travis-qt5 \ projects.Fluid.autotestEnabled:true \ projects.Fluid.useSystemQbsShared:false \ projects.Fluid.deploymentEnabled:true +travis_end "build" diff --git a/.travis/run.sh b/.travis/run.sh deleted file mode 100755 index 0304dd3a..00000000 --- a/.travis/run.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -e - -image=liridev/ci-ubuntu:latest - -env_vars="-e CC=$CC -e DEBIAN_FRONTEND=noninteractive" -for line in $(env | egrep -e '^(FTP|TRAVIS|CLAZY)'); do - env_vars="$env_vars -e $line" -done - -sudo docker pull $image -sudo docker run --rm -ti -v $(pwd):/home $env_vars --workdir /home $image ./.travis/build.sh From 1dfc41f0b678680c5cf02d5fcda16cbc8f6b96fc Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Thu, 5 Apr 2018 03:38:08 +0200 Subject: [PATCH 10/10] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c29f8d9..2eb1c846 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,8 @@ Qt >= 5.10.0 with at least the following modules is required: The following modules and their dependencies are required: - * [qbs >= 1.9.0](http://code.qt.io/cgit/qbs/qbs.git) - * [qbs-shared >= 1.2.0](https://github.com/lirios/qbs-shared.git) + * [qbs](http://code.qt.io/cgit/qbs/qbs.git) >= 1.9.0 + * [qbs-shared](https://github.com/lirios/qbs-shared.git) >= 1.2.0 ## Build