mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-02 07:34:45 +08:00
* fix(ci): upstream Windows SDK validation support Port remaining Windows validation tooling from GitLab independently of the combined MXC runtime port. Preserve locked SDK dependencies and guard temporary launcher cleanup. Co-authored-by: Shailendra Singh <shailendras@nvidia.com> Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> * fix(ci): install native TypeScript dependencies before validation Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> --------- Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> Co-authored-by: Shailendra Singh <shailendras@nvidia.com>
41 lines
1.2 KiB
PowerShell
41 lines
1.2 KiB
PowerShell
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
[CmdletBinding()]
|
|
param()
|
|
|
|
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
$nodeArchitecture = (& node -p "process.arch").Trim()
|
|
if ($LASTEXITCODE -ne 0) {
|
|
throw "Unable to determine the Node.js process architecture (exit code $LASTEXITCODE)."
|
|
}
|
|
if ($nodeArchitecture -notin @('x64', 'arm64')) {
|
|
throw "Unsupported Windows Node.js architecture '$nodeArchitecture'."
|
|
}
|
|
|
|
$previousCpu = $env:npm_config_cpu
|
|
try {
|
|
$env:npm_config_cpu = $nodeArchitecture
|
|
& npm ci
|
|
if ($LASTEXITCODE -ne 0) {
|
|
throw "Unable to install TypeScript SDK dependencies (exit code $LASTEXITCODE)."
|
|
}
|
|
}
|
|
finally {
|
|
$env:npm_config_cpu = $previousCpu
|
|
}
|
|
|
|
$nativePackages = @(
|
|
"@biomejs/cli-win32-$nodeArchitecture",
|
|
"@bufbuild/buf-win32-$nodeArchitecture",
|
|
"@rolldown/binding-win32-$nodeArchitecture-msvc"
|
|
)
|
|
foreach ($package in $nativePackages) {
|
|
$manifest = Join-Path 'node_modules' (Join-Path $package 'package.json')
|
|
if (-not (Test-Path -LiteralPath $manifest -PathType Leaf)) {
|
|
throw "The lockfile-pinned native dependency '$package' was not installed."
|
|
}
|
|
}
|