Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Benchmarks | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| tags: | ||
| - '*' | ||
| paths-ignore: | ||
| - README.md | ||
| pull_request: | ||
| branches: | ||
| - '*' | ||
| env: | ||
| LATEST_NET_VERSION: '9.0.x' | ||
| PathToCommunityToolkitBenchmarkCsproj: 'src/CommunityToolkit.Maui.Markup.Benchmarks/CommunityToolkit.Maui.Markup.Benchmarks.csproj' | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| job: run_benchmarks | ||
| displayName: Run Benchmarks | ||
| strategy: | ||
| matrix: | ||
| 'Windows': | ||
| image: 'windows-latest' | ||
| 'macOS': | ||
| image: 'macos-15' | ||
| pool: | ||
| vmImage: $(image) | ||
| steps: | ||
| - task: CmdLine@2 | ||
| displayName: 'Set Xcode v$(Xcode_Version)' | ||
| condition: eq(variables['Agent.OS'], 'Darwin') # Only run this step on macOS | ||
| inputs: | ||
| script: | | ||
| echo Installed Xcode Versions: | ||
| ls -al /Applications | grep Xcode | ||
| echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_$(Xcode_Version).app | ||
| sudo xcode-select --switch /Applications/Xcode_$(Xcode_Version).app/Contents/Developer | ||
| xcodebuild -downloadPlatform iOS | ||
| echo Installed Simulator SDKs: | ||
| xcodebuild -showsdks | ||
| - task: UseDotNet@2 | ||
| displayName: 'Install .NET SDK' | ||
| inputs: | ||
| packageType: 'sdk' | ||
| version: '$(NET_VERSION)' | ||
| includePreviewVersions: false | ||
| - task: CmdLine@2 | ||
| displayName: 'Install .NET MAUI Workload' | ||
| inputs: | ||
| script : 'dotnet workload install maui' | ||
| - pwsh: | | ||
| Invoke-WebRequest 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1' | ||
| .\workload-install.ps1 | ||
| displayName: Install Tizen Workload | ||
| # Print Information on the .NET SDK Used By the CI Build Host | ||
| # These logs are useful information when debugging CI Builds | ||
| # Note: This step doesn't execute nor modify any code; it is strictly used for logging + debugging purposes | ||
| - task: CmdLine@2 | ||
| displayName: 'Display dotnet --info' | ||
| inputs: | ||
| script: dotnet --info | ||
| - task: CmdLine@2 | ||
| displayName: 'Run Benchmarks' | ||
| inputs: | ||
| script : 'dotnet run --project $(PathToCommunityToolkitBenchmarkCsproj) -c Release -- -a $(Build.ArtifactStagingDirectory)' | ||
| # publish the Benchmark Results | ||
| - task: PublishBuildArtifacts@1 | ||
| condition: eq(variables['Agent.OS'], 'Windows_NT') # Only run this step on Windows | ||
| displayName: 'Publish Benchmark Artifacts' | ||
| inputs: | ||
| artifactName: benchmarks | ||
| pathToPublish: '$(Build.ArtifactStagingDirectory)' | ||