Skip to content

Commit 88048ec

Browse files
Merge pull request #1 from syncfusion/main
Update build.yml for Azure Pipelines
2 parents 9af801a + fd1dae0 commit 88048ec

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

pipelines/build.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,44 @@ pr:
33
branches:
44
include:
55
- '*' # Allow PR builds from any branch (including forks)
6-
6+
77
pool:
88
vmImage: 'windows-2022'
99

1010
steps:
11-
11+
# Step 1: Install .NET 9.0 SDK
12+
- task: UseDotNet@2
13+
inputs:
14+
packageType: 'sdk'
15+
version: '9.0.x' # Use the latest .NET 9.0 SDK version
16+
installationPath: $(Agent.ToolsDirectory)/dotnet
17+
18+
# Step 2: Verify .NET SDK Installation
19+
- script: |
20+
dotnet --info
21+
displayName: 'Check .NET SDK Versions'
22+
23+
# Step 3: Install Required Workloads for .NET MAUI
24+
- script: |
25+
dotnet workload install maui
26+
displayName: 'Install .NET MAUI Workloads'
27+
28+
# Step 4: Build the Solution
1229
- script: |
1330
cd $(Agent.BuildDirectory)/s/
1431
dotnet build -c Release
15-
displayName: 'Build the solution'
16-
32+
displayName: 'Build the Solution'
33+
34+
# Step 5: Run Unit Tests and Generate HTML Report
1735
- script: |
1836
cd $(Agent.BuildDirectory)/s/maui/tests/Syncfusion.Maui.Toolkit.UnitTest/
1937
dotnet test --logger "html;logfilename=UnitTestResults.html"
2038
displayName: 'Perform Unit Tests'
21-
39+
40+
# Step 6: Publish Test Results
2241
- task: PublishBuildArtifacts@1
2342
inputs:
24-
PathtoPublish: 'D:\a\1\s\maui\tests\Syncfusion.Maui.Toolkit.UnitTest\TestResults'
43+
PathtoPublish: '$(Agent.BuildDirectory)/s/maui/tests/Syncfusion.Maui.Toolkit.UnitTest/TestResults'
2544
ArtifactName: 'UnitTestResults'
2645
publishLocation: 'Container'
2746
displayName: 'Publish Test Results HTML'

0 commit comments

Comments
 (0)