diff options
author | Heikki Halmet <heikki.halmet@qt.io> | 2023-04-05 11:53:29 +0000 |
---|---|---|
committer | Heikki Halmet <heikki.halmet@qt.io> | 2023-04-13 05:07:58 +0000 |
commit | 13215b3aad8b5badf0cfc45db571b945ac8207ea (patch) | |
tree | 274d0ac3268cb2d0ba934c384de32b3428a8b478 | |
parent | 6fd8a319b178e67d9208ecd73b79faf7d025afae (diff) | |
download | qt5-13215b3aad8b5badf0cfc45db571b945ac8207ea.tar.gz |
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>
-rw-r--r-- | coin/provisioning/common/windows/emsdk.ps1 | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/coin/provisioning/common/windows/emsdk.ps1 b/coin/provisioning/common/windows/emsdk.ps1 index adc67179..0ec4e923 100644 --- a/coin/provisioning/common/windows/emsdk.ps1 +++ b/coin/provisioning/common/windows/emsdk.ps1 @@ -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] |