diff options
Diffstat (limited to 'coin/provisioning/common')
23 files changed, 331 insertions, 267 deletions
diff --git a/coin/provisioning/common/linux/android_linux.sh b/coin/provisioning/common/linux/android_linux.sh index c77af943..a15bcf03 100755 --- a/coin/provisioning/common/linux/android_linux.sh +++ b/coin/provisioning/common/linux/android_linux.sh @@ -51,13 +51,13 @@ basePath="http://ci-files01-hki.intra.qt.io/input/android" toolsVersion="r26.1.1" toolsFile="sdk-tools-linux-4333796.zip" -ndkVersion="r18b" +ndkVersion="r19c" ndkFile="android-ndk-$ndkVersion-linux-x86_64.zip" sdkBuildToolsVersion="28.0.3" sdkApiLevel="android-28" toolsSha1="8c7c28554a32318461802c1291d76fccfafde054" -ndkSha1="500679655da3a86aecf67007e8ab230ea9b4dd7b" +ndkSha1="fd94d0be6017c6acbd193eb95e09cf4b6f61b834" toolsTargetFile="/tmp/$toolsFile" toolsSourceFile="$basePath/$toolsFile" diff --git a/coin/provisioning/common/linux/emsdk.sh b/coin/provisioning/common/linux/emsdk.sh index 64753844..7ccfe0a5 100755 --- a/coin/provisioning/common/linux/emsdk.sh +++ b/coin/provisioning/common/linux/emsdk.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash ############################################################################# ## -## Copyright (C) 2018 The Qt Company Ltd. +## Copyright (C) 2019 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the provisioning scripts of the Qt Toolkit. @@ -39,7 +39,7 @@ source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh" # shellcheck source=../unix/DownloadURL.sh source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh" -version="1.38.1" +version="1.38.27" version_node="8.9.1" urlEmscriptenCache="http://ci-files01-hki.intra.qt.io/input/emsdk/emscripten-$version.tar.gz" urlEmscriptenExternal="https://github.com/kripken/emscripten/archive/$version.tar.gz" @@ -47,8 +47,8 @@ urlEmscriptenLlvmCache="http://ci-files01-hki.intra.qt.io/input/emsdk/emscripten urlEmscriptenLlvmExternal="https://s3.amazonaws.com/mozilla-games/emscripten/packages/llvm/tag/linux_64bit/emscripten-llvm-e$version.tar.gz" urlNodeCache="http://ci-files01-hki.intra.qt.io/input/emsdk/node-v$version_node-linux-x64.tar.xz" urlNodeExternal="https://s3.amazonaws.com/mozilla-games/emscripten/packages/node-v$version_node-linux-x64.tar.xz" -sha1Emscripten="62243b4219f6ad7f6d4bd5ae4abb27aecb87ffb3" -sha1EmscriptenLlvm="933ea5feab3aa5acc5c1e15a0deccf0e3fbeb0a7" +sha1Emscripten="ff9748a8f6b8eaa8192cce9fe2befc801443a161" +sha1EmscriptenLlvm="8f5cd026c98cd40e53e6d11fbc32b116280ef9bb" sha1Node="eaec5de2af934f7ebc7f9597983e71c5d5a9a726" targetFolder="/opt/emsdk" sudo mkdir "$targetFolder" @@ -76,3 +76,6 @@ EOM SetEnvVar "PATH" "\"$targetFolder/emscripten-llvm-e$version/:$targetFolder/node-v$version_node-linux-x64/bin:$targetFolder/emscripten-$version:\$PATH\"" SetEnvVar "EMSCRIPTEN" "$targetFolder/emscripten-$version" SetEnvVar "EM_CONFIG" "$targetFolder/.emscripten" + +echo "Emsdk = $version" >> ~/versions.txt +echo "Emsdk node = $version_node" >> ~/versions.txt diff --git a/coin/provisioning/common/macos/docker.sh b/coin/provisioning/common/macos/docker.sh deleted file mode 100755 index 5ad7dcba..00000000 --- a/coin/provisioning/common/macos/docker.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env bash - -############################################################################# -## -## Copyright (C) 2019 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL21$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see http://www.qt.io/terms-conditions. For further -## information use the contact form at http://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 or version 3 as published by the Free -## Software Foundation and appearing in the file LICENSE.LGPLv21 and -## LICENSE.LGPLv3 included in the packaging of this file. Please review the -## following information to ensure the GNU Lesser General Public License -## requirements will be met: https://www.gnu.org/licenses/lgpl.html and -## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## As a special exception, The Qt Company gives you certain additional -## rights. These rights are described in The Qt Company LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## $QT_END_LICENSE$ -## -############################################################################# - -set -ex - -# Download and install the Docker Toolbox for macOS (Docker Compose and Docker Machine). -url="https://download.docker.com/mac/stable/DockerToolbox.pkg" -target_file="DockerToolbox.pkg" - -if [ -x "$(command -v sha1sum)" ] -then - # This part shall be used in CI environment only. The DownloadURL script needs sha1sum - # which is not included in the default macOS system. In addition, the cached pkg can't - # be downloaded out of the Qt internal network. - case ${BASH_SOURCE[0]} in - */macos/*) UNIX_PATH="${BASH_SOURCE[0]%/macos/*}/unix" ;; - */*) UNIX_PATH="${BASH_SOURCE[0]%/*}/../unix" ;; - *) UNIX_PATH="../unix" ;; - esac - - source "$UNIX_PATH/DownloadURL.sh" - url_cached="http://ci-files01-hki.intra.qt.io/input/windows/DockerToolbox.pkg" - sha1="7196d2d30648d486978d29adb5837ff7876517c1" - DownloadURL $url_cached $url $sha1 $target_file -else - curl $url -o $target_file -fi -sudo installer -pkg $target_file -target / -docker --version -docker-compose --version - -# Start testserver provisioning -case ${BASH_SOURCE[0]} in - */macos/*) SERVER_PATH="${BASH_SOURCE[0]%/macos/*}/shared/testserver" ;; - */*) SERVER_PATH="${BASH_SOURCE[0]%/*}/../shared/testserver" ;; - *) SERVER_PATH="../shared/testserver" ;; -esac - -# Nested virtualization - Print CPU features to verify that CI has enabled VT-X/AMD-v support -case $(sysctl machdep.cpu.features) in - *VMX*) "$SERVER_PATH/docker_testserver.sh" VMX ;; - *) echo "VMX not found error! Please make sure Coin has enabled VT-X/AMD-v." >&2; exit 1 ;; -esac diff --git a/coin/provisioning/common/macos/install_openssl.sh b/coin/provisioning/common/macos/install_openssl.sh index 15f02ffd..3b1978e2 100755 --- a/coin/provisioning/common/macos/install_openssl.sh +++ b/coin/provisioning/common/macos/install_openssl.sh @@ -73,8 +73,8 @@ SetEnvVar "OPENSSL_DIR" "\"$openssl_install_dir\"" SetEnvVar "OPENSSL_INCLUDE" "\"$openssl_install_dir/include\"" SetEnvVar "OPENSSL_LIB" "\"$openssl_install_dir/lib\"" -security find-certificate -a -p /Library/Keychains/System.keychain | sudo tee -a $opensslTargetLocation/ssl/cert.pem -security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain | sudo tee -a $opensslTargetLocation/ssl/cert.pem +security find-certificate -a -p /Library/Keychains/System.keychain | sudo tee -a $opensslTargetLocation/ssl/cert.pem > /dev/null +security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain | sudo tee -a $opensslTargetLocation/ssl/cert.pem > /dev/null sudo rm -rf /tmp/openssl-$opensslVersion diff --git a/coin/provisioning/common/macos/python2.sh b/coin/provisioning/common/macos/python2.sh index f4016f8d..4ab914de 100755 --- a/coin/provisioning/common/macos/python2.sh +++ b/coin/provisioning/common/macos/python2.sh @@ -42,9 +42,9 @@ source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh" # shellcheck source=./pip.sh source "${BASH_SOURCE%/*}/pip.sh" -PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mac/python-2.7.14-macosx10.6.pkg" -AltUrl="https://www.python.org/ftp/python/2.7.14/python-2.7.14-macosx10.6.pkg" -SHA1="fa2bb77243ad0cb611aa3295204fab403bb0fa09" +PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/mac/python-2.7.16-macosx10.6.pkg" +AltUrl="https://www.python.org/ftp/python/2.7.16/python-2.7.16-macosx10.6.pkg" +SHA1="895a8327a58e7c0e58852638ab3d84843643535b" DestDir="/" InstallPKGFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$DestDir" @@ -55,5 +55,5 @@ InstallPip python2.7 SetEnvVar "PATH" "/Library/Frameworks/Python.framework/Versions/2.7/bin/:\$PATH" -echo "python2 = 2.7.14" >> ~/versions.txt +echo "python2 = 2.7.16" >> ~/versions.txt diff --git a/coin/provisioning/common/windows/msvc_2015_update3_patch.ps1 b/coin/provisioning/common/shared/testserver/docker_images.sh index bfbb397a..e98183d8 100644..100755 --- a/coin/provisioning/common/windows/msvc_2015_update3_patch.ps1 +++ b/coin/provisioning/common/shared/testserver/docker_images.sh @@ -1,6 +1,8 @@ +#!/usr/bin/env bash + ############################################################################# ## -## Copyright (C) 2017 The Qt Company Ltd. +## Copyright (C) 2019 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the provisioning scripts of the Qt Toolkit. @@ -30,38 +32,37 @@ ## $QT_END_LICENSE$ ## ############################################################################# -. "$PSScriptRoot\helpers.ps1" -# Install Cumulative Servicing Release Visual Studio 2015 update 3 -# Original download page: https://msdn.microsoft.com/en-us/library/mt752379.aspx +set -ex + +[ -x "$(command -v realpath)" ] && FILE=$(realpath ${BASH_SOURCE[0]}) || FILE=${BASH_SOURCE[0]} +case $FILE in + */*) SERVER_PATH="${FILE%/*}" ;; + *) SERVER_PATH="." ;; +esac -$version = "2015 update3 (KB3165756)" -$packagePath = "C:\Windows\Temp" -$package = $packagePath + "\vs14-kb3165756.exe" -$url_cache = "http://ci-files01-hki.intra.qt.io/input/windows/vs14-kb3165756.exe" -$url_official = "http://go.microsoft.com/fwlink/?LinkID=816878" -$sha1 = "6a21d9b291ca75d44baad95e278fdc0d05d84c02" -$preparedPackage = "\\ci-files01-hki.intra.qt.io\provisioning\windows\vs14-kb3165756-update" +# Sort files by their SHA-1, and then return the accumulated result +sha1tree () { + # For example, macOS doesn't install sha1sum by default. In such case, it uses shasum instead. + [ -x "$(command -v sha1sum)" ] || SHASUM=shasum -if (Test-Path $preparedPackage) { - # The prepared package contains updated packages so that not everything has to be downloaded - Write-Host "Using prepared package" - Copy-Item -Recurse $preparedPackage $packagePath - # Remove the whole downloaded folder - $toRemove = $packagePath + "\vs14-kb3165756-update" - $executable = "$toRemove\vs14-kb3165756.exe" -} else { - Write-Host "Fetching patch for Visual Studio $version..." - Download $url_official $url_cache $package - $executable = $package - # Remove the downloaded executable - $toRemove = $executable + find "$@" -type f -print0 | \ + xargs -0 ${SHASUM-sha1sum} | cut -d ' ' -f 1 | \ + sort | ${SHASUM-sha1sum} | cut -d ' ' -f 1 } -Verify-Checksum $executable $sha1 -Write-Host "Installing patch for Visual Studio $version..." -Run-Executable $executable "/norestart /passive" +# Using SHA-1 of each server context as the tag of docker images. A tag labels a +# specific image version. It is used by docker compose file (docker-compose.yml) +# to launch the corresponding docker containers. If one of the server contexts +# (./apache2, ./danted, ...) gets changes, all the related compose files in +# qtbase should be updated as well. + +source "$SERVER_PATH/settings.sh" -Remove-Item -Force -Recurse -Path $toRemove +for server in $testserver +do + context="$SERVER_PATH/$server" + docker build -t qt-test-server-$server:$(sha1tree $context) $context +done -Write-Output "Visual Studio = $version" >> ~\versions.txt +docker images diff --git a/coin/provisioning/common/shared/testserver/docker_testserver.sh b/coin/provisioning/common/shared/testserver/docker_testserver.sh index 83baa488..3a7c87e8 100755 --- a/coin/provisioning/common/shared/testserver/docker_testserver.sh +++ b/coin/provisioning/common/shared/testserver/docker_testserver.sh @@ -53,28 +53,5 @@ esac # Display system-wide information of docker-engine docker info -# Sort files by their SHA-1, and then return the accumulated result -sha1tree () { - # For example, macOS doesn't install sha1sum by default. In such case, it uses shasum instead. - [ -x "$(command -v sha1sum)" ] || SHASUM=shasum - - find "$@" -type f -print0 | \ - xargs -0 ${SHASUM-sha1sum} | cut -d ' ' -f 1 | \ - sort | ${SHASUM-sha1sum} | cut -d ' ' -f 1 -} - -# Using SHA-1 of each server context as the tag of docker images. A tag labels a -# specific image version. It is used by docker compose file (docker-compose.yml) -# to launch the corresponding docker containers. If one of the server contexts -# (./apache2, ./danted, ...) gets changes, all the related compose files in -# qtbase should be updated as well. - -source "$SERVER_PATH/settings.sh" - -for server in $testserver -do - context="$SERVER_PATH/$server" - docker build -t qt-test-server-$server:$(sha1tree $context) $context -done - -docker images +# Create images +$SERVER_PATH/docker_images.sh diff --git a/coin/provisioning/common/unix/install-breakpad.sh b/coin/provisioning/common/unix/install-breakpad.sh index 669469be..b05b3510 100755 --- a/coin/provisioning/common/unix/install-breakpad.sh +++ b/coin/provisioning/common/unix/install-breakpad.sh @@ -75,7 +75,7 @@ breakpadHome="$HOME/breakpad" ) -SetEnvVar "BREAKPAD_SOURCE_DIR" "$breakpadHome/src" +SetEnvVar "BREAKPAD_SOURCE_DIR" "$breakpadHome" echo "breakpad = $breakpad_commit_sha" >> ~/versions.txt echo "linux_syscall_support = $linux_syscall_support_commit_sha1" >> ~/versions.txt diff --git a/coin/provisioning/common/unix/install_protobuff.sh b/coin/provisioning/common/unix/install_protobuff.sh new file mode 100755 index 00000000..59e9b699 --- /dev/null +++ b/coin/provisioning/common/unix/install_protobuff.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the provisioning scripts of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL21$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 or version 3 as published by the Free +## Software Foundation and appearing in the file LICENSE.LGPLv21 and +## LICENSE.LGPLv3 included in the packaging of this file. Please review the +## following information to ensure the GNU Lesser General Public License +## requirements will be met: https://www.gnu.org/licenses/lgpl.html and +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## As a special exception, The Qt Company gives you certain additional +## rights. These rights are described in The Qt Company LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## $QT_END_LICENSE$ +## +############################################################################# + +# shellcheck source=./DownloadURL.sh +source "${BASH_SOURCE%/*}/DownloadURL.sh" +# shellcheck source=./SetEnvVar.sh +source "${BASH_SOURCE%/*}/SetEnvVar.sh" + +# This script will install Google's Protocal Buffers which is needed by Automotive Suite + +version="3.6.1" +sha1="44b8ba225f3b4dc45fb56d5881ec6a91329802b6" +internalUrl="http://ci-files01-hki.intra.qt.io/input/automotive_suite/protobuf-all-$version.zip" +externalUrl="https://github.com/protocolbuffers/protobuf/releases/download/v$version/protobuf-all-$version.zip" + +targetDir="$HOME/protobuf-$version" +targetFile="$targetDir.zip" +DownloadURL "$internalUrl" "$externalUrl" "$sha1" "$targetFile" +unzip "$targetFile" -d "$HOME" +sudo rm "$targetFile" + +# devtoolset is needed when running configuration +if uname -a |grep -qv "Darwin"; then + export PATH="/opt/rh/devtoolset-4/root/usr/bin:$PATH" +fi + +echo "Configuring and building protobuf" +cd "$targetDir" +if uname -a |grep -q Darwin; then + ./configure --prefix "$(xcrun --sdk macosx --show-sdk-path)/usr/local" + SetEnvVar PATH "\$PATH:$(xcrun --sdk macosx --show-sdk-path)/usr/local/bin" +else + ./configure +fi +make +sudo make install + +# Refresh shared library cache if OS isn't macOS +if uname -a |grep -qv "Darwin"; then + sudo ldconfig +fi + +sudo rm -r "$targetDir" diff --git a/coin/provisioning/common/unix/squishInstall.sh b/coin/provisioning/common/unix/squishInstall.sh index 4a7a6837..b40c1922 100755 --- a/coin/provisioning/common/unix/squishInstall.sh +++ b/coin/provisioning/common/unix/squishInstall.sh @@ -38,9 +38,9 @@ set -ex # This script will install squish package for Linux and Mac. # Squish is need by Release Test Automation (RTA) -version="6.3.2" +version="6.4.3" # Branch version without dot -qtBranch="510x" +qtBranch="512x" squishFolder="/opt/squish" squishUrl="ci-files01-hki.intra.qt.io:/hdd/www/input/squish/coin/$qtBranch/" squishFile="squish-$version-qt$qtBranch-linux64.run" diff --git a/coin/provisioning/common/windows/android-openssl.ps1 b/coin/provisioning/common/windows/android-openssl.ps1 index db53bcc9..cf144c90 100644 --- a/coin/provisioning/common/windows/android-openssl.ps1 +++ b/coin/provisioning/common/windows/android-openssl.ps1 @@ -53,10 +53,6 @@ Rename-Item C:\Utils\openssl-$version $destination Remove-Item -Path $zip Remove-Item C:\Utils\openssl-$version.tar -# Set-EnvironmentVariable "CC" "C:\utils\Android\android-ndk-r18b\toolchains\llvm\prebuilt\windows\bin\clang" -# Set-EnvironmentVariable "ANDROID_AR" "C:\utils\Android\android-ndk-r18b\toolchains\llvm\prebuilt\windows\bin\llvm-ar" -# Set-EnvironmentVariable "ANDROID_DEV" "C:\utils\Android\android-ndk-r18b\platforms\android-21\arch-arm\usr" - # Make sure configure for openssl has a "make" and "perl" available $env:PATH = $env:PATH + ";C:\msys\1.0\bin;C:\strawberry\perl\bin" diff --git a/coin/provisioning/common/windows/android.ps1 b/coin/provisioning/common/windows/android.ps1 index 1b4dd35d..def09116 100644 --- a/coin/provisioning/common/windows/android.ps1 +++ b/coin/provisioning/common/windows/android.ps1 @@ -40,10 +40,10 @@ # That's why we need to use Andoid-21 API version in Qt 5.9. # NDK -$ndkVersion = "r18b" -$ndkCachedUrl = "\\ci-files01-hki.intra.qt.io\provisioning\android\android-ndk-$ndkVersion-windows-x86.zip" -$ndkOfficialUrl = "https://dl.google.com/android/repository/android-ndk-$ndkVersion-windows-x86.zip" -$ndkChecksum = "4b8b6a4edc0fa967b429c1d6d25adf69acc28803" +$ndkVersion = "r19c" +$ndkCachedUrl = "\\ci-files01-hki.intra.qt.io\provisioning\android\android-ndk-$ndkVersion-windows-x86_64.zip" +$ndkOfficialUrl = "https://dl.google.com/android/repository/android-ndk-$ndkVersion-windows-x86_64.zip" +$ndkChecksum = "c4cd8c0b6e7618ca0a871a5f24102e40c239f6a3" $ndkFolder = "c:\Utils\Android\android-ndk-$ndkVersion" $ndkZip = "c:\Windows\Temp\android_ndk_$ndkVersion.zip" @@ -98,7 +98,7 @@ Out-File -FilePath C:\Utils\Android\licenses\android-sdk-license -Encoding utf8 cd $toolsFolder\bin\ $sdkmanager_args += "platforms;$sdkApiLevel", "platform-tools", "build-tools;$sdkBuildToolsVersion" $command = 'for($i=0;$i -lt 6;$i++) { $response += "y`n"}; $response | .\sdkmanager.bat @sdkmanager_args' -iex $command +Invoke-Expression $command $command = 'for($i=0;$i -lt 6;$i++) { $response += "y`n"}; $response | .\sdkmanager.bat --licenses' iex $command cmd /c "dir C:\Utils\android" diff --git a/coin/provisioning/common/windows/disable-defragment.ps1 b/coin/provisioning/common/windows/disable-defragment.ps1 index 876938f8..e76f0649 100644 --- a/coin/provisioning/common/windows/disable-defragment.ps1 +++ b/coin/provisioning/common/windows/disable-defragment.ps1 @@ -1,6 +1,6 @@ ############################################################################# ## -## Copyright (C) 2018 The Qt Company Ltd. +## Copyright (C) 2019 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the provisioning scripts of the Qt Toolkit. @@ -31,4 +31,42 @@ ## ############################################################################# -schtasks /Delete /TN "\Microsoft\Windows\Defrag\ScheduledDefrag" /F +# Windows 7 does not have Get-ScheduledTask and Unregister-ScheduledTask +# thus needing its own version. +Write-Host "Disabling defragmentation" +$version = Get-CimInstance Win32_OperatingSystem | Select-Object -ExpandProperty Caption +if ($version -like '*Windows 7*'){ + $pi = New-Object System.Diagnostics.ProcessStartInfo + $pi.FileName = "C:\Windows\System32\schtasks.exe" + $pi.RedirectStandardError = $true + $pi.UseShellExecute = $false + $pi.Arguments = "/Delete /TN `"\Microsoft\Windows\Defrag\ScheduledDefrag`" /F" + $prog = New-Object System.Diagnostics.Process + $prog.StartInfo = $pi + $prog.Start() | Out-Null + $err = $prog.StandardError.ReadToEnd() + $prog.WaitForExit() + if ($prog.ExitCode -eq 0){ + Write-Host "Scheduled defragmentation removed" + } else { + if ($err -like '*cannot find the file*'){ + Write-Host "No scheduled defragmentation task found" + exit 0 + } else { + Write-Host "Error while deleting scheduled defragmentation task: $err" + } + } +} +else { + try { + $state = (Get-ScheduledTask -ErrorAction Stop -TaskName "ScheduledDefrag").State + Write-Host "Scheduled defragmentation task found in state: $state" + } + catch { + Write-Host "No scheduled defragmentation task found" + exit 0 + } + Write-Host "Unregistering scheduled defragmentation task" + Unregister-ScheduledTask -ErrorAction Stop -Confirm:$false -TaskName ScheduledDefrag + Write-Host "Scheduled Defragmentation task was cancelled" +} diff --git a/coin/provisioning/common/windows/docker.ps1 b/coin/provisioning/common/windows/docker.ps1 deleted file mode 100644 index 6f53eccd..00000000 --- a/coin/provisioning/common/windows/docker.ps1 +++ /dev/null @@ -1,85 +0,0 @@ -############################################################################# -## -## Copyright (C) 2019 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL21$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see http://www.qt.io/terms-conditions. For further -## information use the contact form at http://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 or version 3 as published by the Free -## Software Foundation and appearing in the file LICENSE.LGPLv21 and -## LICENSE.LGPLv3 included in the packaging of this file. Please review the -## following information to ensure the GNU Lesser General Public License -## requirements will be met: https://www.gnu.org/licenses/lgpl.html and -## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## As a special exception, The Qt Company gives you certain additional -## rights. These rights are described in The Qt Company LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## $QT_END_LICENSE$ -## -############################################################################# - -. "$PSScriptRoot\helpers.ps1" - -# This script installs Docker tool kits and Apple Bonjour on Windows. - -function DownloadAndInstall -{ - Param ( - [string]$externalUrl, - [string]$internalUrl, - [string]$package, - [string]$sha1, - [string]$parameters - ) - - Write-Host "Fetching $package from URL..." - Download $externalUrl $internalUrl $package - Verify-Checksum $package $sha1 - - Write-Host "Installing $package..." - Run-Executable $package $parameters - - Write-Host "Remove $package..." - Remove-Item -Path $package -} - -# Install Docker Toolbox -$package = Get-DownloadLocation "DockerToolbox.exe" -$externalUrl = "https://download.docker.com/win/stable/DockerToolbox.exe" -$internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/DockerToolbox.exe" -$sha1 = "62325c426ff321d9ebfb89664d65cf9ffaef2985" -DownloadAndInstall $externalUrl $internalUrl $package $sha1 "/SP- /SILENT" -Add-Path 'C:\Program Files\Docker Toolbox' -docker --version -docker-compose --version - -# Install Apple Bonjour -$package = Get-DownloadLocation "BonjourPSSetup.exe" -$externalUrl = "http://support.apple.com/downloads/DL999/en_US/BonjourPSSetup.exe" -$internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/BonjourPSSetup.exe" -$sha1 = "847f39e0ea80d2a4d902fe59657e18f5bc32a8cb" -DownloadAndInstall $externalUrl $internalUrl $package $sha1 "/qr" - -# Nested virtualization - Print CPU features to verify that CI has enabled VT-X/AMD-v support -$testserver = "$PSScriptRoot\..\shared\testserver\docker_testserver.sh" -$sysInfoStr = systeminfo -if ($sysInfoStr -like "*A hypervisor has been detected*") { - & 'C:\Program Files\Git\bin\bash.exe' --login $testserver Hyper-V -} elseif ($sysInfoStr -like "*Virtualization Enabled In Firmware: Yes*") { - & 'C:\Program Files\Git\bin\bash.exe' --login $testserver VMX -} else { - Write-Error "VMX not found error! Please make sure Coin has enabled VT-X/AMD-v." -} diff --git a/coin/provisioning/common/windows/dxsdk.ps1 b/coin/provisioning/common/windows/dxsdk.ps1 index ce2bbeb3..f796ae1d 100644 --- a/coin/provisioning/common/windows/dxsdk.ps1 +++ b/coin/provisioning/common/windows/dxsdk.ps1 @@ -4,16 +4,16 @@ $package = "DXSDK_Jun10.exe" -$cacheUrl = "\\ci-files01-hki.intra.qt.io\provisioning\windows\$package" +$cachedUrl = "\\ci-files01-hki.intra.qt.io\provisioning\windows\$package" $officialUrl = "https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/$package" -$sdkChecksum = "8fe98c00fde0f524760bb9021f438bd7d9304a69" -$exe = "C:\Windows\Temp\$package" - -Download $officialUrl $cachedUrl $exe +$sdkChecksumSha1 = "8fe98c00fde0f524760bb9021f438bd7d9304a69" +$package_path = "C:\Windows\Temp\$package" +Download $officialUrl $cachedUrl $package_path +Verify-Checksum $package_path $sdkChecksumSha1 sha1 Write-Host "Installing DirectX SDK" -Run-Executable $exe "/u" +Run-Executable $package_path "/u" -Remove-Item -Path $exe +Remove-Item -Path $package_path Write-Output "DirectX SDK = 9.29.1962 (Jun 10)" >> ~\versions.txt diff --git a/coin/provisioning/common/windows/helpers.ps1 b/coin/provisioning/common/windows/helpers.ps1 index 9cd8567e..5a7eb674 100644 --- a/coin/provisioning/common/windows/helpers.ps1 +++ b/coin/provisioning/common/windows/helpers.ps1 @@ -191,3 +191,22 @@ function Retry{ Throw("Failed to run command successfully in $retry_count tries") } } + +function Remove { + + Param ( + [string]$Path = $(BadParam("a path")) + ) + Write-Host "Removing $Path" + $i = 0 + While ( Test-Path($Path) ){ + Try{ + remove-item -Force -Recurse -Path $Path -ErrorAction Stop + }catch{ + $i +=1 + if ($i -eq 5) {exit 1} + Write-Verbose "$Path locked, trying again in 5" + Start-Sleep -seconds 5 + } + } +} diff --git a/coin/provisioning/common/windows/install-breakpad.ps1 b/coin/provisioning/common/windows/install-breakpad.ps1 index 4a9544cc..7db6d8ac 100644 --- a/coin/provisioning/common/windows/install-breakpad.ps1 +++ b/coin/provisioning/common/windows/install-breakpad.ps1 @@ -87,7 +87,7 @@ catch { git checkout $linux_syscall_support_commit_sha1 } -Set-EnvironmentVariable "BREAKPAD_SOURCE_DIR" "$installFolder\breakpad\src" +Set-EnvironmentVariable "BREAKPAD_SOURCE_DIR" "$installFolder\breakpad" # Write HEAD commit sha to versions txt, so build can be repeated at later date Write-Output "breakpad = $breakpad_commit_sha" >> ~/versions.txt diff --git a/coin/provisioning/common/windows/install-gnuwin32.ps1 b/coin/provisioning/common/windows/install-gnuwin32.ps1 new file mode 100644 index 00000000..99862b3c --- /dev/null +++ b/coin/provisioning/common/windows/install-gnuwin32.ps1 @@ -0,0 +1,46 @@ +############################################################################ +## +## Copyright (C) 2019 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the provisioning scripts of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL21$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 or version 3 as published by the Free +## Software Foundation and appearing in the file LICENSE.LGPLv21 and +## LICENSE.LGPLv3 included in the packaging of this file. Please review the +## following information to ensure the GNU Lesser General Public License +## requirements will be met: https://www.gnu.org/licenses/lgpl.html and +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## As a special exception, The Qt Company gives you certain additional +## rights. These rights are described in The Qt Company LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## $QT_END_LICENSE$ +## +############################################################################ +. "$PSScriptRoot\helpers.ps1" + +# This script will install gnuwin32 + +$prog = "gnuwin32" +$zipPackage = "$prog.zip" +$temp = "$env:tmp" +$internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/$prog/$zipPackage" +$externalUrl = "http://download.qt.io/development_releases/$prog/$zipPackage" +Download $externalUrl $internalUrl "$temp\$zipPackage" +Verify-Checksum "$temp\$zipPackage" "d7a34a385ccde2374b8a2ca3369e5b8a1452c5a5" +Extract-7Zip "$temp\$zipPackage" C:\Utils + +Write-Output "$prog qt5 commit sha = 98c4f1bbebfb3cc6d8e031d36fd1da3c19e634fb" >> ~\versions.txt diff --git a/coin/provisioning/common/windows/install-mingw.ps1 b/coin/provisioning/common/windows/install-mingw.ps1 index 8b7fe41d..bc05ba91 100644 --- a/coin/provisioning/common/windows/install-mingw.ps1 +++ b/coin/provisioning/common/windows/install-mingw.ps1 @@ -37,7 +37,8 @@ function InstallMinGW { Param ( [string] $release = $(BadParam("release file name")), - [string] $sha1 = $(BadParam("SHA1 checksum of the file")) + [string] $sha1 = $(BadParam("SHA1 checksum of the file")), + [string] $suffix = "" ) $arch, $version, $null, $threading, $ex_handling, $build_ver, $revision = $release.split('-') @@ -45,7 +46,7 @@ function InstallMinGW if ($arch -eq "i686") { $win_arch = "Win32" } elseif ($arch -eq "x86_64") { $win_arch = "Win64" } - $envvar = "MINGW$version" + $envvar = "MINGW$version$suffix" $envvar = $envvar -replace '["."]' $targetdir = "C:\$envvar" $url_cache = "\\ci-files01-hki.intra.qt.io\provisioning\windows\" + $release + ".7z" diff --git a/coin/provisioning/common/windows/install-protobuf.ps1 b/coin/provisioning/common/windows/install-protobuf.ps1 new file mode 100644 index 00000000..fd3fb3d3 --- /dev/null +++ b/coin/provisioning/common/windows/install-protobuf.ps1 @@ -0,0 +1,64 @@ +############################################################################# +## +## Copyright (C) 2019 The Qt Company Ltd. +## Contact: http://www.qt.io/licensing/ +## +## This file is part of the provisioning scripts of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL21$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see http://www.qt.io/terms-conditions. For further +## information use the contact form at http://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 or version 3 as published by the Free +## Software Foundation and appearing in the file LICENSE.LGPLv21 and +## LICENSE.LGPLv3 included in the packaging of this file. Please review the +## following information to ensure the GNU Lesser General Public License +## requirements will be met: https://www.gnu.org/licenses/lgpl.html and +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## As a special exception, The Qt Company gives you certain additional +## rights. These rights are described in The Qt Company LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## $QT_END_LICENSE$ +## +############################################################################# +. "$PSScriptRoot\helpers.ps1" + +# This script will install Google's Protocol Buffers +# Script requires Cmake to be installed and strawberry-perl not to be installed + +$version = "3.6.1" +$sha1 = "44b8ba225f3b4dc45fb56d5881ec6a91329802b6" +$officialUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v$version/protobuf-all-$version.zip" +$cachedUrl = "http://ci-files01-hki.ci.local/input/automotive_suite/protobuf-all-$version.zip" +$zip = "C:\Utils\protobuf-all-$version.zip" +$installationFolder = "C:\Utils\protobuf" + +Write-Host "Installing Protocol Buffers" +Add-Path "C:\CMake\bin" +Download "$officialUrl" "$cachedUrl" "$zip" +Verify-Checksum "$zip" "$sha1" +Extract-7Zip "$zip" C:\Utils +New-Item -ItemType directory -Force -Path "C:\Utils\protobuf-$version\cmake\build" +New-Item -ItemType directory -Force -Path "C:\Utils\protobuf-$version\cmake\build\release" +New-Item -ItemType directory -Force -Path "$installationFolder" +cd "C:\Utils\protobuf-$version\cmake\build\release" +cmd /c "`"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Auxiliary\\Build\\vcvars64.bat`" && cmake -G `"NMake Makefiles`" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$installationFolder ../.. && nmake && nmake install" +if(![System.IO.File]::Exists("$installationFolder\bin\protoc.exe")){ + Write-Host "Can't find $installationFolder\bin\protoc.exe. Installation probably failed!" + exit 1 +} + +Remove-Item "$zip" + +Add-Path "$installationFolder\bin" +Set-EnvironmentVariable PROTOBUF_INCLUDE "$installationFolder\include" +Set-EnvironmentVariable PROTOBUF_LIB "$installationFolder\lib" diff --git a/coin/provisioning/common/windows/mysql.ps1 b/coin/provisioning/common/windows/mysql.ps1 index 29ce0ab4..8ed91402 100644 --- a/coin/provisioning/common/windows/mysql.ps1 +++ b/coin/provisioning/common/windows/mysql.ps1 @@ -1,6 +1,6 @@ ############################################################################# ## -## Copyright (C) 2017 The Qt Company Ltd. +## Copyright (C) 2019 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the provisioning scripts of the Qt Toolkit. @@ -36,7 +36,7 @@ # This script installs MySQL $version. # Both x86 and x64 versions needed when x86 integrations are done on x64 machine -$version = "5.6.11" +$version = "5.7.25" $baseNameX64 = "mysql-$version-winx64" $packagex64 = "C:\Windows\temp\$baseNameX64.zip" $baseNameX86 = "mysql-$version-win32" diff --git a/coin/provisioning/common/windows/squishInstall.ps1 b/coin/provisioning/common/windows/squishInstall.ps1 index 5fb032f5..de04d242 100644 --- a/coin/provisioning/common/windows/squishInstall.ps1 +++ b/coin/provisioning/common/windows/squishInstall.ps1 @@ -38,18 +38,18 @@ # NOTE! Make sure 64bit versions are always installed before 32bit, # because they use same folder name before a rename -$version = "6.3.2" +$version = "6.4.3" # Qt branch without dot (*.*) -$qtBranch = "510x" -# So far Squish built with Qt5.10 works also with 5.11, but we have to be prepared that on some point +$qtBranch = "512x" +# So far Squish built with Qt5.12 works also with 5.13, but we have to be prepared that on some point # the compatibility breaks, and we may need to have separate Squish packages for different Qt versions. $targetDir = "C:\Utils\squish" $squishUrl = "\\ci-files01-hki.intra.qt.io\provisioning\squish\coin" $squishBranchUrl = "$squishUrl\$qtBranch" $testSuite = "suite_test_squish" -$testSuiteUrl = "\\ci-files01-hki.intra.qt.io\provisioning\squish\coin\$testSuite.7z" +$testSuiteUrl = "$squishUrl\$testSuite.7z" # Squish license $licensePackage = ".squish-3-license" @@ -62,7 +62,10 @@ Function DownloadAndInstallSquish { [string]$bit, [string]$squishPackage ) - + # MinGW x86 available only with Qt5.11, to be updated when Squish is supporting 5.13 + if ("$bit" -eq "win32" -and $squishPackage.StartsWith("mingw")) { + $qtBranch = "511x" + } $SquishUrl = $squishBranchUrl + "\squish-" + $version + "-qt" + $qtBranch + "-" + $bit + "-" + $squishPackage + ".exe" $SquishInstaller = "$targetDir\$squishPackage.exe" $SquishParameters = "unattended=1 targetdir=$targetDir\$squishPackage" @@ -125,25 +128,27 @@ DownloadSquishLicence $squishUrl if ($OSVersion -eq "Windows 10 Enterprise") { if (Is64BitWinHost) { - DownloadAndInstallSquish $version win64 msvc14 + DownloadAndInstallSquish $version win64 "msvc14" + DownloadAndInstallSquish $version win64 "msvc141" + DownloadAndInstallSquish $version win64 "mingw_gcc73_posix_seh" + } else { + DownloadAndInstallSquish $version win32 "mingw_gcc53_posix_dwarf" } - DownloadAndInstallSquish $version win32 "mingw_gcc53_posix_dwarf" - DownloadAndInstallSquish $version win32 "msvc14" + DownloadAndInstallSquish $version win32 "msvc141" } elseif ($OSVersion -eq "Windows 8.1 Enterprise") { if (Is64BitWinHost) { - DownloadAndInstallSquish $version win64 "msvc12" DownloadAndInstallSquish $version win64 "msvc14" } - DownloadAndInstallSquish $version win32 "msvc14" + DownloadAndInstallSquish $version win32 "msvc141" } elseif ($OSVersion -eq "Windows 7 Enterprise") { if (Is64BitWinHost) { - DownloadAndInstallSquish $version win64 "msvc12" DownloadAndInstallSquish $version win64 "msvc14" + } else { + DownloadAndInstallSquish $version win32 "mingw_gcc53_posix_dwarf" } - DownloadAndInstallSquish $version win32 "mingw_gcc53_posix_dwarf" - DownloadAndInstallSquish $version win32 "msvc14" + DownloadAndInstallSquish $version win32 "msvc141" } diff --git a/coin/provisioning/common/windows/vc_redist.ps1 b/coin/provisioning/common/windows/vc_redist.ps1 index f68846f0..1cd81a37 100644 --- a/coin/provisioning/common/windows/vc_redist.ps1 +++ b/coin/provisioning/common/windows/vc_redist.ps1 @@ -57,5 +57,4 @@ Download $externalUrl $internalUrl $package Verify-Checksum $package $sha1 Write-Host "Installing $package..." Run-Executable $package "/q" -Write-Host "Remove $package..." -Remove-Item -Force -Path $package +Remove $package |