Skip to content

Commit 69c330a

Browse files
authored
Merge 9cadb6b into ef6ac8a
2 parents ef6ac8a + 9cadb6b commit 69c330a

144 files changed

Lines changed: 12602 additions & 19110 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 85 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
dotnet build tests/OpenClaw.Tray.IntegrationTests -c Debug -r win-x64 --no-restore
8686
dotnet build tests/OpenClaw.Tray.UITests -c Debug -r win-x64 --no-restore
8787
dotnet build tests/OpenClawTray.FunctionalUI.Tests -c Debug -r win-x64 --no-restore
88-
dotnet build tests/OpenClawTray.OnboardingV2.Tests -c Debug -r win-x64 --no-restore
88+
dotnet build tests/OpenClaw.SetupEngine.Tests -c Debug -r win-x64
8989
9090
- name: Run Shared Tests
9191
env:
@@ -158,14 +158,14 @@ jobs:
158158
--logger trx;LogFileName=OpenClaw.Tray.IntegrationTests.trx"
159159
160160
# UI tests need a real visual tree AND a system-registered WindowsAppRuntime
161-
# framework MSIX — the test fixture calls Bootstrap.Initialize(1.8, stable),
161+
# framework MSIX — the test fixture calls Bootstrap.Initialize(2.0, stable),
162162
# which looks up the framework package by identity. The hosted windows-2025
163163
# runner image doesn't preinstall it, so we install it explicitly here.
164-
# Version pinned to match Microsoft.WindowsAppSDK 1.8.260101001 in the csprojs.
165-
- name: Install WindowsAppRuntime 1.8
164+
# Version pinned to match Microsoft.WindowsAppSDK 2.0.1 in the csprojs.
165+
- name: Install WindowsAppRuntime 2.0.1
166166
shell: pwsh
167167
run: |
168-
$url = "https://aka.ms/windowsappsdk/1.8/1.8.260101001/windowsappruntimeinstall-x64.exe"
168+
$url = "https://aka.ms/windowsappsdk/2.0/2.0.1/windowsappruntimeinstall-x64.exe"
169169
$exe = "$env:RUNNER_TEMP\WindowsAppRuntimeInstall.exe"
170170
Invoke-WebRequest -Uri $url -OutFile $exe
171171
& $exe --quiet
@@ -184,18 +184,18 @@ jobs:
184184
--results-directory TestResults\FunctionalUI
185185
--logger trx;LogFileName=OpenClawTray.FunctionalUI.Tests.trx"
186186
187-
- name: Run Onboarding V2 Tests
187+
- name: Run SetupEngine Tests
188188
run: >
189189
dotnet-coverage collect
190-
--output TestResults\OnboardingV2\coverage.cobertura.xml
190+
--output TestResults\SetupEngine\coverage.cobertura.xml
191191
--output-format cobertura
192-
"dotnet test tests/OpenClawTray.OnboardingV2.Tests
192+
"dotnet test tests/OpenClaw.SetupEngine.Tests
193193
--no-build
194194
-c Debug
195195
-r win-x64
196196
--verbosity normal
197-
--results-directory TestResults\OnboardingV2
198-
--logger trx;LogFileName=OpenClawTray.OnboardingV2.Tests.trx"
197+
--results-directory TestResults\SetupEngine
198+
--logger trx;LogFileName=OpenClaw.SetupEngine.Tests.trx"
199199
200200
- name: Run Tray UI Tests
201201
run: >
@@ -222,8 +222,72 @@ jobs:
222222
semVer: ${{ steps.gitversion.outputs.semVer }}
223223
majorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}
224224

