fix(launcher): close LA4 review findings
This commit is contained in:
parent
d0a9c65d85
commit
10a712d66b
19 changed files with 1631 additions and 134 deletions
57
.github/workflows/headless-portability.yml
vendored
57
.github/workflows/headless-portability.yml
vendored
|
|
@ -7,6 +7,7 @@ on:
|
|||
- "AcDream.slnx"
|
||||
- "src/AcDream.Platform/**"
|
||||
- "src/AcDream.Launcher.Core/**"
|
||||
- "src/AcDream.Launcher/**"
|
||||
- "src/AcDream.Core/**"
|
||||
- "src/AcDream.Core.Net/**"
|
||||
- "src/AcDream.Content/**"
|
||||
|
|
@ -17,6 +18,7 @@ on:
|
|||
- "src/AcDream.UI.Abstractions/**"
|
||||
- "tests/AcDream.Platform.Tests/**"
|
||||
- "tests/AcDream.Launcher.Core.Tests/**"
|
||||
- "tests/AcDream.Launcher.Tests/**"
|
||||
- "tests/AcDream.Core.Tests/**"
|
||||
- "tests/AcDream.Core.Net.Tests/**"
|
||||
- "tests/AcDream.Content.Tests/**"
|
||||
|
|
@ -33,6 +35,7 @@ on:
|
|||
- "AcDream.slnx"
|
||||
- "src/AcDream.Platform/**"
|
||||
- "src/AcDream.Launcher.Core/**"
|
||||
- "src/AcDream.Launcher/**"
|
||||
- "src/AcDream.Core/**"
|
||||
- "src/AcDream.Core.Net/**"
|
||||
- "src/AcDream.Content/**"
|
||||
|
|
@ -43,6 +46,7 @@ on:
|
|||
- "src/AcDream.UI.Abstractions/**"
|
||||
- "tests/AcDream.Platform.Tests/**"
|
||||
- "tests/AcDream.Launcher.Core.Tests/**"
|
||||
- "tests/AcDream.Launcher.Tests/**"
|
||||
- "tests/AcDream.Core.Tests/**"
|
||||
- "tests/AcDream.Core.Net.Tests/**"
|
||||
- "tests/AcDream.Content.Tests/**"
|
||||
|
|
@ -131,6 +135,59 @@ jobs:
|
|||
dotnet run --project src/AcDream.Headless/AcDream.Headless.csproj -c Release -- validate --config headless-k0.json
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
|
||||
portable-launcher:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
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 test the portable launcher
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet build src/AcDream.Launcher/AcDream.Launcher.csproj -c Release
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
dotnet test tests/AcDream.Launcher.Tests/AcDream.Launcher.Tests.csproj -c Release
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
|
||||
- name: Publish the self-contained Linux launcher
|
||||
if: runner.os == 'Linux'
|
||||
shell: pwsh
|
||||
run: |
|
||||
dotnet publish src/AcDream.Launcher/AcDream.Launcher.csproj `
|
||||
-c Release `
|
||||
-r linux-x64 `
|
||||
-o artifacts/acdream-launcher-linux-x64
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
|
||||
- name: Verify self-contained property and artifact execution
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
root=artifacts/acdream-launcher-linux-x64
|
||||
self_contained=$(dotnet msbuild \
|
||||
src/AcDream.Launcher/AcDream.Launcher.csproj \
|
||||
-nologo \
|
||||
-property:RuntimeIdentifier=linux-x64 \
|
||||
-getProperty:SelfContained | tr -d '\r\n ')
|
||||
test "$self_contained" = true
|
||||
test -x "$root/acdream-launcher"
|
||||
test ! -f "$root/acdream-launcher.dll"
|
||||
DOTNET_ROOT=/definitely-not-installed \
|
||||
DOTNET_ROOT_X64=/definitely-not-installed \
|
||||
DOTNET_MULTILEVEL_LOOKUP=0 \
|
||||
"$root/acdream-launcher" --verify-publish
|
||||
|
||||
linux-graphical:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue