|
1 | 1 | name: Benchmarks |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - main |
7 | | - tags: |
8 | | - - '*' |
9 | | - paths-ignore: |
10 | | - - README.md |
11 | | - pull_request: |
12 | | - branches: |
13 | | - - '*' |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + tags: |
| 8 | + - '*' |
| 9 | + paths-ignore: |
| 10 | + - README.md |
| 11 | + pull_request: |
| 12 | + branches: |
| 13 | + - '*' |
14 | 14 |
|
15 | 15 | env: |
16 | | - LATEST_NET_VERSION: '10.0.x' |
17 | | - PathToCommunityToolkitAnalyzersBenchmarkCsproj: 'src/CommunityToolkit.Maui.Analyzers.Benchmarks/CommunityToolkit.Maui.Analyzers.Benchmarks.csproj' |
| 16 | + LATEST_NET_VERSION: '10.0.x' |
| 17 | + PathToCommunityToolkitAnalyzersBenchmarkCsproj: 'src/CommunityToolkit.Maui.Analyzers.Benchmarks/CommunityToolkit.Maui.Analyzers.Benchmarks.csproj' |
18 | 18 |
|
19 | 19 | concurrency: |
20 | | - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
21 | | - cancel-in-progress: true |
| 20 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 21 | + cancel-in-progress: true |
22 | 22 |
|
23 | 23 | jobs: |
24 | | - run_benchmarks: |
25 | | - name: Run Benchmarks |
26 | | - runs-on: ${{ matrix.os }} |
27 | | - strategy: |
28 | | - fail-fast: false |
29 | | - matrix: |
30 | | - os: [windows-latest, macos-26] |
| 24 | + run_benchmarks: |
| 25 | + name: Run Benchmarks |
| 26 | + runs-on: ${{ matrix.os }} |
| 27 | + strategy: |
| 28 | + fail-fast: false |
| 29 | + matrix: |
| 30 | + os: [ windows-latest, macos-26 ] |
| 31 | + |
| 32 | + steps: |
| 33 | + - name: Checkout code |
| 34 | + uses: actions/checkout@main |
31 | 35 |
|
32 | | - steps: |
33 | | - - name: Checkout code |
34 | | - uses: actions/checkout@main |
| 36 | + - uses: maxim-lobanov/setup-xcode@v1 |
| 37 | + if: runner.os == 'macOS' |
| 38 | + with: |
| 39 | + xcode-version: latest-stable |
35 | 40 |
|
36 | | - - uses: maxim-lobanov/setup-xcode@v1 |
37 | | - if: runner.os == 'macOS' |
38 | | - with: |
39 | | - xcode-version: latest-stable |
| 41 | + - name: Install Latest Version of .NET, v${{ env.LATEST_NET_VERSION }} |
| 42 | + uses: actions/setup-dotnet@v5 |
| 43 | + with: |
| 44 | + dotnet-version: ${{ env.LATEST_NET_VERSION }} |
| 45 | + dotnet-quality: 'ga' |
40 | 46 |
|
41 | | - - name: Install Latest Version of .NET, v${{ env.LATEST_NET_VERSION }} |
42 | | - uses: actions/setup-dotnet@v5 |
43 | | - with: |
44 | | - dotnet-version: ${{ env.LATEST_NET_VERSION }} |
45 | | - dotnet-quality: 'ga' |
| 47 | + - name: Install .NET MAUI Workload |
| 48 | + run: | |
| 49 | + dotnet workload install maui |
| 50 | + dotnet workload update |
46 | 51 |
|
47 | | - - name: Install .NET MAUI Workload |
48 | | - run: | |
49 | | - dotnet workload install maui |
50 | | - dotnet workload update |
| 52 | + - name: Install Tizen Workload |
| 53 | + run: | |
| 54 | + Invoke-WebRequest 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1' |
| 55 | + .\workload-install.ps1 |
| 56 | + shell: pwsh |
51 | 57 |
|
52 | | - - name: Install Tizen Workload |
53 | | - run: | |
54 | | - Invoke-WebRequest 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1' |
55 | | - .\workload-install.ps1 |
56 | | - shell: pwsh |
| 58 | + - name: Display dotnet info |
| 59 | + run: dotnet --info |
57 | 60 |
|
58 | | - - name: Display dotnet info |
59 | | - run: dotnet --info |
| 61 | + - name: Run Benchmarks |
| 62 | + run: dotnet run --project ${{ env.PathToCommunityToolkitAnalyzersBenchmarkCsproj }} -c Release -- -a ${{ runner.temp }} |
60 | 63 |
|
61 | | - - name: Run Benchmarks |
62 | | - run: dotnet run --project ${{ env.PathToCommunityToolkitAnalyzersBenchmarkCsproj }} -c Release -- -a ${{ runner.temp }} |
63 | | - |
64 | | - - name: Publish Benchmarks |
65 | | - if: runner.os == 'Windows' |
66 | | - uses: actions/upload-artifact@v5 |
67 | | - with: |
68 | | - name: Benchmarks |
69 | | - path: | |
70 | | - ${{ runner.temp }}/**/*.md |
| 64 | + - name: Publish Benchmarks |
| 65 | + if: runner.os == 'Windows' |
| 66 | + uses: actions/upload-artifact@v5 |
| 67 | + with: |
| 68 | + name: Benchmarks |
| 69 | + path: | |
| 70 | + ${{ runner.temp }}/**/*.md |
0 commit comments