Skip to content

Commit 2792cbd

Browse files
author
Ben Hillis
committed
fix xml
1 parent fa5f4c4 commit 2792cbd

8 files changed

Lines changed: 53623 additions & 27 deletions

.pipelines/build-job.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,28 @@ jobs:
234234
235235
# Test artifacts (x64 only)
236236
- ${{ if parameters.includeTestArtifacts }}:
237+
- powershell: |
238+
# Create a single-arch msixbundle for test installation.
239+
# Tests require a bundle (not standalone msix) for the WslInstaller service to trigger MSI auto-install.
240+
$version = "$(version.WSL_PACKAGE_VERSION)"
241+
$bundleDir = "$(ob_outputDirectory)\testbin\x64\release"
242+
New-Item -ItemType Directory -Path $bundleDir -Force
243+
$mappingsFile = Join-Path $bundleDir "test-bundle-mappings.ini"
244+
$msix = "bin\x64\release\installer.msix"
245+
$bundlePath = Join-Path $bundleDir "installer.msixbundle"
246+
Set-Content $mappingsFile "[Files]"
247+
Add-Content $mappingsFile "`"$((Resolve-Path $msix).Path)`" `"Microsoft.WSL_${version}_x64.msix`""
248+
& makeappx.exe bundle -f $mappingsFile -bv $version -o -p $bundlePath
249+
if ($LASTEXITCODE -ne 0) { throw "makeappx bundle failed with exit code $LASTEXITCODE" }
250+
Remove-Item $mappingsFile
251+
displayName: Create test msixbundle
252+
237253
- powershell: |
238254
$taefVersion = (Select-Xml -Path packages.config -XPath '/packages/package[@id=''Microsoft.Taef'']/@version').Node.Value
239255
New-Item -ItemType Directory -Path "$(ob_outputDirectory)\bundle" -Force
240-
mkdir $(ob_outputDirectory)\testbin\x64\release
241256
242257
Move-Item -Path "bin\x64\release\wsltests.dll" -Destination "$(ob_outputDirectory)\testbin\x64\release\wsltests.dll"
243258
Move-Item -Path "bin\x64\release\testplugin.dll" -Destination "$(ob_outputDirectory)\testbin\x64\release\testplugin.dll"
244-
Copy-Item -Path "bin\x64\release\installer.msix" -Destination "$(ob_outputDirectory)\testbin\x64\release\installer.msix"
245259
Move-Item -Path "packages\Microsoft.Taef.$taefVersion\build\Binaries\x64" -Destination "$(ob_outputDirectory)\testbin\x64\release\taef"
246260
247261
Move-Item -Path "bin\x64\cloudtest" -Destination "$(ob_outputDirectory)\testbin\x64\cloudtest"

.pipelines/build-stage.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ parameters:
1515
type: string
1616
default: ''
1717

18+
- name: nugetPackages
19+
type: object
20+
default:
21+
- Microsoft.WSL.PluginApi.nuspec
22+
23+
- name: includePackageStage
24+
type: boolean
25+
default: true
26+
1827
- name: targets
1928
type: object
2029
default:
@@ -72,7 +81,6 @@ stages:
7281
vsoProject: ${{ parameters.vsoProject }}
7382
esrp: ${{ parameters.esrp }}
7483
includeTestArtifacts: true
75-
includeCodeQL: true
7684

7785
# ── arm64 build stage (runs in parallel with build_x64) ──────────────
7886
# Includes formatting/localization checks as a first job, then arm64 build.
@@ -129,3 +137,16 @@ stages:
129137
vsoOrg: ${{ parameters.vsoOrg }}
130138
vsoProject: ${{ parameters.vsoProject }}
131139
esrp: ${{ parameters.esrp }}
140+
includeCodeQL: true
141+
142+
# ── package stage
143+
# Creates msixbundle, appxupload, and NuGet packages from both platform artifacts.
144+
- ${{ if parameters.includePackageStage }}:
145+
- template: package-stage.yml
146+
parameters:
147+
isRelease: ${{ parameters.isRelease }}
148+
isNightly: ${{ parameters.isNightly }}
149+
packageVersion: ${{ parameters.packageVersion }}
150+
pool: ${{ parameters.pool }}
151+
esrp: ${{ parameters.esrp }}
152+
nugetPackages: ${{ parameters.nugetPackages }}

.pipelines/package-stage.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ stages:
5555
ob_artifactSuffix: '_package'
5656

5757
steps:
58-
- task: CMake@1
59-
displayName: "CMake configure (for SDK tools on PATH)"
60-
inputs:
61-
workingDirectory: "."
62-
cmakeArgs: .
63-
6458
- task: PowerShell@2
6559
displayName: "Compute package version"
6660
name: version
@@ -80,6 +74,12 @@ stages:
8074
Write-Host "##vso[task.setvariable variable=WSL_PACKAGE_VERSION;isOutput=true]$([string]('${{ parameters.packageVersion }}' + '.0'))"
8175
Write-Host "##vso[task.setvariable variable=WSL_NUGET_PACKAGE_VERSION;isOutput=true]$([string]('${{ parameters.packageVersion }}'))"
8276
77+
- task: CMake@1
78+
displayName: "CMake configure (generates nuspec files)"
79+
inputs:
80+
workingDirectory: "."
81+
cmakeArgs: . -DPACKAGE_VERSION=$(version.WSL_PACKAGE_VERSION) -DWSL_NUGET_PACKAGE_VERSION=$(version.WSL_NUGET_PACKAGE_VERSION)
82+
8383
- task: DownloadPipelineArtifact@2
8484
displayName: Download x64 build artifact
8585
inputs:
@@ -113,8 +113,9 @@ stages:
113113
Add-Content $mappingsFile "`"$arm64Msix`" `"${packageName}_ARM64.msix`""
114114
115115
# Create the msixbundle
116+
$makeappx = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\makeappx.exe" -ErrorAction Stop | Sort-Object FullName -Descending | Select-Object -First 1 -ExpandProperty FullName
116117
Write-Host "Creating msixbundle: $outputBundle"
117-
& makeappx.exe bundle -f $mappingsFile -bv $version -o -p $outputBundle
118+
& $makeappx bundle -f $mappingsFile -bv $version -o -p $outputBundle
118119
if ($LASTEXITCODE -ne 0) { throw "makeappx bundle failed with exit code $LASTEXITCODE" }
119120
displayName: Create msixbundle
120121

