1
+ name : .NET Build Validation
2
+
3
+ ' on ' :
4
+ pull_request :
5
+ branches : [ main ]
6
+ paths :
7
+ - ' 02-SetupDevEnvironment/**/*.cs'
8
+ - ' 02-SetupDevEnvironment/**/*.csproj'
9
+ - ' 02-SetupDevEnvironment/**/*.sln'
10
+ - ' 02-SetupDevEnvironment/**/*.json'
11
+ - ' 03-CoreGenerativeAITechniques/**/*.cs'
12
+ - ' 03-CoreGenerativeAITechniques/**/*.csproj'
13
+ - ' 03-CoreGenerativeAITechniques/**/*.sln'
14
+ - ' 03-CoreGenerativeAITechniques/**/*.json'
15
+ - ' 04-PracticalSamples/**/*.cs'
16
+ - ' 04-PracticalSamples/**/*.csproj'
17
+ - ' 04-PracticalSamples/**/*.sln'
18
+ - ' 04-PracticalSamples/**/*.razor'
19
+ - ' 04-PracticalSamples/**/*.json'
20
+ - ' 05-AppCreatedWithGenAI/**/*.cs'
21
+ - ' 05-AppCreatedWithGenAI/**/*.csproj'
22
+ - ' 05-AppCreatedWithGenAI/**/*.sln'
23
+ - ' 05-AppCreatedWithGenAI/**/*.razor'
24
+ - ' 05-AppCreatedWithGenAI/**/*.json'
25
+ - ' .github/workflows/build-validation.yml'
26
+
27
+ jobs :
28
+ build :
29
+ name : Build .NET Projects
30
+ runs-on : ubuntu-latest
31
+
32
+ strategy :
33
+ fail-fast : false # Show results for all projects even if some fail
34
+ matrix :
35
+ solution :
36
+ - path : " 02-SetupDevEnvironment/src/GetingReadySamples.sln"
37
+ name : " Setup Samples"
38
+ - path : " 03-CoreGenerativeAITechniques/src/CoreGenerativeAITechniques.sln"
39
+ name : " Core Techniques"
40
+ - path : " 04-PracticalSamples/src/Aspire.MCP.Sample.sln"
41
+ name : " Practical Samples"
42
+ - path : " 05-AppCreatedWithGenAI/HFMCP.GenImage/HFMCP.GenImage.sln"
43
+ name : " HFMCP GenImage App"
44
+ - path : " 05-AppCreatedWithGenAI/SpaceAINet/SpaceAINet.sln"
45
+ name : " SpaceAINet App"
46
+
47
+ steps :
48
+ - name : Checkout code
49
+ uses : actions/checkout@v4
50
+
51
+ - name : Setup .NET 9.0
52
+ uses : actions/setup-dotnet@v4
53
+ with :
54
+ dotnet-version : ' 9.0.x'
55
+
56
+ - name : Restore dependencies for ${{ matrix.solution.name }}
57
+ run : dotnet restore "${{ matrix.solution.path }}"
58
+
59
+ - name : Build ${{ matrix.solution.name }}
60
+ run : dotnet build "${{ matrix.solution.path }}" --no-restore --configuration Release --verbosity minimal
61
+
62
+ - name : Display build result
63
+ if : success()
64
+ run : echo "✅ ${{ matrix.solution.name }} build succeeded"
0 commit comments