From 9e47ca801d524bb64fd6b4d26c66793af883a848 Mon Sep 17 00:00:00 2001 From: greepar Date: Wed, 22 Jul 2026 02:50:54 +0800 Subject: [PATCH] Fix static graphics smoke validation --- .github/workflows/nuget-static-graphics.yml | 18 +++++++++++++++++- .github/workflows/static-graphics-musl.yml | 3 +++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nuget-static-graphics.yml b/.github/workflows/nuget-static-graphics.yml index b032238..b67d601 100644 --- a/.github/workflows/nuget-static-graphics.yml +++ b/.github/workflows/nuget-static-graphics.yml @@ -241,9 +241,25 @@ jobs: } Get-ChildItem -Path $publishDir -Recurse -File | ForEach-Object { $_.FullName } - - name: Run Windows Avalonia smoke app + - name: Verify Windows executable architecture if: ${{ startsWith(matrix.rid, 'win-') }} shell: pwsh + run: | + $ErrorActionPreference = "Stop" + $app = Join-Path $PWD "artifacts/smoke-${{ matrix.rid }}/AvaloniaStaticLinkSmoke.exe" + $expectedMachine = @{ + "win-x64" = "8664 machine" + "win-x86" = "14C machine" + "win-arm64" = "AA64 machine" + }["${{ matrix.rid }}"] + $headers = & dumpbin /headers $app | Out-String + if ($LASTEXITCODE -ne 0 -or $headers -notmatch [regex]::Escape($expectedMachine)) { + throw "Expected $expectedMachine in PE headers for $app.`n$headers" + } + + - name: Run Windows Avalonia smoke app + if: ${{ matrix.rid == 'win-x64' || matrix.rid == 'win-x86' }} + shell: pwsh run: | $ErrorActionPreference = "Stop" $publishDir = Join-Path $PWD "artifacts/smoke-${{ matrix.rid }}" diff --git a/.github/workflows/static-graphics-musl.yml b/.github/workflows/static-graphics-musl.yml index d536811..9505bcb 100644 --- a/.github/workflows/static-graphics-musl.yml +++ b/.github/workflows/static-graphics-musl.yml @@ -81,6 +81,9 @@ jobs: bash scripts/build-linux-static-graphics.sh all ' + - name: Normalize native build cache ownership + run: sudo chown -R "$(id -u):$(id -g)" External/NativeStatic/.work + - name: Upload Linux musl static archives uses: actions/upload-artifact@v4 with: