1+ name : CI
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ env :
8+ WORKING_DIR : ${{ github.workspace }}
9+ SOLUTION_PATH : ' ${{ github.workspace }}\Riverside.CompilerPlatform.slnx'
10+
11+ jobs :
12+ build :
13+ runs-on : windows-latest
14+
15+ strategy :
16+ fail-fast : false
17+ matrix :
18+ configuration : [CSharp, VisualBasic]
19+ project : [Analyzers, CodeFixers, HighPerformance, SourceGenerators]
20+
21+ env :
22+ PROJECT : ${{ matrix.project }}
23+ CONFIGURATION : ${{ matrix.configuration }}
24+ PROJECT_DIR : ${{ github.workspace }}\src\Riverside.CompilerPlatform.${{ matrix.project }}
25+
26+ steps :
27+
28+ - name : Checkout the repository
29+ uses : actions/checkout@v4
30+ - name : Setup MSBuild
31+ uses : microsoft/setup-msbuild@v2
32+ - name : Setup NuGet
33+ uses : NuGet/setup-nuget@v2
34+ - name : Setup .NET
35+ uses : actions/setup-dotnet@v4
36+ with :
37+ dotnet-version : 9.x
38+
39+ - name : Restore
40+ run : |
41+ msbuild $env:SOLUTION_PATH /t:Restore /p:Configuration=$env:CONFIGURATION
42+
43+ - name : Build
44+ run : |
45+ msbuild $env:PROJECT_DIR /t:Build /p:Configuration=$env:CONFIGURATION
46+
47+ test :
48+ needs : [build]
49+
50+ runs-on : windows-latest
51+
52+ strategy :
53+ fail-fast : false
54+ matrix :
55+ configuration : [CSharp]
56+
57+ env :
58+ CONFIGURATION : ${{ matrix.configuration }}
59+ PROJECT_DIR : ${{ github.workspace }}\tests\Riverside.CompilerPlatform.${{ matrix.configuration }}.Tests
60+
61+ steps :
62+
63+ - name : Checkout the repository
64+ uses : actions/checkout@v4
65+ - name : Setup MSBuild
66+ uses : microsoft/setup-msbuild@v2
67+ - name : Setup NuGet
68+ uses : NuGet/setup-nuget@v2
69+ - name : Setup .NET
70+ uses : actions/setup-dotnet@v4
71+ with :
72+ dotnet-version : 9.x
73+
74+ - name : Restore
75+ run : |
76+ msbuild $env:SOLUTION_PATH /t:Restore /p:Configuration=$env:CONFIGURATION
77+
78+ - name : Build
79+ run : |
80+ msbuild $env:SOLUTION_PATH /t:Build /p:Configuration=$env:CONFIGURATION
81+
82+ - name : Test
83+ run : |
84+ dotnet test $env:PROJECT_DIR --configuration Release --no-build
0 commit comments