225+
e2etests:
226+
needs: repo-hygiene
227+
if: ${{ !cancelled() }}
228+
runs-on: windows-latest
229+
timeout-minutes: 15
230+
steps:
231+
- name: Fail if repo hygiene failed
232+
if: ${{ needs.repo-hygiene.result != 'success' }}
233+
shell: pwsh
234+
run: |
235+
Write-Error "repo-hygiene failed; see the repo-hygiene job output."
236+
exit 1
237+
238+
- uses: actions/checkout@v6
239+
with:
240+
fetch-depth: 0
241+
242+
- name: Setup .NET 10
243+
uses: actions/setup-dotnet@v5
244+
with:
245+
dotnet-version: 10.0.x
246+
247+
- name: Cache NuGet packages
248+
uses: actions/cache@v5
249+
with:
250+
path: ~/.nuget/packages
251+
key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/Directory.Packages.props') }}
252+
restore-keys: nuget-${{ runner.os }}-
253+
254+
- name: Restore dependencies
255+
run: dotnet restore
256+
257+
- name: Build Shared Library
258+
run: dotnet build src/OpenClaw.Shared -c Debug --no-restore
259+
260+
- name: Build SetupEngine
261+
run: dotnet build src/OpenClaw.SetupEngine -c Debug --no-restore
262+
263+
- name: Build Tray App (WinUI)
264+
run: dotnet build src/OpenClaw.Tray.WinUI -c Debug -r win-x64
265+
266+
- name: Build E2E Tests
267+
run: dotnet build tests/OpenClaw.E2ETests -c Debug -r win-x64
268+
269+
- name: Run E2E Tests
270+
run: >
271+
dotnet test tests/OpenClaw.E2ETests
272+
--no-build
273+
-c Debug
274+
-r win-x64
275+
--verbosity normal
276+
--results-directory TestResults/E2E
277+
--logger "trx;LogFileName=OpenClaw.E2ETests.trx"
278+
--logger "console;verbosity=detailed"
279+
280+
- name: Upload E2E Test Results & Logs
281+
if: always()
282+
uses: actions/upload-artifact@v7
283+
with:
284+
name: e2e-test-results
285+
path: |
286+
TestResults/E2E/
287+
if-no-files-found: warn
288+
225289
build:
226-
needs: test
290+
needs: [test, e2etests]
227291
runs-on: ${{ matrix.rid == 'win-arm64' && 'windows-11-arm' || 'windows-latest' }}
228292
strategy:
229293
matrix:
@@ -253,6 +317,12 @@ jobs:
253317
- name: Publish WinUI Tray App
254318
run: dotnet publish src/OpenClaw.Tray.WinUI -c Release -r ${{ matrix.rid }} --self-contained --no-restore -p:Version=${{ needs.test.outputs.semVer }} -o publish
255319

320+
- name: Publish SetupEngine.UI
321+
run: |
322+
dotnet publish src/OpenClaw.SetupEngine.UI -c Release -r ${{ matrix.rid }} --self-contained -p:Version=${{ needs.test.outputs.semVer }} -o publish-setup
323+
mkdir publish\SetupEngine
324+
copy publish-setup\* publish\SetupEngine\ -Recurse
325+
256326
- name: Disable NuGet source mapping for signing
257327
if: startsWith(github.ref, 'refs/tags/v') && matrix.rid != 'win-arm64'
258328
shell: pwsh
@@ -290,7 +360,7 @@ jobs:
290360
path: publish/
291361

292362
build-msix:
293-
needs: test
363+
needs: [test, e2etests]
294364
runs-on: ${{ matrix.rid == 'win-arm64' && 'windows-11-arm' || 'windows-latest' }}
295365
continue-on-error: true
296366
strategy:
@@ -382,7 +452,7 @@ jobs:
382452
path: ${{ steps.find-msix.outputs.msix_path }}
383453

384454
build-extension:
385-
needs: test
455+
needs: [test, e2etests]
386456
runs-on: windows-latest
387457
strategy:
388458
matrix:
@@ -416,8 +486,8 @@ jobs:
416486
path: src/OpenClaw.CommandPalette/bin/${{ matrix.platform }}/Debug/
417487

