aboutsummaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorRichard Weickelt <richard@weickelt.de>2019-07-08 02:10:25 +0200
committerRichard Weickelt <richard@weickelt.de>2019-08-13 22:27:56 +0000
commit53b5e843cf5b79c26b514a024290d8642c584a9c (patch)
tree9cd9f6d4a406a1c4cad5a50c2985c6ec580b1593 /.travis.yml
parent7f41e3ac8ad347106dbeb233ea55deb3020d3342 (diff)
Minimal Qt installer script
One of the main problems in virtual environments like Travis CI is how to install Qt and QtCreator. The official installer provided by the Qt Company is almost unusable from command line. It is even harder to select only certain components (especially QtScript). Luckily, all components are available online under http://download.qt.io. This script installs components from the official Qt package repository. It can be used in any bash environment to simplify the setup procedure and supports every valid combination of host OS, target platform (desktop, android, ios) as well as toolchains. Dependencies: - bash - curl - 7z Change-Id: Ia2080cb80df98551332eb02c85c5933fd3bdaa4e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml31
1 files changed, 8 insertions, 23 deletions
diff --git a/.travis.yml b/.travis.yml
index acb1730d8..54455ff45 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,10 @@ language: cpp
git:
submodules: false
+env:
+ global:
+ - QT_INSTALL_DIR=~/Qt
+
stages:
- name: Build Qbs and and run autotests
@@ -44,22 +48,12 @@ jobs:
# Address sanitizer slows autotests down too much.
# We would hit the maximum build time on Travis.
BUILD_OPTIONS=modules.qbsbuildconfig.enableAddressSanitizer:false
- QT_INSTALL_DIR=/Users/travis/Qt
QMAKE_PATH=${QT_INSTALL_DIR}/5.12.4/clang_64/bin/qmake
PATH="${QT_INSTALL_DIR}/Qt Creator.app/Contents/MacOS:${PATH}"
QBS_BUILD_PROFILE=qt
before_install:
- - curl -L -o qtbase.7z http://master.qt.io/online/qtsdkrepository/mac_x64/desktop/qt5_5124/qt.qt5.5124.clang_64/5.12.4-0-201906140148qtbase-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z
- - curl -L -o qtdeclarative.7z http://master.qt.io/online/qtsdkrepository/mac_x64/desktop/qt5_5124/qt.qt5.5124.clang_64/5.12.4-0-201906140148qtdeclarative-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z
- - curl -L -o qttools.7z http://master.qt.io/online/qtsdkrepository/mac_x64/desktop/qt5_5124/qt.qt5.5124.clang_64/5.12.4-0-201906140148qttools-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z
- - curl -L -o qtscript.7z http://master.qt.io/online/qtsdkrepository/mac_x64/desktop/qt5_5124/qt.qt5.5124.qtscript.clang_64/5.12.4-0-201906140148qtscript-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z
- - curl -L -o qtcreator.7z http://master.qt.io/online/qtsdkrepository/mac_x64/desktop/tools_qtcreator/qt.tools.qtcreator/4.9.1-0qtcreator.7z
- - 7z x -o${QT_INSTALL_DIR} qtbase.7z
- - 7z x -o${QT_INSTALL_DIR} qtdeclarative.7z
- - 7z x -o${QT_INSTALL_DIR} qttools.7z
- - 7z x -o${QT_INSTALL_DIR} qtscript.7z
- - 7z x -o${QT_INSTALL_DIR} qtcreator.7z
- - printf "[Paths]\nPrefix = ..\n" > ${QT_INSTALL_DIR}/5.12.4/clang_64/bin/qt.conf
+ - ./scripts/install-qt.sh -d ${QT_INSTALL_DIR} --version 5.12.4 qtbase qtdeclarative qttools qtscript
+ - ./scripts/install-qt.sh -d ${QT_INSTALL_DIR} --version 4.9.2 qtcreator
- pip2 install --user beautifulsoup4 lxml
script:
- qbs setup-toolchains --detect
@@ -99,17 +93,8 @@ jobs:
- powershell -Command 'Add-MpPreference -ExclusionProcess link.exe'
# Install Qbs and Qt
- - curl -L -o qtbase.7z http://master.qt.io/online/qtsdkrepository/windows_x86/desktop/qt5_5124/qt.qt5.5124.win64_msvc2017_64/5.12.4-0-201906140149qtbase-Windows-Windows_10-MSVC2017-Windows-Windows_10-X86_64.7z
- - curl -L -o qtdeclarative.7z http://master.qt.io/online/qtsdkrepository/windows_x86/desktop/qt5_5124/qt.qt5.5124.win64_msvc2017_64/5.12.4-0-201906140149qtdeclarative-Windows-Windows_10-MSVC2017-Windows-Windows_10-X86_64.7z
- - curl -L -o qttools.7z http://master.qt.io/online/qtsdkrepository/windows_x86/desktop/qt5_5124/qt.qt5.5124.win64_msvc2017_64/5.12.4-0-201906140149qttools-Windows-Windows_10-MSVC2017-Windows-Windows_10-X86_64.7z
- - curl -L -o qtscript.7z http://master.qt.io/online/qtsdkrepository/windows_x86/desktop/qt5_5124/qt.qt5.5124.qtscript.win64_msvc2017_64/5.12.4-0-201906140149qtscript-Windows-Windows_10-MSVC2017-Windows-Windows_10-X86_64.7z
- - curl -L -o qtcreator.7z http://master.qt.io/online/qtsdkrepository/windows_x86/desktop/tools_qtcreator/qt.tools.qtcreator/4.9.2-0qtcreator.7z
- - 7z x -o${QT_INSTALL_DIR} qtbase.7z
- - 7z x -o${QT_INSTALL_DIR} qtdeclarative.7z
- - 7z x -o${QT_INSTALL_DIR} qttools.7z
- - 7z x -o${QT_INSTALL_DIR} qtscript.7z
- - 7z x -o${QT_INSTALL_DIR} qtcreator.7z
- - echo -e "[Paths]\nPrefix = .." > $(dirname ${QMAKE_PATH})/qt.conf
+ - ./scripts/install-qt.sh -d ${QT_INSTALL_DIR} --version 5.12.4 --toolchain win64_msvc2017_64 qtbase qtdeclarative qttools qtscript
+ - ./scripts/install-qt.sh -d ${QT_INSTALL_DIR} --version 4.9.2 qtcreator
script:
- qbs setup-toolchains --detect
- qbs setup-qt ${QMAKE_PATH} qt