@@ -23,17 +23,33 @@ jobs:
2323 with :
2424 dotnet-version : 9.0.x
2525
26- # MAUI workload needed on both platforms for multi-targeted project
27- # Windows uses it for net9.0-windows, Linux needs it to restore all targets
28- - name : Install MAUI workload
26+ # MAUI workload is only available on Windows
27+ # Linux will build only the net9.0 target with GTK bindings
28+ - name : Install MAUI workload (Windows only)
29+ if : runner.os == 'Windows'
2930 run : dotnet workload install maui
3031
31- - name : Restore
32+ # Restore with framework-specific filters to avoid MAUI dependencies on Linux
33+ - name : Restore (Windows)
34+ if : runner.os == 'Windows'
3235 run : dotnet restore
3336
34- # Build everything with warnings as errors to catch issues early
35- - name : Build
36- run : dotnet build -c Release --no-restore --warnaserror
37+ - name : Restore (Linux)
38+ if : runner.os == 'Linux'
39+ run : dotnet restore src/Trion.Desktop/Trion.Desktop.csproj -f net9.0
40+
41+ # Build only the target framework appropriate for each OS
42+ - name : Build desktop (Windows)
43+ if : runner.os == 'Windows'
44+ run : dotnet build src/Trion.Desktop/Trion.Desktop.csproj -c Release -f net9.0-windows10.0.19041.0 --no-restore --warnaserror
45+
46+ - name : Build desktop (Linux)
47+ if : runner.os == 'Linux'
48+ run : dotnet build src/Trion.Desktop/Trion.Desktop.csproj -c Release -f net9.0 --no-restore --warnaserror
49+
50+ # Build web and test projects (framework-independent)
51+ - name : Build web
52+ run : dotnet build src/Trion.Web/Trion.Web.csproj -c Release --no-restore --warnaserror
3753
3854 # Run tests with coverage collection for CodeCov integration
3955 - name : Test
0 commit comments