Skip to content

Commit

Permalink
Move run_benchmarks to benchmarks.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
brminnick committed Jan 23, 2025
1 parent b657674 commit 54e0920
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 50 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: .NET MAUI Community Toolkit

on:
push:
branches:
- main
tags:
- '*'
paths-ignore:
- README.md
pull_request:
branches:
- '*'

env:
LATEST_NET_VERSION: '9.0.x'
PathToCommunityToolkitAnalyzersBenchmarkCsproj: 'src/CommunityToolkit.Maui.Analyzers.Benchmarks/CommunityToolkit.Maui.Analyzers.Benchmarks.csproj'

jobs:
run_benchmarks:
name: Run Benchmarks
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-15]

steps:
- name: Checkout code
uses: actions/checkout@main

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Install Latest Version of .NET, v${{ env.LATEST_NET_VERSION }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.LATEST_NET_VERSION }}
dotnet-quality: 'ga'

- name: Install .NET MAUI Workload
run: |
dotnet workload install maui
dotnet workload update
- name: Install Tizen Workload
run: |
Invoke-WebRequest 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1'
.\workload-install.ps1
shell: pwsh

- name: Display dotnet info
run: dotnet --info

- name: Run Benchmarks
run: dotnet run --project ${{ env.PathToCommunityToolkitAnalyzersBenchmarkCsproj }} -c Release -- -a ${{ runner.temp }}

- name: Publish Benchmarks
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: Benchmarks
path: |
${{ runner.temp }}/**/*.md
51 changes: 1 addition & 50 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,53 +317,4 @@ jobs:
**/*.nupkg
--source https://api.nuget.org/v3/index.json
--api-key ${{ secrets.NUGET_PACKAGE_PUSH_TOKEN }}
--skip-duplicate
run_benchmarks:
name: Run Benchmarks
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-15]

steps:
- name: Checkout code
uses: actions/checkout@main

- name: Set Xcode version
if: runner.os == 'macOS'
run: |
echo Installed Xcode Versions:
ls -al /Applications | grep Xcode
sudo xcode-select --switch /Applications/Xcode_${{ env.CommunityToolkitLibrary_Xcode_Version }}.app/Contents/Developer
- name: Install .NET SDK v${{ env.TOOLKIT_NET_VERSION }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.TOOLKIT_NET_VERSION }}
dotnet-quality: 'ga'

- name: Install .NET MAUI Workload
run: |
dotnet workload install maui
dotnet workload update
- name: Install Tizen Workload
run: |
Invoke-WebRequest 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1'
.\workload-install.ps1
shell: pwsh

- name: Display dotnet info
run: dotnet --info

- name: Run Benchmarks
run: dotnet run --project ${{ env.PathToCommunityToolkitAnalyzersBenchmarkCsproj }} -c Release -- -a ${{ runner.temp }}

- name: Publish Benchmarks
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: Benchmarks
path: |
${{ runner.temp }}/**/*.md
--skip-duplicate

0 comments on commit 54e0920

Please sign in to comment.