418488
release:
419-
needs: [repo-hygiene, test, build, build-msix, build-extension]
420-
if: startsWith(github.ref, 'refs/tags/v') && needs.repo-hygiene.result == 'success' && needs.test.result == 'success' && needs.build.result == 'success' && needs.build-extension.result == 'success' && !cancelled()
489+
needs: [repo-hygiene, test, e2etests, build, build-msix, build-extension]
490+
if: startsWith(github.ref, 'refs/tags/v') && needs.repo-hygiene.result == 'success' && needs.test.result == 'success' && needs.e2etests.result == 'success' && needs.build.result == 'success' && needs.build-extension.result == 'success' && !cancelled()
421491
runs-on: windows-latest
422492
permissions:
423493
contents: write

build.ps1

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#>
2424

2525
param(
26-
[ValidateSet("All", "Tray", "WinUI", "Shared", "CommandPalette", "Cli", "WinNodeCli")]
26+
[ValidateSet("All", "Tray", "WinUI", "Shared", "CommandPalette", "Cli", "WinNodeCli", "SetupEngine")]
2727
[string]$Project = "All",
2828

2929
[ValidateSet("Debug", "Release")]
@@ -204,9 +204,10 @@ $projects = @{
204204
"Tray" = @{ Path = "src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj"; UseRid = $true }
205205
"WinUI" = @{ Path = "src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj"; UseRid = $true }
206206
"CommandPalette" = @{ Path = "src/OpenClaw.CommandPalette/OpenClaw.CommandPalette.csproj"; UseRid = $false }
207+
"SetupEngine" = @{ Path = "src/OpenClaw.SetupEngine.UI/OpenClaw.SetupEngine.UI.csproj"; UseRid = $true }
207208
}
208209

209-
$toBuild = if ($Project -eq "All") { @("Shared", "Cli", "WinNodeCli", "WinUI") } else { @($Project) }
210+
$toBuild = if ($Project -eq "All") { @("Shared", "Cli", "WinNodeCli", "SetupEngine", "WinUI") } else { @($Project) }
210211

211212
# Always build Shared first if building other projects
212213
if ($Project -ne "Shared" -and $Project -ne "All" -and $toBuild -notcontains "Shared") {
@@ -221,7 +222,23 @@ foreach ($proj in $toBuild) {
221222
}
222223

223224
# =============================================================================
224-
# SUMMARY
225+
# POST-BUILD: Copy SetupEngine.UI into WinUI output so the tray can find it
226+
# =============================================================================
227+
if (($buildResults.ContainsKey("SetupEngine") -and $buildResults["SetupEngine"]) -and
228+
(($buildResults.ContainsKey("WinUI") -and $buildResults["WinUI"]) -or ($buildResults.ContainsKey("Tray") -and $buildResults["Tray"]))) {
229+
$setupTfm = Get-ProjectTargetFramework $projects["SetupEngine"].Path
230+
$winUITfm = Get-ProjectTargetFramework $projects["WinUI"].Path
231+
if ($setupTfm -and $winUITfm) {
232+
$setupOutDir = "src\OpenClaw.SetupEngine.UI\bin\$Configuration\$setupTfm\$rid"
233+
$winUIOutDir = "src\OpenClaw.Tray.WinUI\bin\$Configuration\$winUITfm\$rid"
234+
$destDir = Join-Path $winUIOutDir "SetupEngine"
235+
if (Test-Path $setupOutDir) {
236+
if (-not (Test-Path $destDir)) { New-Item -ItemType Directory -Path $destDir -Force | Out-Null }
237+
Copy-Item "$setupOutDir\*" $destDir -Recurse -Force
238+
Write-Info "Copied SetupEngine.UI output → $destDir"
239+
}
240+
}
241+
}
225242
# =============================================================================
226243

227244
Write-Header "Build Summary"

0 commit comments

Comments
 (0)