Skip to content

Refactor Drivelution for AOT compatibility, remove Serilog dependency, upgrade to .NET 10, and eliminate all project dependencies #363

Refactor Drivelution for AOT compatibility, remove Serilog dependency, upgrade to .NET 10, and eliminate all project dependencies

Refactor Drivelution for AOT compatibility, remove Serilog dependency, upgrade to .NET 10, and eliminate all project dependencies #363

name: dotnet-ci
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore ./src/c#/GeneralUpdate.sln
# 合并检查AOT和分析结果的步骤,确保共享同一个执行环境
- name: Check AOT support (Client app) and analyze result
run: |
# 执行AOT发布并捕获退出码
dotnet publish ./src/c#/GeneralUpdate.Client/GeneralUpdate.Client.csproj `
-c Release `
-r win-x64
# 立即检查当前环境的退出码(同一个step内有效)
if ($LASTEXITCODE -eq 0) {
Write-Host "✅ GeneralUpdate.Client 支持AOT编译"
} else {
Write-Host "❌ GeneralUpdate.Client 不支持AOT编译,请检查错误日志"
exit 1 # 让step失败,触发Workflow失败
}