Skip to content

Commit d3cf163

Browse files
committed
CI test
Signed-off-by: Joel Dice <[email protected]>
1 parent 1d1c61f commit d3cf163

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

eng/pipelines/common/global-build-job.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -214,19 +214,17 @@ jobs:
214214
- ${{ if ne(parameters.hostedOs, 'windows') }}:
215215
- script: $(Build.SourcesDirectory)/eng/pipelines/runtimelab/install-pwsh.sh $(Build.SourcesDirectory)/wasm-tools
216216
displayName: Install Powershell 7
217+
- script: pwsh $(Build.SourcesDirectory)/eng/pipelines/runtimelab/install-nodejs.ps1 $(Build.SourcesDirectory)\wasm-tools $(Build.SourcesDirectory)
218+
displayName: Install NodeJS
217219
- script: pwsh $(Build.SourcesDirectory)/eng/pipelines/runtimelab/install-llvm.ps1 -CloneDir $(Build.SourcesDirectory)/wasm-tools -Configs ${{ parameters.buildConfig }} -CI
218220
displayName: Install/build LLVM
219-
- script: pwsh $(Build.SourcesDirectory)/eng/pipelines/runtimelab/install-nodejs.ps1 $(Build.SourcesDirectory)\wasm-tools
220-
displayName: Install NodeJS
221221

222222
- ${{ if and(eq(parameters.runtimeFlavor, 'coreclr'), eq(parameters.platform, 'wasi_wasm_win')) }}:
223223
# Install Wasi Wasm dependencies: wasi-sdk, wasmtime
224224
- script: call $(Build.SourcesDirectory)/eng/pipelines/runtimelab/install-wasi-sdk.cmd $(Build.SourcesDirectory)\wasm-tools
225225
displayName: Install wasi-sdk
226226
- script: call $(Build.SourcesDirectory)/eng/pipelines/runtimelab/install-wasmtime.cmd $(Build.SourcesDirectory)\wasm-tools
227227
displayName: Install wasmtime
228-
- script: npm install -g @bytecodealliance/jco
229-
displayName: Install jco
230228

231229
- ${{ if or(eq(parameters.platform, 'browser_wasm_win'), and(eq(parameters.platform, 'wasi_wasm_win'), not(eq(parameters.runtimeFlavor, 'coreclr')))) }}:
232230
# Update machine certs

eng/pipelines/runtimelab/install-nodejs.ps1

+13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
$InstallPath = $Args[0]
2+
$RootPath = $Args[1]
23
$NodeJSVersion = "v20.2.0"
34

45
if (!(Test-Path variable:global:IsWindows))
@@ -51,11 +52,13 @@ if ($IsWindows)
5152
{
5253
Expand-Archive -LiteralPath "$InstallPath\$NodeJSZipName" -DestinationPath $InstallPath -Force
5354
$NodeJSExePath = "$InstallPath\$NodeJSInstallName\node.exe"
55+
$NpmExePath = "$InstallPath\$NodeJSInstallName\npm.cmd"
5456
}
5557
else
5658
{
5759
tar xJf $InstallPath/$NodeJSZipName -C $InstallPath
5860
$NodeJSExePath = "$InstallPath/$NodeJSInstallName/bin/node"
61+
$NpmExePath = "$InstallPath/$NodeJSInstallName/bin/npm"
5962
}
6063

6164
if (!(Test-Path $NodeJSExePath))
@@ -64,5 +67,15 @@ if (!(Test-Path $NodeJSExePath))
6467
exit 1
6568
}
6669

70+
if (!(Test-Path $NpmExePath))
71+
{
72+
Write-Error "Did not find NPM at: '$NpmExePath'"
73+
exit 1
74+
}
75+
76+
Set-Location -Path $RootPath
77+
$NpmCommand = "$NpmExePath install @bytecodealliance/jco"
78+
Invoke-Expression $NpmCommand
79+
6780
Write-Host Setting NODEJS_EXECUTABLE to $NodeJSExePath
6881
Write-Host "##vso[task.setvariable variable=NODEJS_EXECUTABLE]$NodeJSExePath"

src/tests/Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
<!-- Set Test Wrapper running host OS -->
180180
<PropertyGroup>
181181
<TestWrapperTargetsWindows>false</TestWrapperTargetsWindows>
182-
<TestWrapperTargetsWindows Condition=" ('$(TargetsWindows)' != '' And '$(TargetsWindows)' ) OR ('$(TargetOS)' == 'android' And '$(TargetArchitecture)' == 'arm64' )">true</TestWrapperTargetsWindows>
182+
<TestWrapperTargetsWindows Condition=" ('$(TargetsWindows)' != '' And '$(TargetsWindows)' ) OR ('$(TargetOS)' == 'android' And '$(TargetArchitecture)' == 'arm64' ) OR ($(WindowsHost) And '$(TargetArchitecture)' == 'wasm')">true</TestWrapperTargetsWindows>
183183
<TestScriptExtension Condition="'$(TestWrapperTargetsWindows)' != 'true' ">sh</TestScriptExtension>
184184
<TestScriptExtension Condition="'$(TestWrapperTargetsWindows)' == 'true' ">cmd</TestScriptExtension>
185185
</PropertyGroup>

0 commit comments

Comments
 (0)