diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-15 13:15:40 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-15 13:24:54 +0200 |
commit | 5ef4ad5e90e86731542a5620dc500ec4da40c9d6 (patch) | |
tree | ee798e10633f87253b389410f2b5343582d29702 /coin/provisioning/common | |
parent | a2dc8d6c2141bce84fe9619d5ee6851e73de8a95 (diff) | |
parent | df53ff5f85f69932538cc1c571b86b0c2a885a10 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmakewip/cmake
Bringing in new SHA1s, and updated cmake-specific configurations.
Intended for Qt6 Installer essentials package creation.
Conflicts
coin/platform_configs/default.yaml
coin/platform_configs/qt5.yaml
Change-Id: I6abc2d952ae75785e34b70977e41018a72acf5bc
Diffstat (limited to 'coin/provisioning/common')
-rwxr-xr-x | coin/provisioning/common/unix/squishInstall.sh | 165 | ||||
-rw-r--r-- | coin/provisioning/common/windows/mesa_llvmpipe.ps1 | 14 | ||||
-rw-r--r-- | coin/provisioning/common/windows/nodejs.ps1 | 61 | ||||
-rw-r--r-- | coin/provisioning/common/windows/squishInstall.ps1 | 130 |
4 files changed, 155 insertions, 215 deletions
diff --git a/coin/provisioning/common/unix/squishInstall.sh b/coin/provisioning/common/unix/squishInstall.sh index 24a4d507..7592814b 100755 --- a/coin/provisioning/common/unix/squishInstall.sh +++ b/coin/provisioning/common/unix/squishInstall.sh @@ -2,7 +2,7 @@ ############################################################################# ## -## Copyright (C) 2017 The Qt Company Ltd. +## Copyright (C) 2020 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the provisioning scripts of the Qt Toolkit. @@ -33,120 +33,79 @@ ## ############################################################################# +# shellcheck source=./DownloadURL.sh +source "${BASH_SOURCE%/*}/DownloadURL.sh" + set -ex -# This script will install squish package for Linux and Mac. +# This script will fetch and extract pre-buildt squish package for Linux and Mac. # Squish is need by Release Test Automation (RTA) -version="6.5" -# Branch version without dot -qtBranch="513x" -squishFolder="/opt/squish" -squishUrl="ci-files01-hki.intra.qt.io:/hdd/www/input/squish/coin/$qtBranch/" -squishFile="squish-nosignalhandler-$version-qt$qtBranch-linux64.run" +version="6.5.2" +qtBranch="514x" +installFolder="/opt" +squishFolder="$installFolder/squish" +preBuildCacheUrl="ci-files01-hki.intra.qt.io:/hdd/www/input/squish/jenkins_build/stable" +licenseUrl="http://ci-files01-hki.intra.qt.io/input/squish/coin/.squish-3-license" if uname -a |grep -q Darwin; then - squishFile="squish-nosignalhandler-$version-qt$qtBranch-macx86_64.dmg" + compressedFolder="prebuild-squish-$version-$qtBranch-macx86_64.tar.gz" + sha1="91a1d7228dc4b4bd64f93191c33d2642abc97e14" +else + compressedFolder="prebuild-squish-$version-$qtBranch-linux64.tar.gz" + sha1="63f33de55770e2588dd9f482546900e33d20f8ec" fi -squishLicenseUrl="ci-files01-hki.intra.qt.io:/hdd/www/input/squish/coin/" -squishLicenseFile=".squish-3-license.tar.gz" - -testSuite="suite_test_squish" -testSuiteUrl="ci-files01-hki.intra.qt.io:/hdd/www/input/squish/coin/" +mountFolder="/tmp/squish" +sudo mkdir "$mountFolder" -# These checks can be removed when Vanilla OS for all linux and Mac are in -if [ -d "$squishFolder" ]; then - echo "Move old squish to /tmp" - sudo mv "$squishFolder" "/tmp/squish_$(date)" +# Check which platform +if uname -a |grep -q Darwin; then + usersGroup="staff" + squishLicenseDir="/Users/qt" +elif uname -a |grep -q "el7"; then + usersGroup="qt" + squishLicenseDir="/root" +elif uname -a |grep -q "Ubuntu"; then + usersGroup="users" + squishLicenseDir="/home/qt" +else + usersGroup="users" + squishLicenseDir="/root" fi -if [ -f "/etc/profile.d/squish_env.sh" ]; then - echo "Remove /etc/profile.d/squish_env.sh" - sudo rm -f "/etc/profile.d/squish_env.sh" - export SQUISH_LICENSEKEY_DIR=$HOME +targetFileMount="$mountFolder"/"$compressedFolder" + +echo "Mounting $preBuildCacheUrl to $mountFolder" +sudo mount "$preBuildCacheUrl" "$mountFolder" +echo "Create $installFolder if needed" +if [ ! -d "$installFolder" ]; then + sudo mkdir "$installFolder" fi -function MountAndInstall { - url=$1 - targetDirectory=$2 - targetFile=$3 - - # Check which platform - if uname -a |grep -q Darwin; then - usersGroup="staff" - mountFolder="/Volumes" - squishLicenseDir="/Users/qt" - elif uname -a |grep -q "el7"; then - usersGroup="qt" - mountFolder="/tmp" - squishLicenseDir="/root" - elif uname -a |grep -q "Ubuntu"; then - usersGroup="users" - mountFolder="/tmp" - squishLicenseDir="/home/qt" - else - usersGroup="users" - mountFolder="/tmp" - squishLicenseDir="/root" - fi +VerifyHash "$targetFileMount" "$sha1" - function UnMount { - echo "Unmounting $mountFolder" - sudo diskutil unmount force "$mountFolder" || sudo umount -f "$mountFolder" - } +echo "Uncompress $compressedFolder" +sudo tar -xzf "$targetFileMount" --directory "$installFolder" - targetFileMount="$mountFolder"/"$targetFile" +echo "Unmounting $mountFolder" +sudo diskutil unmount force "$mountFolder" || sudo umount -f "$mountFolder" - echo "Mounting $url to $mountFolder" - sudo mount "$url" "$mountFolder" - echo "Create $targetDirectory if needed" - if [ ! -d "/opt" ]; then - sudo mkdir "/opt" - fi - if [ ! -d "$targetDirectory" ]; then - sudo mkdir "$targetDirectory" - fi - echo "Uncompress $targetFile" - if [[ $targetFile == *.tar.gz ]]; then - if [[ $targetFile == .squish-3-license.* ]]; then - target="$squishLicenseDir" - # Squish license need to be exists also in users home directory, because squish check it before it starts running tests - sudo tar -xzf "$targetFileMount" --directory "$HOME" - else - target="$targetDirectory" - fi - sudo tar -xzf "$targetFileMount" --directory "$target" - UnMount - elif [[ $targetFile == *.dmg ]]; then - echo "'dmg-file', no need to uncompress" - sudo cp $targetFileMount /tmp - UnMount - sudo hdiutil attach "/tmp/$targetFile" - sudo /Volumes/froglogic\ Squish/Install\ Squish.app/Contents/MacOS/Squish unattended=1 targetdir="$targetDirectory/package" qtpath="$targetDirectory" > /dev/null - mountFolder="/Volumes/froglogic Squish" - UnMount - elif [[ $targetFile == *.run ]]; then - echo "'run-file', no need to uncompress" - sudo cp $targetFileMount $targetDirectory - UnMount - sudo chmod +x $targetDirectory/$targetFile - sudo $targetDirectory/$targetFile unattended=1 targetdir="$targetDirectory/package" qtpath="$targetDirectory" > /dev/null - sudo rm -fr "$targetDirectory/$targetFile" - if uname -a |grep -q "Ubuntu"; then - sudo mkdir /usr/lib/tcl8.6 - sudo cp "$targetDirectory/package/tcl/lib/tcl8.6/init.tcl" /usr/lib/tcl8.6/ - fi - else - exit 1 +sudo mv "$installFolder/rta_squish_$version" "$squishFolder" + +if uname -a |grep -q "Ubuntu"; then + if [ ! -e "/usr/lib/tcl8.6" ]; then + sudo mkdir /usr/lib/tcl8.6 + sudo cp "$squishFolder/package/tcl/lib/tcl8.6/init.tcl" /usr/lib/tcl8.6/ fi +fi - echo "Changing ownerships" - sudo chown -R qt:$usersGroup "$targetDirectory" - sudo chown qt:$usersGroup "$HOME/.squish-3-license" -} +DownloadURL "$licenseUrl" "$licenseUrl" "3c6b2b3ca047f68e20f697afcc3a9d376f01b376" "$HOME/.squish-3-license" -echo "Set commands for environment variables in .bashrc" +echo "Changing ownerships" +sudo chown -R qt:$usersGroup "$squishFolder" +sudo chown qt:$usersGroup "$HOME/.squish-3-license" +echo "Set commands for environment variables in .bashrc" if uname -a |grep -q "Ubuntu"; then echo "export SQUISH_PATH=$squishFolder/package" >> ~/.profile echo "export PATH=\$PATH:$squishFolder/squish-$version/bin" >> ~/.profile @@ -155,19 +114,11 @@ else echo "export PATH=\$PATH:$squishFolder/squish-$version/bin" >> ~/.bashrc fi -echo "Installing squish license to home directory.." -MountAndInstall "$squishLicenseUrl" "$squishFolder" "$squishLicenseFile" - -echo "Installing squish $version.." -MountAndInstall "$squishUrl" "$squishFolder" "$squishFile" - -echo "Installing provisioning scripts for squish" -MountAndInstall "$testSuiteUrl" "$squishFolder" "$testSuite.tar.gz" - -echo "Verifying Squish Installation" -if "$squishFolder/package/bin/squishrunner" --testsuite "$squishFolder/$testSuite" | grep "Squish test run successfully" ; then +echo "Verifying Squish" +if "$squishFolder/package/bin/squishrunner" --testsuite "$squishFolder/suite_test_squish" | grep "Squish test run successfully" ; then echo "Squish installation tested successfully" else echo "Squish test failed! Package wasn't installed correctly." exit 1 fi + diff --git a/coin/provisioning/common/windows/mesa_llvmpipe.ps1 b/coin/provisioning/common/windows/mesa_llvmpipe.ps1 index ee792896..17684575 100644 --- a/coin/provisioning/common/windows/mesa_llvmpipe.ps1 +++ b/coin/provisioning/common/windows/mesa_llvmpipe.ps1 @@ -1,6 +1,6 @@ ############################################################################# ## -## Copyright (C) 2017 The Qt Company Ltd. +## Copyright (C) 2020 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the provisioning scripts of the Qt Toolkit. @@ -34,12 +34,12 @@ $version = "11_2_2" $package = "C:\Windows\temp\opengl32sw.7z" -$mesaOpenglSha1_64 = "b2ffa5f230a0caa2c2e0bb9a5398bcfb81a0e5d1" -$mesaOpenglUrl_64_cache = "http://ci-files01-hki.intra.qt.io/input/windows/opengl32sw-64-mesa_$version.7z" -$mesaOpenglUrl_64_alt = "http://download.qt.io/development_releases/prebuilt/llvmpipe/windows/opengl32sw-64-mesa_$version.7z" -$mesaOpenglSha1_32 = "e742e9d4e16b9c69b6d844940861d3ef1748356b" -$mesaOpenglUrl_32_cache = "http://ci-files01-hki.intra.qt.io/input/windows/opengl32sw-32-mesa_$version.7z" -$mesaOpenglUrl_32_alt = "http://download.qt.io/development_releases/prebuilt/llvmpipe/windows/opengl32sw-32-mesa_$version.7z" +$mesaOpenglSha1_64 = "0ed35efbc8112282be5d0c87c37fde2d15e81998" +$mesaOpenglUrl_64_cache = "http://ci-files01-hki.intra.qt.io/input/windows/opengl32sw-64-mesa_$version-signed.7z" +$mesaOpenglUrl_64_alt = "http://download.qt.io/development_releases/prebuilt/llvmpipe/windows/opengl32sw-64-mesa_$version-signed.7z" +$mesaOpenglSha1_32 = "96bd6ca0d7fd249fb61531dca888965ffd20f53c" +$mesaOpenglUrl_32_cache = "http://ci-files01-hki.intra.qt.io/input/windows/opengl32sw-32-mesa_$version-signed.7z" +$mesaOpenglUrl_32_alt = "http://download.qt.io/development_releases/prebuilt/llvmpipe/windows/opengl32sw-32-mesa_$version-signed.7z" function Extract-Mesa { diff --git a/coin/provisioning/common/windows/nodejs.ps1 b/coin/provisioning/common/windows/nodejs.ps1 new file mode 100644 index 00000000..c56f6db6 --- /dev/null +++ b/coin/provisioning/common/windows/nodejs.ps1 @@ -0,0 +1,61 @@ +############################################################################# +## +## Copyright (C) 2020 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 Node.js +# Needed by QtWebengine + +$version = "12.18.0" +$package = "C:\Windows\temp\nodejs-$version.zip" +$targetFolder = "C:\Utils\nodejs" +$arch = "$((Get-WmiObject Win32_Processor).AddressWidth)" +$externalUrl = "https://nodejs.org/dist/v$version/node-v$version-win-x$arch.zip" +$internalUrl = "http://ci-files01-hki.intra.qt.io/input/windows/node-v$version-win-x$arch.zip" + +if ( $arch -eq 64 ) { + $sha1 = "457b1527d249ee471a9445953a906cb10c75378d" +} else { + $sha1 = "58801900f5bddca9c00feed6b84fed729426fc92" + +} + +Write-Host "Installing Node.js" +Download $externalUrl $internalUrl $package +Verify-Checksum $package $sha1 +mkdir $targetFolder +Extract-7Zip $package $targetFolder +Add-Path $targetFolder +Remove $package + +Write-Output "Node.js = $version" >> ~/versions.txt diff --git a/coin/provisioning/common/windows/squishInstall.ps1 b/coin/provisioning/common/windows/squishInstall.ps1 index f8d600d7..8396743e 100644 --- a/coin/provisioning/common/windows/squishInstall.ps1 +++ b/coin/provisioning/common/windows/squishInstall.ps1 @@ -1,6 +1,6 @@ ############################################################################# ## -## Copyright (C) 2019 The Qt Company Ltd. +## Copyright (C) 2020 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the provisioning scripts of the Qt Toolkit. @@ -33,120 +33,48 @@ . "$PSScriptRoot\helpers.ps1" -# This script will install squish package for Windows. +# This script will pre-installed squish package for Windows. # Squish is need by Release Test Automation (RTA) -# NOTE! Make sure 64bit versions are always installed before 32bit, -# because they use same folder name before a rename - -$version = "6.5" - -# Qt branch without dot (*.*) -$qtBranch = "513x" -# 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. +$version = "6.5.2" +$qtBranch = "514x" $targetDir = "C:\Utils\squish" -$squishUrl = "\\ci-files01-hki.intra.qt.io\provisioning\squish\coin" -$squishBranchUrl = "$squishUrl\$qtBranch" -$testSuite = "suite_test_squish" -$testSuiteUrl = "$squishUrl\$testSuite.7z" +$squishPackage = "C:\Utils\rta_squish" +$squishUrl = "\\ci-files01-hki.intra.qt.io\provisioning\squish\jenkins_build" +$licenseUrl = "\\ci-files01-hki.intra.qt.io\provisioning\squish\coin" # Squish license $licensePackage = ".squish-3-license" -$OSVersion = (get-itemproperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName).ProductName - -Function DownloadAndInstallSquish { - Param ( - [string]$version, - [string]$bit, - [string]$squishPackage - ) - $SquishUrl = $squishBranchUrl + "\squish-nosignalhandler-" + $version + "-qt" + $qtBranch + "-" + $bit + "-" + $squishPackage + ".exe" - $SquishInstaller = "$targetDir\$squishPackage.exe" - $SquishParameters = "unattended=1 targetdir=$targetDir\$squishPackage" +Write-Host "Installing Squish license to home directory" +Copy-Item $licenseUrl\$licensePackage ~\$licensePackage - Write-Host "Fetching from URL $squishUrl" - Copy-Item "$SquishUrl" "$SquishInstaller" - Write-Host "Installing Squish" - $stdoutFile = [System.IO.Path]::GetTempFileName() - $stderrFile = [System.IO.Path]::GetTempFileName() - Start-Process -FilePath "$SquishInstaller" -Wait -ArgumentList $SquishParameters -PassThru -RedirectStandardOutput $stdoutFile -RedirectStandardError $stderrFile | Out-Null - Remove-Item -Path $SquishInstaller - if ("$bit" -eq "win64") { - if ($squishPackage.StartsWith("mingw")) { - $squishPackage64bit = "mingw_64" - } else { - $squishPackage64bit = "$squishPackage`_64" - } - Rename-Item $targetDir\$squishPackage $targetDir\$squishPackage64bit - TestSquish $squishPackage64bit - } else { - if ($squishPackage.StartsWith("mingw")) { - Rename-Item $targetDir\$squishPackage $targetDir\mingw - TestSquish mingw - } else { - TestSquish $squishPackage - } - } +if (Is64BitWinHost) { + $arch = "x64" +} else { + $arch = "x86" } -Function DownloadSquishLicence { - Param ( - [string]$squishUrl - ) - - Write-Host "Installing Squish license to home directory" - Copy-Item $squishUrl\$licensePackage ~\$licensePackage -} - -Function TestSquish { - Param ( - [string]$squishPackage - ) - - Write-Host "Verifying Squish Installation" - if (cmd /c "$targetDir\$squishPackage\bin\squishrunner.exe --testsuite $targetDir\$testSuite" |Select-String -Pattern "Squish test run successfully") { - Write-Host "Squish installation tested successfully!" - } else { - Write-Host "Squish test failed! $squishPackage wasn't installed correctly." - [Environment]::Exit(1) - } -} - -Write-Host "Creating $targetDir" -New-Item -ErrorAction Ignore -ItemType directory -Path "$targetDir" - -Write-Host "Download and install Test Suite for squish" -Copy-Item $testSuiteUrl $targetDir/$testSuite.7z -Extract-7Zip $targetDir/$testSuite.7z $targetDir - -DownloadSquishLicence $squishUrl +$OSVersion = (get-itemproperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName).ProductName if ($OSVersion -eq "Windows 10 Enterprise") { - + $winVersion = "win10" if (Is64BitWinHost) { - DownloadAndInstallSquish $version win64 "msvc14" - DownloadAndInstallSquish $version win64 "msvc141" - DownloadAndInstallSquish $version win64 "mingw_gcc73_posix_seh" + $sha1 = "9262d3b749483094024c74986f93e9340afbdb62" } else { - DownloadAndInstallSquish $version win32 "mingw_gcc53_posix_dwarf" - } - DownloadAndInstallSquish $version win32 "msvc141" - -} elseif ($OSVersion -eq "Windows 8.1 Enterprise") { - - if (Is64BitWinHost) { - DownloadAndInstallSquish $version win64 "msvc14" + $sha1 = "0763b344afa327e6c374971492021c5e923be892" } - DownloadAndInstallSquish $version win32 "msvc141" - } elseif ($OSVersion -eq "Windows 7 Enterprise") { - - if (Is64BitWinHost) { - DownloadAndInstallSquish $version win64 "msvc14" - } else { - DownloadAndInstallSquish $version win32 "mingw_gcc53_posix_dwarf" - } - DownloadAndInstallSquish $version win32 "msvc141" + $winVersion = "win7" + $sha1 = "01b3529459da948cfde319d60becc666da0e1c4d" } +$squishArchive = "prebuild-squish-$version-$qtBranch-$winVersion-$arch.zip" + +Copy-Item "\\ci-files01-hki.intra.qt.io\provisioning\squish\jenkins_build\stable\$squishArchive" "C:\Utils" +Verify-Checksum "C:\Utils\$squishArchive" $sha1 +Extract-7Zip "C:\Utils\$squishArchive" "C:\Utils" +Rename-Item "$squishPackage" "$targetDir" + +Write-Host "Verifying Squish Installation for following targets:" +get-childitem "$targetDir" -Filter squishrunner.exe -Recurse | % { $_.FullName } +get-childitem "$targetDir" -Filter squishrunner.exe -Recurse | % { if (cmd /c $_.FullName --testsuite "$targetDir\suite_test_squish" |Select-String -Pattern "Squish test run successfully") { Write-Host "Squish tested successfully"} else { [Environment]::Exit(1) } } |