diff options
-rw-r--r-- | .travis.yml | 21 | ||||
-rw-r--r-- | docker-compose.yml | 11 | ||||
-rw-r--r-- | docker/bionic/Dockerfile | 108 | ||||
-rw-r--r-- | docker/windowsservercore/Dockerfile | 27 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackboxapple.cpp | 5 |
5 files changed, 35 insertions, 137 deletions
diff --git a/.travis.yml b/.travis.yml index e5a73e9f2..096b24e2c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,9 @@ git: env: global: - QT_INSTALL_DIR=~/Qt - - QT_VERSION=5.12.8 + - QT_VERSION=5.15.0 - QTCREATOR_VERSION=4.11.2 + - QTEST_FUNCTION_TIMEOUT=9000000 cache: directories: @@ -48,13 +49,6 @@ jobs: - docker-compose run bionic scripts/build-qbs-with-qmake.sh - <<: *build-on-bionic - name: With Qbs on Ubuntu bionic (mingw32_w64) - env: - BUILD_OPTIONS="profile:qt-mingw32_w64 modules.cpp.compilerWrapper:ccache modules.cpp.treatWarningsAsErrors:true config:release" - script: - - docker-compose run bionic qbs build ${BUILD_OPTIONS} - - - <<: *build-on-bionic name: With Qbs on Ubuntu bionic (linux_clang64 & clang_tidy) env: BUILD_OPTIONS="profile:qt-clang_64 modules.cpp.compilerWrapper:ccache" @@ -190,20 +184,21 @@ jobs: - &build-on-windows stage: Build Qbs and and run autotests - name: With Qbs on Windows (Visual Studio 2017) + name: With Qbs on Windows (Visual Studio 2019) os: windows env: # Need to build in release mode. Otherwise autotests would be too slow. BUILD_OPTIONS="config:release modules.cpp.compilerWrapper:clcache" - QMAKE_PATH=${QT_INSTALL_DIR}/${QT_VERSION}/msvc2017_64/bin/qmake.exe + QMAKE_PATH=${QT_INSTALL_DIR}/${QT_VERSION}/msvc2019_64/bin/qmake.exe PATH="${QT_INSTALL_DIR}/Tools/QtCreator/bin:/c/Python38:/c/Python39:/c/Python38/Scripts:/c/Python39/Scripts:${PATH}" QBS_BUILD_PROFILE=qt CLCACHE_DIR="${HOME}/.ccache" before_install: # Install Qbs and Qt - - ./scripts/install-qt.sh -d ${QT_INSTALL_DIR} --version ${QT_VERSION} --toolchain win64_msvc2017_64 qtbase qtdeclarative qttools qtscript + - ./scripts/install-qt.sh -d ${QT_INSTALL_DIR} --version ${QT_VERSION} --toolchain win64_msvc2019_64 qtbase qtdeclarative qttools qtscript - ./scripts/install-qt.sh -d ${QT_INSTALL_DIR} --version ${QTCREATOR_VERSION} qtcreator - choco install python3 + - choco install -y visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --norestart" - pip3 install conan beautifulsoup4 lxml - pip3 install git+https://github.com/frerich/clcache.git@cae73d8255d78db8ba11e23c51fd2c9a89e7475b before_script: @@ -211,9 +206,11 @@ jobs: after_script: - clcache -s script: + - find "C:/Program Files (x86)/Microsoft Visual Studio/2017" -name vcvarsall.bat + - find "C:/Program Files (x86)/Microsoft Visual Studio/2019" -name vcvarsall.bat - qbs setup-toolchains --detect - qbs setup-qt ${QMAKE_PATH} qt - - qbs config qt.baseProfile MSVC2017-x64 + - qbs config profiles.qt.baseProfile MSVC2019-x64 - qbs config defaultProfile qt - scripts/build-qbs-with-qbs.sh diff --git a/docker-compose.yml b/docker-compose.yml index b8b4528c9..2e87be195 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,7 @@ x-default-service: &linux working_dir: /qbs environment: - BUILD_OPTIONS + - QTEST_FUNCTION_TIMEOUT volumes: - .:/qbs - ~/.ccache:/home/devel/.ccache @@ -15,12 +16,12 @@ services: bionic: << : *linux hostname: bionic - image: ${DOCKER_USER:-qbsbuild}/qbsdev:bionic-5.12.8_1.15.1-0 + image: ${DOCKER_USER:-qbsbuild}/qbsdev:bionic-5.15.0_1.15.1-0 build: dockerfile: docker/bionic/Dockerfile context: . args: - QT_VERSION: 5.12.8 + QT_VERSION: 5.15.0 QTCREATOR_VERSION: 4.11.2 bionic-android-513: @@ -44,13 +45,13 @@ services: QT_VERSION: 5.14.0 windows: - image: ${DOCKER_USER:-qbsbuild}/qbsdev:windowsservercore-5.12.7_1.15.0-0 + image: ${DOCKER_USER:-qbsbuild}/qbsdev:windowsservercore-5.15.0_1.16.0-0 build: dockerfile: docker/windowsservercore/Dockerfile context: . args: - QT_VERSION: 5.12.7 - QBS_VERSION: 1.15.0 + QT_VERSION: 5.15.0 + QBS_VERSION: 1.16.0 working_dir: 'C:/qbs' environment: - BUILD_OPTIONS diff --git a/docker/bionic/Dockerfile b/docker/bionic/Dockerfile index 204c27606..d81714329 100644 --- a/docker/bionic/Dockerfile +++ b/docker/bionic/Dockerfile @@ -1,89 +1,5 @@ # -# Downloads and builds Qt from source. We do it in a -# separate stage to keep the number of dependencies low in -# the final Docker image. -# -FROM ubuntu:bionic as build-qt-mingw32_w64 -ARG QT_VERSION - -RUN apt-get update -qq && \ - apt-get install -qq -y --no-install-recommends \ - build-essential \ - ca-certificates \ - libclang-3.9-dev \ - libgl1-mesa-dev \ - mingw-w64 \ - python \ - xz-utils \ - wget - -ENV LLVM_INSTALL_DIR=/usr/lib/llvm-3.9 - -RUN mkdir -p /qt/source && \ - wget -nv --continue --tries=20 --waitretry=10 --retry-connrefused \ - --no-dns-cache --timeout 300 -qO- \ - https://download.qt.io/official_releases/qt/${QT_VERSION%??}/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz \ - | tar --strip-components=1 -C /qt/source -xJf- - -RUN mkdir -p qt/build && \ - cd qt/build && \ - ../source/configure \ - -prefix /opt/Qt/${QT_VERSION}/mingw32_w64 \ - -release \ - -shared \ - -opensource \ - -confirm-license \ - -nomake examples \ - -nomake tests \ - -xplatform win32-g++ \ - -opengl desktop \ - -device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32- \ - -qt-sqlite -qt-libpng \ - -no-cups -no-dbus -no-pch \ - -no-feature-accessibility \ - -skip qtactiveqt \ - -skip qt3d \ - -skip qtcanvas3d \ - -skip qtcharts \ - -skip qtconnectivity \ - -skip qtdatavis3d \ - -skip qtdeclarative \ - -skip qtdoc \ - -skip qtgamepad \ - -skip qtgraphicaleffects \ - -skip qtimageformats \ - -skip qtlocation \ - -skip qtmultimedia \ - -skip qtnetworkauth \ - -skip qtquickcontrols \ - -skip qtquickcontrols2 \ - -skip qtpurchasing \ - -skip qtremoteobjects \ - -skip qtscxml \ - -skip qtsensors \ - -skip qtserialbus \ - -skip qtserialport \ - -skip qtspeech \ - -skip qtsvg \ - -skip qttranslations \ - -skip qtwayland \ - -skip qtvirtualkeyboard \ - -skip qtwebchannel \ - -skip qtwebengine \ - -skip qtwebsockets \ - -skip qtwebview \ - -skip qtwinextras \ - -skip qtxmlpatterns \ - -skip qtx11extras - -# Build and transform stdout into . to reduce the noise -RUN cd qt/build && \ - make -j $(nproc --all) | stdbuf -o0 tr -cd '\n' | stdbuf -o0 tr '\n' '.' && \ - make install - -# -# Install Qt and Qbs for Linux and combine that with Qt for Windows from the -# previous stage +# Install Qt and Qbs for Linux # FROM ubuntu:bionic LABEL Description="Ubuntu development environment for Qbs with Qt and various dependencies for testing Qbs modules and functionality" @@ -130,7 +46,6 @@ RUN apt-get update -qq && \ git \ help2man \ icoutils \ - libclang-3.9-dev \ libdbus-1-3 \ libfreetype6 \ libfontconfig1 \ @@ -171,21 +86,6 @@ RUN ./install-qt.sh --version ${QT_VERSION} qtbase qtdeclarative qtscript qttool ENV PATH=/opt/Qt/${QT_VERSION}/gcc_64/bin:/opt/Qt/Tools/QtCreator/bin:${PATH} -# -# Install Qt installation from build stage -# -COPY --from=build-qt-mingw32_w64 /opt/Qt/${QT_VERSION}/mingw32_w64 /opt/Qt/${QT_VERSION}/mingw32_w64 - -# -# Install mingw toolchain to cross build for Windows and select -# POSIX API to make use of threading support in the stl. That -# is required by Qbs. -# -RUN apt-get install -qq -y --no-install-recommends \ - mingw-w64 && \ - printf "1\n" | update-alternatives --config x86_64-w64-mingw32-g++ - - # Configure Qbs USER $USER_NAME RUN qbs-setup-toolchains /usr/bin/g++ gcc && \ @@ -194,11 +94,7 @@ RUN qbs-setup-toolchains /usr/bin/g++ gcc && \ qbs config profiles.qt-gcc_64.baseProfile gcc && \ qbs-setup-qt /opt/Qt/${QT_VERSION}/gcc_64/bin/qmake qt-clang_64 && \ qbs config profiles.qt-clang_64.baseProfile clang && \ - qbs config defaultProfile qt-gcc_64 && \ - \ - qbs-setup-toolchains /usr/bin/x86_64-w64-mingw32-g++ mingw && \ - qbs-setup-qt /opt/Qt/${QT_VERSION}/mingw32_w64/bin/qmake qt-mingw32_w64 && \ - qbs config profiles.qt-mingw32_w64.baseProfile mingw + qbs config defaultProfile qt-gcc_64 # Switch back to root user for the entrypoint script. USER root diff --git a/docker/windowsservercore/Dockerfile b/docker/windowsservercore/Dockerfile index be3777aa0..50a1400ef 100644 --- a/docker/windowsservercore/Dockerfile +++ b/docker/windowsservercore/Dockerfile @@ -6,18 +6,21 @@ LABEL Description="Windows Server Core development environment for Qbs with Qt, RUN reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v Disabled /t REG_DWORD /d 1 /f RUN reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v DontShowUI /t REG_DWORD /d 1 /f +# Install VS from the website since chocolatey has broken .NET 4.8 (dotnetfx package) which is a +# dependency for the visualstudio2019buildtools package RUN powershell -NoProfile -ExecutionPolicy Bypass -Command \ - $Env:chocolateyVersion = '0.10.8' ; \ + Invoke-WebRequest "https://aka.ms/vs/16/release/vs_community.exe" \ + -OutFile "%TEMP%\vs_community.exe" -UseBasicParsing + +RUN "%TEMP%\vs_community.exe" --quiet --wait --norestart --noUpdateInstaller \ + --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \ + --add Microsoft.VisualStudio.Component.Windows10SDK.18362 + +RUN powershell -NoProfile -ExecutionPolicy Bypass -Command \ + $Env:chocolateyVersion = '0.10.15' ; \ $Env:chocolateyUseWindowsCompression = 'false' ; \ "[Net.ServicePointManager]::SecurityProtocol = \"tls12, tls11, tls\"; iex ((New-Object System.Net.WebClient).DownloadString('http://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" -# Wait for vs_installer.exe, vs_installerservice.exe -# or vs_installershell.exe because choco doesn't -RUN powershell -NoProfile -InputFormat None -Command \ - choco install visualcpp-build-tools --version 15.0.26228.20170424 -y; \ - Write-Host 'Waiting for Visual C++ Build Tools to finish'; \ - Wait-Process -Name vs_installer - ARG QBS_VERSION RUN choco install -y python && \ choco install -y 7zip --version 19.0 && \ @@ -39,11 +42,11 @@ RUN certutil -generateSSTFromWU roots.sst && \ ARG QT_VERSION COPY scripts/install-qt.sh install-qt.sh -RUN bash -c "./install-qt.sh -d /c/Qt --version ${QT_VERSION} --toolchain win64_msvc2017_64 qtbase qtdeclarative qttools qtscript" -ENV QTDIR64=C:\\Qt\\${QT_VERSION}\\msvc2017_64 +RUN bash -c "./install-qt.sh -d /c/Qt --version ${QT_VERSION} --toolchain win64_msvc2019_64 qtbase qtdeclarative qttools qtscript" +ENV QTDIR64=C:\\Qt\\${QT_VERSION}\\msvc2019_64 -RUN bash -c "./install-qt.sh -d /c/Qt --version ${QT_VERSION} --toolchain win32_msvc2017 qtbase qtdeclarative qttools qtscript" -ENV QTDIR=C:\\Qt\\${QT_VERSION}\\msvc2017 +RUN bash -c "./install-qt.sh -d /c/Qt --version ${QT_VERSION} --toolchain win32_msvc2019 qtbase qtdeclarative qttools qtscript" +ENV QTDIR=C:\\Qt\\${QT_VERSION}\\msvc2019 RUN qbs setup-toolchains --detect && \ qbs setup-qt %QTDIR64%/bin/qmake.exe qt64 && \ diff --git a/tests/auto/blackbox/tst_blackboxapple.cpp b/tests/auto/blackbox/tst_blackboxapple.cpp index 87bea9ae5..786dba432 100644 --- a/tests/auto/blackbox/tst_blackboxapple.cpp +++ b/tests/auto/blackbox/tst_blackboxapple.cpp @@ -855,8 +855,9 @@ void TestBlackboxApple::infoPlist() // QBS-1447: UIDeviceFamily was set to a string instead of an array const auto family = content.value(QStringLiteral("UIDeviceFamily")); if (family.isValid()) { - // int gets converted to a double when exporting plist as JSON - QVERIFY(testVariantListType(family, QMetaType::Double)); + // Prior to Qt 5.15, int gets converted to a double when exporting plist as JSON + QVERIFY(testVariantListType(family, QMetaType::LongLong) + || testVariantListType(family, QMetaType::Double)); } const auto caps = content.value(QStringLiteral("UIRequiredDeviceCapabilities")); if (caps.isValid()) |