feat(linux): add graphical platform services
This commit is contained in:
parent
1628d9f587
commit
66f114b258
28 changed files with 1328 additions and 155 deletions
74
.github/workflows/headless-portability.yml
vendored
74
.github/workflows/headless-portability.yml
vendored
|
|
@ -11,11 +11,16 @@ on:
|
|||
- "src/AcDream.Plugin.Abstractions/**"
|
||||
- "src/AcDream.Runtime/**"
|
||||
- "src/AcDream.Headless/**"
|
||||
- "src/AcDream.App/**"
|
||||
- "src/AcDream.UI.Abstractions/**"
|
||||
- "src/AcDream.UI.ImGui/**"
|
||||
- "tests/AcDream.Core.Tests/**"
|
||||
- "tests/AcDream.Core.Net.Tests/**"
|
||||
- "tests/AcDream.Content.Tests/**"
|
||||
- "tests/AcDream.Runtime.Tests/**"
|
||||
- "tests/AcDream.Headless.Tests/**"
|
||||
- "tests/AcDream.App.Tests/**"
|
||||
- "tests/AcDream.UI.Abstractions.Tests/**"
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/headless-portability.yml"
|
||||
|
|
@ -26,11 +31,16 @@ on:
|
|||
- "src/AcDream.Plugin.Abstractions/**"
|
||||
- "src/AcDream.Runtime/**"
|
||||
- "src/AcDream.Headless/**"
|
||||
- "src/AcDream.App/**"
|
||||
- "src/AcDream.UI.Abstractions/**"
|
||||
- "src/AcDream.UI.ImGui/**"
|
||||
- "tests/AcDream.Core.Tests/**"
|
||||
- "tests/AcDream.Core.Net.Tests/**"
|
||||
- "tests/AcDream.Content.Tests/**"
|
||||
- "tests/AcDream.Runtime.Tests/**"
|
||||
- "tests/AcDream.Headless.Tests/**"
|
||||
- "tests/AcDream.App.Tests/**"
|
||||
- "tests/AcDream.UI.Abstractions.Tests/**"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
|
|
@ -95,3 +105,67 @@ jobs:
|
|||
Set-Content -LiteralPath headless-k0.json -Value '{"version":1,"sessions":[]}'
|
||||
dotnet run --project src/AcDream.Headless/AcDream.Headless.csproj -c Release -- validate --config headless-k0.json
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
|
||||
linux-graphical:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install .NET 10
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "10.0.x"
|
||||
|
||||
- name: Build and publish Linux graphical client
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet build src/AcDream.App/AcDream.App.csproj -c Release -r linux-x64
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
dotnet publish src/AcDream.App/AcDream.App.csproj `
|
||||
-c Release `
|
||||
-r linux-x64 `
|
||||
--self-contained false `
|
||||
-o artifacts/acdream-linux-x64
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
|
||||
- name: Test portable graphical boundary
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet test `
|
||||
tests/AcDream.UI.Abstractions.Tests/AcDream.UI.Abstractions.Tests.csproj `
|
||||
-c Release
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
dotnet test `
|
||||
tests/AcDream.App.Tests/AcDream.App.Tests.csproj `
|
||||
-c Release `
|
||||
--filter "FullyQualifiedName~LinuxMonotonicFramePacingWaiterTests|FullyQualifiedName~LinuxPlatformBoundaryTests|FullyQualifiedName~GraphicalHostPlatformServicesTests|FullyQualifiedName~GraphicalLegacyConfigurationMigratorTests"
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
|
||||
- name: Verify Linux package contract
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
root=artifacts/acdream-linux-x64
|
||||
test -x "$root/AcDream.App"
|
||||
test -f "$root/AcDream.App.dll"
|
||||
test -f "$root/libglfw.so.3"
|
||||
test -f "$root/libopenal.so"
|
||||
test -f "$root/libcimgui.so"
|
||||
test -f "$root/Rendering/Shaders/mesh_modern.vert"
|
||||
test -f "$root/plugins/AcDream.Plugins.Smoke/AcDream.Plugins.Smoke.dll"
|
||||
test -f "$root/plugins/AcDream.Plugins.Smoke/plugin.json"
|
||||
|
||||
test "$(grep -RIl --include='*.cs' 'LibraryImport(\"kernel32.dll\"' \
|
||||
src/AcDream.App | wc -l)" -eq 1
|
||||
grep -q 'WindowsHighResolutionFramePacingWaiter.cs' < <(
|
||||
grep -RIl --include='*.cs' 'LibraryImport(\"kernel32.dll\"' \
|
||||
src/AcDream.App)
|
||||
! grep -RIn --include='*.cs' 'LocalApplicationData' \
|
||||
src/AcDream.App src/AcDream.UI.Abstractions
|
||||
! grep -RIn --include='*.cs' \
|
||||
'WindowsHighResolutionFramePacingWaiter.Create()' \
|
||||
src/AcDream.App \
|
||||
--exclude='FramePacingWaiterFactory.cs' \
|
||||
--exclude='WindowsHighResolutionFramePacingWaiter.cs'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue