From 60f2e3c369d37e383f5918a4e7c76d864fa9b271 Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:18:15 -0800 Subject: [PATCH 01/14] Update dotnet-build.yml --- .github/workflows/dotnet-build.yml | 65 ++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 1bf69e094..2eb77cc60 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -42,6 +42,7 @@ env: PathToCommunityToolkitCameraAnalyzersCodeFixCsproj: 'src/CommunityToolkit.Maui.Camera.Analyzers.CodeFixes/CommunityToolkit.Maui.Camera.Analyzers.CodeFixes.csproj' PathToCommunityToolkitMediaElementAnalyzersCodeFixCsproj: 'src/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes.csproj' PathToCommunityToolkitAnalyzersUnitTestCsproj: 'src/CommunityToolkit.Maui.Analyzers.UnitTests/CommunityToolkit.Maui.Analyzers.UnitTests.csproj' + PathToCommunityToolkitAnalyzersBenchmarkCsproj: 'src/CommunityToolkit.Maui.Analyzers.Benchmarks/CommunityToolkit.Maui.Analyzers.Benchmarks.csproj' DotNetMauiRollbackFile: 'https://maui.blob.core.windows.net/metadata/rollbacks/8.0.6.json' CommunityToolkitSampleApp_Xcode_Version: '16.2' CommunityToolkitLibrary_Xcode_Version: '16.2' @@ -60,10 +61,12 @@ jobs: - 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.CommunityToolkitSampleApp_Xcode_Version }}.app/Contents/Developer - - name: Install Latest .NET SDK - uses: actions/setup-dotnet@v3 + - name: Install Latest .NET SDK, v${{ env.LATEST_NET_VERSION }} + uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.LATEST_NET_VERSION }} @@ -119,10 +122,12 @@ jobs: - 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 - uses: actions/setup-dotnet@v3 + - name: Install .NET SDK v${{ env.TOOLKIT_NET_VERSION }} + uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.TOOLKIT_NET_VERSION }} @@ -198,8 +203,8 @@ jobs: id-token: write # Required for requesting the JWT steps: - - name: Install .NET SDK - uses: actions/setup-dotnet@v3 + - name: Install .NET SDK v${{ env.TOOLKIT_NET_VERSION }} + uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.TOOLKIT_NET_VERSION }} @@ -251,7 +256,7 @@ jobs: steps: - name: Install .NET SDK - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.TOOLKIT_NET_VERSION }} @@ -268,3 +273,49 @@ jobs: --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_PACKAGE_PUSH_TOKEN }} --skip-duplicate + + run_benchmarks: + name: Run Manchmarks + 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 }} + + - name: Install .NET MAUI Workload + run: dotnet workload install maui --skip-sign-check --source https://api.nuget.org/v3/index.json + + - 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: Benchamrks + path: | + ${{ runner.temp }}/**/*.md From 9e3d29a9feb7da389ce8c9e60ffb580abe8fb75f Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:18:45 -0800 Subject: [PATCH 02/14] Update dotnet-build.yml --- .github/workflows/dotnet-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 2eb77cc60..0d0619dc9 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -275,7 +275,7 @@ jobs: --skip-duplicate run_benchmarks: - name: Run Manchmarks + name: Run Benchmarks runs-on: ${{ matrix.os }} strategy: matrix: From ae4951ea1d89fdfa05df9ea2f48a9451aaebb3a7 Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:22:11 -0800 Subject: [PATCH 03/14] Update dotnet-build.yml --- .github/workflows/dotnet-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 0d0619dc9..e719572b4 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -1,4 +1,4 @@ -name: .NET +name: .NET MAUI Community Toolkit CI/CD Pipeline on: push: From d335c30e52e955b7ee0e654442ca21e23e64b049 Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:23:03 -0800 Subject: [PATCH 04/14] Update dotnet-build.yml --- .github/workflows/dotnet-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index e719572b4..f7d9b336c 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -1,4 +1,4 @@ -name: .NET MAUI Community Toolkit CI/CD Pipeline +name: .NET MAUI Community Toolkit on: push: From 947b5142304e36aac7f6c2f72e65bafce0e1c69a Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:23:24 -0800 Subject: [PATCH 05/14] Update .github/workflows/dotnet-build.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/dotnet-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index f7d9b336c..dcbe6f084 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -316,6 +316,6 @@ jobs: if: runner.os == 'Windows' uses: actions/upload-artifact@v4 with: - name: Benchamrks + name: Benchmarks path: | ${{ runner.temp }}/**/*.md From ac54fc254658e44372206e7dad7fd57f77314032 Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:30:56 -0800 Subject: [PATCH 06/14] Update dotnet-build.yml --- .github/workflows/dotnet-build.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index dcbe6f084..300dbf1c6 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -43,7 +43,6 @@ env: PathToCommunityToolkitMediaElementAnalyzersCodeFixCsproj: 'src/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes.csproj' PathToCommunityToolkitAnalyzersUnitTestCsproj: 'src/CommunityToolkit.Maui.Analyzers.UnitTests/CommunityToolkit.Maui.Analyzers.UnitTests.csproj' PathToCommunityToolkitAnalyzersBenchmarkCsproj: 'src/CommunityToolkit.Maui.Analyzers.Benchmarks/CommunityToolkit.Maui.Analyzers.Benchmarks.csproj' - DotNetMauiRollbackFile: 'https://maui.blob.core.windows.net/metadata/rollbacks/8.0.6.json' CommunityToolkitSampleApp_Xcode_Version: '16.2' CommunityToolkitLibrary_Xcode_Version: '16.2' @@ -69,9 +68,12 @@ jobs: 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 + run: | + dotnet workload install maui + dotnet workload update - name: Install Tizen Workload run: | @@ -88,6 +90,8 @@ jobs: build_library: name: Build Library runs-on: ${{ matrix.os }} + env: + VSTEST_TESTHOST_SHUTDOWN_TIMEOUT: 1100 # Set your desired timeout value here strategy: matrix: os: [windows-latest, macos-15] @@ -130,9 +134,12 @@ jobs: 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 --skip-sign-check --source https://api.nuget.org/v3/index.json + run: | + dotnet workload install maui + dotnet workload update - name: Install Tizen Workload run: | @@ -207,6 +214,7 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.TOOLKIT_NET_VERSION }} + dotnet-quality: 'ga' - name: Download NuGet List uses: actions/download-artifact@v4 @@ -259,6 +267,7 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.TOOLKIT_NET_VERSION }} + dotnet-quality: 'ga' - name: Download signed packages for ${{ matrix.platform }} uses: actions/download-artifact@v4 @@ -296,9 +305,12 @@ jobs: 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 --skip-sign-check --source https://api.nuget.org/v3/index.json + run: | + dotnet workload install maui + dotnet workload update - name: Install Tizen Workload run: | From d7a63083f085ab20c8e400a747154e04fd8b8768 Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:39:26 -0800 Subject: [PATCH 07/14] Update dotnet-build.yml --- .github/workflows/dotnet-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 300dbf1c6..a1c771cf0 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -91,7 +91,7 @@ jobs: name: Build Library runs-on: ${{ matrix.os }} env: - VSTEST_TESTHOST_SHUTDOWN_TIMEOUT: 1100 # Set your desired timeout value here + VSTEST_TESTHOST_SHUTDOWN_TIMEOUT: 1100 # Fixes "The active test run was aborted. Reason: Test host process crashed" strategy: matrix: os: [windows-latest, macos-15] From 73cd76a70c5c613d1d276c26e21a5076c4c5dfaa Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:13:46 -0800 Subject: [PATCH 08/14] Build Each Project Separately --- .github/workflows/dotnet-build.yml | 43 ++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index a1c771cf0..fad7e88e5 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -150,8 +150,47 @@ jobs: - name: Display dotnet info run: dotnet --info - - name: Build CommunityToolkit.Maui - run: dotnet build -c Release ${{ env.PathToLibrarySolution }} + - name: 'Build CommunityToolkit.Maui.Analyzers' + run: ${{ env.PathToCommunityToolkitAnalyzersCsproj }} + + - name: 'Build CommunityToolkit.Maui.Analyzers.CodeFixes' + run: ${{ env.PathToCommunityToolkitAnalyzersCodeFixCsproj }} + + - name: 'Build CommunityToolkit.Maui.Camera.Analyzers' + run: ${{ env.PathToCommunityToolkitCameraAnalyzersCsproj }} + + - name: 'Build CommunityToolkit.Maui.Camera.Analyzers.CodeFixes' + run: ${{ env.PathToCommunityToolkitCameraAnalyzersCodeFixCsproj }} + + - name: 'Build CommunityToolkit.Maui.MediaElement.Analyzers' + run: ${{ env.PathToCommunityToolkitMediaElementAnalyzersCsproj }} + + - name: 'Build CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes' + run: ${{ env.PathToCommunityToolkitMediaElementAnalyzersCodeFixCsproj }} + + - name: 'Build CommunityToolkit.Maui.SourceGenerators' + run: ${{ env.PathToCommunityToolkitSourceGeneratorsCsproj }} + + - name: 'Build CommunityToolkit.SourceGenerators.Internal' + run: ${{ env.PathToCommunityToolkitSourceGeneratorsInternalCsproj }} + + - name: 'Build CommunityToolkit.Maui.Camera' + run: ${{ env.PathToCommunityToolkitCameraCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionCamera }} -p:Version=${{ env.NugetPackageVersion }} + + - name: 'Build CommunityToolkit.Maui.MediaElement' + run: ${{ env.PathToCommunityToolkitMediaElementCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionMediaElement }} -p:Version=${{ env.NugetPackageVersion }} + + - name: 'Build CommunityToolkit.Maui.Maps' + run: ${{ env.PathToCommunityToolkitMapsCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionMaps }} -p:Version=${{ env.NugetPackageVersion }} + + - name: 'Build CommunityToolkit.Maui.Core' + run: ${{ env.PathToCommunityToolkitCoreCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} + + - name: 'Build CommunityToolkit.Maui' + run: ${{ env.PathToCommunityToolkitCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} + + - name: 'Run CommunityToolkit.Maui.Analyzers.UnitTests' + run: 'dotnet test ${{ env.PathToCommunityToolkitAnalyzersUnitTestCsproj }} -c Release' - name: Run CommunityToolkit.Maui.UnitTests run: dotnet test -c Release ${{ env.PathToLibrarySolution }} --settings ".runsettings" --collect "XPlat code coverage" --logger trx --results-directory ${{ runner.temp }} From 544d1ba2e3546d85bc91b742e8381ea53a3e629d Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:20:24 -0800 Subject: [PATCH 09/14] Fix `dotnet build` command --- .github/workflows/dotnet-build.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index fad7e88e5..bc833e549 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -151,43 +151,43 @@ jobs: run: dotnet --info - name: 'Build CommunityToolkit.Maui.Analyzers' - run: ${{ env.PathToCommunityToolkitAnalyzersCsproj }} + run: dotnet build ${{ env.PathToCommunityToolkitAnalyzersCsproj }} -c Release - name: 'Build CommunityToolkit.Maui.Analyzers.CodeFixes' - run: ${{ env.PathToCommunityToolkitAnalyzersCodeFixCsproj }} + run: dotnet build ${{ env.PathToCommunityToolkitAnalyzersCodeFixCsproj }} -c Release - name: 'Build CommunityToolkit.Maui.Camera.Analyzers' - run: ${{ env.PathToCommunityToolkitCameraAnalyzersCsproj }} + run: dotnet build ${{ env.PathToCommunityToolkitCameraAnalyzersCsproj }} -c Release - name: 'Build CommunityToolkit.Maui.Camera.Analyzers.CodeFixes' - run: ${{ env.PathToCommunityToolkitCameraAnalyzersCodeFixCsproj }} + run: dotnet build ${{ env.PathToCommunityToolkitCameraAnalyzersCodeFixCsproj }} -c Release - name: 'Build CommunityToolkit.Maui.MediaElement.Analyzers' - run: ${{ env.PathToCommunityToolkitMediaElementAnalyzersCsproj }} + run: dotnet build ${{ env.PathToCommunityToolkitMediaElementAnalyzersCsproj }} -c Release - name: 'Build CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes' - run: ${{ env.PathToCommunityToolkitMediaElementAnalyzersCodeFixCsproj }} + run: dotnet build ${{ env.PathToCommunityToolkitMediaElementAnalyzersCodeFixCsproj }} -c Release - name: 'Build CommunityToolkit.Maui.SourceGenerators' - run: ${{ env.PathToCommunityToolkitSourceGeneratorsCsproj }} + run: dotnet build ${{ env.PathToCommunityToolkitSourceGeneratorsCsproj }} -c Release - name: 'Build CommunityToolkit.SourceGenerators.Internal' - run: ${{ env.PathToCommunityToolkitSourceGeneratorsInternalCsproj }} + run: dotnet build ${{ env.PathToCommunityToolkitSourceGeneratorsInternalCsproj }} -c Release - name: 'Build CommunityToolkit.Maui.Camera' - run: ${{ env.PathToCommunityToolkitCameraCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionCamera }} -p:Version=${{ env.NugetPackageVersion }} + run: dotnet build ${{ env.PathToCommunityToolkitCameraCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionCamera }} -p:Version=${{ env.NugetPackageVersion }} - name: 'Build CommunityToolkit.Maui.MediaElement' - run: ${{ env.PathToCommunityToolkitMediaElementCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionMediaElement }} -p:Version=${{ env.NugetPackageVersion }} + run: dotnet build ${{ env.PathToCommunityToolkitMediaElementCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionMediaElement }} -p:Version=${{ env.NugetPackageVersion }} - name: 'Build CommunityToolkit.Maui.Maps' - run: ${{ env.PathToCommunityToolkitMapsCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionMaps }} -p:Version=${{ env.NugetPackageVersion }} + run: dotnet build ${{ env.PathToCommunityToolkitMapsCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersionMaps }} -p:Version=${{ env.NugetPackageVersion }} - name: 'Build CommunityToolkit.Maui.Core' - run: ${{ env.PathToCommunityToolkitCoreCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} + run: dotnet build ${{ env.PathToCommunityToolkitCoreCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} - name: 'Build CommunityToolkit.Maui' - run: ${{ env.PathToCommunityToolkitCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} + run: dotnet build ${{ env.PathToCommunityToolkitCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} - name: 'Run CommunityToolkit.Maui.Analyzers.UnitTests' run: 'dotnet test ${{ env.PathToCommunityToolkitAnalyzersUnitTestCsproj }} -c Release' From 764a265e3964969ff99e985cb452cf47568bfb04 Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Sun, 19 Jan 2025 08:29:15 -0800 Subject: [PATCH 10/14] Remove duplicate test --- .github/workflows/dotnet-build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index bc833e549..fde1b8ee3 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -189,9 +189,6 @@ jobs: - name: 'Build CommunityToolkit.Maui' run: dotnet build ${{ env.PathToCommunityToolkitCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} - - name: 'Run CommunityToolkit.Maui.Analyzers.UnitTests' - run: 'dotnet test ${{ env.PathToCommunityToolkitAnalyzersUnitTestCsproj }} -c Release' - - name: Run CommunityToolkit.Maui.UnitTests run: dotnet test -c Release ${{ env.PathToLibrarySolution }} --settings ".runsettings" --collect "XPlat code coverage" --logger trx --results-directory ${{ runner.temp }} From 2deed8a03ef1982075dfe03c58b6615a6b654594 Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Sun, 19 Jan 2025 08:47:49 -0800 Subject: [PATCH 11/14] Update naming --- .github/workflows/dotnet-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index fde1b8ee3..7d43c37c7 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -187,9 +187,9 @@ jobs: run: dotnet build ${{ env.PathToCommunityToolkitCoreCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} - name: 'Build CommunityToolkit.Maui' - run: dotnet build ${{ env.PathToCommunityToolkitCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} + run: dotnet build ${{ env.PathToLibrarySolution }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }} - - name: Run CommunityToolkit.Maui.UnitTests + - name: Run All Unit Tests run: dotnet test -c Release ${{ env.PathToLibrarySolution }} --settings ".runsettings" --collect "XPlat code coverage" --logger trx --results-directory ${{ runner.temp }} - name: Publish Test Results From 54e09209fa10b0b55590c2334485bfeb3434a58c Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Wed, 22 Jan 2025 16:01:36 -0800 Subject: [PATCH 12/14] Move `run_benchmarks` to `benchmarks.yml` --- .github/workflows/benchmarks.yml | 64 ++++++++++++++++++++++++++++++ .github/workflows/dotnet-build.yml | 51 +----------------------- 2 files changed, 65 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/benchmarks.yml diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml new file mode 100644 index 000000000..41494bfb0 --- /dev/null +++ b/.github/workflows/benchmarks.yml @@ -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 diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 7d43c37c7..56a25b3dc 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -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 \ No newline at end of file From 6bd991aaeac31cfba8100e73f2f4d83e4876f92b Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Wed, 22 Jan 2025 16:03:25 -0800 Subject: [PATCH 13/14] Update Naming --- .github/workflows/benchmarks.yml | 3 ++- .github/workflows/dotnet-build.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 41494bfb0..cfbfed899 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,4 +1,4 @@ -name: .NET MAUI Community Toolkit +name: Run Benchmarks on: push: @@ -29,6 +29,7 @@ jobs: uses: actions/checkout@main - uses: maxim-lobanov/setup-xcode@v1 + if: runner.os == 'macOS' with: xcode-version: latest-stable diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 56a25b3dc..87a4224aa 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -1,4 +1,4 @@ -name: .NET MAUI Community Toolkit +name: Build Libraries + Samples on: push: From bd9f02ea919e3089643c328f84dafa86a9253563 Mon Sep 17 00:00:00 2001 From: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Date: Wed, 22 Jan 2025 16:05:24 -0800 Subject: [PATCH 14/14] Update Naming --- .github/workflows/benchmarks.yml | 2 +- .github/workflows/dotnet-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index cfbfed899..505cb261a 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,4 +1,4 @@ -name: Run Benchmarks +name: Benchmarks on: push: diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 87a4224aa..d556bbbaa 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -1,4 +1,4 @@ -name: Build Libraries + Samples +name: Build on: push: