Provisioning: Use cached emsdk version 3.1.25 for Windows

Task-number: QTQAINFRA-5458
Pick-to: 6.5
Change-Id: I6567f36e545b5100325dfa8e1895a24a41a4783c
Reviewed-by: Ville-Pekka Karhu <ville-pekka.karhu@qt.io>
This commit is contained in:
Heikki Halmet
2023-04-05 11:53:29 +00:00
parent 6fd8a319b1
commit 13215b3aad

View File

@@ -1,6 +1,6 @@
############################################################################
##
## Copyright (C) 2021 The Qt Company Ltd.
## Copyright (C) 2023 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the provisioning scripts of the Qt Toolkit.
@@ -42,16 +42,30 @@
# This script will install emscripten needed by WebAssembly
$version = "3.1.25"
$zipVersion = $version -replace '\.', "_"
$temp = "$env:tmp"
$cacheUrl = "https://ci-files01-hki.ci.qt.io/input/emsdk/emsdk_windows_${zipVersion}.zip"
$sha = "cd180cae757e75316d50f2edc2f99a9d2eb83d5b"
# Make sure python is in the path
Prepend-Path "C:\Python27"
cd "C:\\Utils"
C:\PROGRA~1\Git\bin\git clone https://github.com/emscripten-core/emsdk.git
$installLocationEmsdk = "C:\\Utils\\emsdk"
cd $installLocationEmsdk
.\emsdk install $version
.\emsdk activate $version
try {
Write-Host "Fetching from cached location"
Download $cacheUrl $cacheUrl ${temp}\${zipVersion}.zip
Verify-Checksum ${temp}\${zipVersion}.zip $sha
Extract-7Zip ${temp}\${zipVersion}.zip C:\Utils\
cd $installLocationEmsdk
.\emsdk activate $version
} catch {
Write-Host "Can't find cached emsdk. Cloning it"
C:\PROGRA~1\Git\bin\git clone https://github.com/emscripten-core/emsdk.git
cd $installLocationEmsdk
.\emsdk install $version
.\emsdk activate $version
}
$versionWinPython = $($Env:EMSDK_PYTHON -split ('python\\') -split ('_64bit'))[1]
$versionNode = $($Env:EMSDK_NODE -split ('node\\') -split ('_64bit'))[1]