.pipelines/wsl-build-nightly-onebranch.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,4 @@ extends:
4949

5050
- template: test-stage.yml@self
5151
parameters:
52-
rs_prerelease_only: false
53-
54-
- template: package-stage.yml@self
55-
parameters:
56-
isRelease: false
57-
isNightly: true
52+
rs_prerelease_only: false

.pipelines/wsl-build-pr-onebranch.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,3 @@ extends:
5050
- template: test-stage.yml@self
5151
parameters:
5252
rs_prerelease_only: true
53-
54-
- template: package-stage.yml@self
55-
parameters:
56-
isRelease: false

.pipelines/wsl-build-release-onebranch.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ extends:
5959
parameters:
6060
rs_prerelease_only: false
6161

62-
- template: package-stage.yml@self
63-
parameters:
64-
isRelease: true
65-
packageVersion: ${{ iif(eq(parameters.testVersion, ''), variables['Build.SourceBranchName'], parameters.testVersion) }}
66-
6762
- template: flight-stage.yml@self
6863
parameters:
6964
publishPackage: ${{ iif(eq(parameters.testVersion, ''), true, false) }}

cloudtest/TestGroup.xml.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</ResourceSpec>
66
<Setup TimeoutMins="30">
77
<BuildFiles>
8-
<Copy Src="[drop]\testbin\${TARGET_PLATFORM}\release\installer.msix" Dest="[WorkingDirectory]" IsRecursive="false"/>
8+
<Copy Src="[drop]\testbin\${TARGET_PLATFORM}\release\installer.msixbundle" Dest="[WorkingDirectory]" IsRecursive="false"/>
99
<Copy Src="[drop]\testbin\${TARGET_PLATFORM}\release\*" Dest="[WorkingDirectory]\" IsRecursive="true" Writable="true"/>
1010
<Copy Src="[drop]\testbin\${TARGET_PLATFORM}\test_distro.tar.xz" Dest="[WorkingDirectory]" IsRecursive="false" Writable="true"/>
1111
<Copy Src="[drop]\testbin\test-setup.ps1" Dest="[WorkingDirectory]\" IsRecursive="false" />
@@ -21,6 +21,6 @@
2121
</Setup>
2222

2323
<TestJob Name="CloudTest.Taef" TimeoutMins="240">
24-
<Execution Type=\"TAEF\" Path=\"[WorkingDirectory]\\wsltests.dll\" Args=\"/p:bugReportDirectory=[LoggingDirectory]\\BugReportOutput /errorOnCrash /testmode:etwlogger /EtwLogger:WPRProfileFile=[WorkingDirectory]\\wsl.wprp /EtwLogger:WPRProfile=WSL /EtwLogger:SavePoint=ExecutionComplete /EtwLogger:RecordingScope=Execution /p:SetupScript=.\\test-setup.ps1 /p:Package=[WorkingDirectory]\\installer.msix /p:Version=${version} /p:AllowUnsigned=${ALLOW_UNSIGNED_PACKAGE} /p:UnitTestsPath=[WorkingDirectory]\\unit_tests /p:DistroPath=[WorkingDirectory]\\test_distro.tar.xz /p:DistroName=test_distro /logOutput:High /p:RedirectStdout=[LoggingDirectory]\\stdout.txt /p:RedirectStderr=[LoggingDirectory]\\stderr.txt /p:KernelLogs=[LoggingDirectory]\\dmesg.txt /p:DumpFolder=[LoggingDirectory] /p:WerReport /p:LogDmesg /p:PipelineBuildId=${PIPELINE_BUILD_ID} /p:DumpTool=DumpTool.exe\" />
24+
<Execution Type="TAEF" Path="[WorkingDirectory]\wsltests.dll" Args="/p:bugReportDirectory=[LoggingDirectory]\BugReportOutput /errorOnCrash /testmode:etwlogger /EtwLogger:WPRProfileFile=[WorkingDirectory]\wsl.wprp /EtwLogger:WPRProfile=WSL /EtwLogger:SavePoint=ExecutionComplete /EtwLogger:RecordingScope=Execution /p:SetupScript=.\test-setup.ps1 /p:Package=[WorkingDirectory]\installer.msixbundle /p:Version=${version} /p:AllowUnsigned=${ALLOW_UNSIGNED_PACKAGE} /p:UnitTestsPath=[WorkingDirectory]\unit_tests /p:DistroPath=[WorkingDirectory]\test_distro.tar.xz /p:DistroName=test_distro /logOutput:High /p:RedirectStdout=[LoggingDirectory]\stdout.txt /p:RedirectStderr=[LoggingDirectory]\stderr.txt /p:KernelLogs=[LoggingDirectory]\dmesg.txt /p:DumpFolder=[LoggingDirectory] /p:WerReport /p:LogDmesg /p:PipelineBuildId=${PIPELINE_BUILD_ID} /p:DumpTool=DumpTool.exe" />
2525
</TestJob>
2626
</TestJobGroup>

0 commit comments

Comments
 (0)