Skip to content

Commit 54e0920

Browse files
Move run_benchmarks to benchmarks.yml
1 parent b657674 commit 54e0920

File tree

2 files changed

+65
-50
lines changed

2 files changed

+65
-50
lines changed

.github/workflows/benchmarks.yml

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

.github/workflows/dotnet-build.yml

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -317,53 +317,4 @@ jobs:
317317
**/*.nupkg
318318
--source https://api.nuget.org/v3/index.json
319319
--api-key ${{ secrets.NUGET_PACKAGE_PUSH_TOKEN }}
320-
--skip-duplicate
321-
322-
run_benchmarks:
323-
name: Run Benchmarks
324-
runs-on: ${{ matrix.os }}
325-
strategy:
326-
matrix:
327-
os: [windows-latest, macos-15]
328-
329-
steps:
330-
- name: Checkout code
331-
uses: actions/checkout@main
332-
333-
- name: Set Xcode version
334-
if: runner.os == 'macOS'
335-
run: |
336-
echo Installed Xcode Versions:
337-
ls -al /Applications | grep Xcode
338-
sudo xcode-select --switch /Applications/Xcode_${{ env.CommunityToolkitLibrary_Xcode_Version }}.app/Contents/Developer
339-
340-
- name: Install .NET SDK v${{ env.TOOLKIT_NET_VERSION }}
341-
uses: actions/setup-dotnet@v4
342-
with:
343-
dotnet-version: ${{ env.TOOLKIT_NET_VERSION }}
344-
dotnet-quality: 'ga'
345-
346-
- name: Install .NET MAUI Workload
347-
run: |
348-
dotnet workload install maui
349-
dotnet workload update
350-
351-
- name: Install Tizen Workload
352-
run: |
353-
Invoke-WebRequest 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1'
354-
.\workload-install.ps1
355-
shell: pwsh
356-
357-
- name: Display dotnet info
358-
run: dotnet --info
359-
360-
- name: Run Benchmarks
361-
run: dotnet run --project ${{ env.PathToCommunityToolkitAnalyzersBenchmarkCsproj }} -c Release -- -a ${{ runner.temp }}
362-
363-
- name: Publish Benchmarks
364-
if: runner.os == 'Windows'
365-
uses: actions/upload-artifact@v4
366-
with:
367-
name: Benchmarks
368-
path: |
369-
${{ runner.temp }}/**/*.md
320+
--skip-duplicate

0 commit comments

Comments
 (0)