Fix/unmix Ninja download priority

The download helper for .ps1 scripts takes in parameters in order:
1. The external URL (this is 2nd priority DL source)
2. The internal / cache URL (this is 1st priority source)
3. Download location
The URL variables were inputted to the function in wrong order. And URL
variables for x64 were named incorrectly. This change fixes that.

Pick-to: 6.8
Task-number: QTQAINFRA-6296
Change-Id: Ic4f939448a4ac39e4fd7d52e5b80132b02c38dc2
Reviewed-by: Elias Toivola <elias.toivola@qt.io>
Reviewed-by: Matti Paaso <matti.paaso@qt.io>
This commit is contained in:
Elias Toivola
2024-10-31 17:50:06 +02:00
parent 153ac6480b
commit b99f11d3c2

View File

@@ -7,7 +7,7 @@ switch ($cpu_arch) {
$version = "1.12.0"
$longPathFixed = $true # fixed https://github.com/ninja-build/ninja/pull/2225 in 1.12.0
$zip = Get-DownloadLocation "ninja-$version-win-$arch.zip"
$internalUrl = "https://ci-files01-hki.ci.qt.io/input/ninja/v$version/ninja-win$arch.zip"
$internalUrl = "https://ci-files01-hki.ci.qt.io/input/ninja/ninja-$version-win-$arch.zip"
$externalUrl = "https://github.com/ninja-build/ninja/releases/download/v$version/ninja-win$arch.zip"
$sha1 = "51bf1bac149ae1e3d1572fa9fa87d6431dbddc8b"
Break
@@ -17,9 +17,8 @@ switch ($cpu_arch) {
$version = "1.10.2"
$longPathFixed = $false
$zip = Get-DownloadLocation "ninja-$version-win-x86.zip"
# TODO: Fix this QTQAINFRA-6296
$internalUrl = "http://master.qt.io/development_releases/prebuilt/ninja/v$version/ninja-win-x86.zip"
$externalUrl = "\\ci-files01-hki.ci.qt.io\provisioning\ninja\ninja-$version-win-really-x86.zip"
$internalUrl = "https://ci-files01-hki.ci.qt.io/input/ninja/ninja-$version-win-really-x86.zip"
$externalUrl = "http://master.qt.io/development_releases/prebuilt/ninja/v$version/ninja-win-x86.zip"
$sha1 = "1a22ee9269df8ed69c4600d7ee4ccd8841bb99ca"
Break
}
@@ -28,7 +27,7 @@ switch ($cpu_arch) {
}
}
Download $internalUrl $externalUrl $zip
Download $externalUrl $internalUrl $zip
Verify-Checksum $zip $sha1
Extract-7Zip $zip C:\Utils\Ninja
Remove "$zip"