Skip to content

Conversation

@TheCodeTraveler
Copy link
Collaborator

@TheCodeTraveler TheCodeTraveler commented Jan 17, 2025

This PR adds the Run Benchmarks step to the GitHub Actions CI/CD Workflow.

Additional Information
This PR also adds the following housekeeping updates to the GitHub Actions CI/CD Workflow:

  • actions/setup-dotnet
    • Update to v4
    • Add dotnet-quality: 'ga'
      • This ensures the build step does not install a preview version of .NET
  • Install .NET MAUI Workload
    • Add dotnet workload update following dotnet workload install maui
      • This is a workaround I've found to ensure pre-installed .NET workloads on the hosted agent are up-to-date
      • It's helped us fix CI/CD errors in the past
  • Set Xcode version
    • Print the installed version of Xcode
      • This helps us identify when new versions of Xcode are supported in the hosted agents
      • This also helps us understand if this step fails when a hosted agent is running an old version of macOS that does not yet include the needed version of Xcode
  • build_library
    • Add env: VSTEST_TESTHOST_SHUTDOWN_TIMEOUT: 1100
      • This fixes "The active test run was aborted. Reason: Test host process crashed "
  • Build each project individually
    • Yes, it's redundant since dotnet pack first builds the csproj file, however, building each project individually makes it easier for us to quickly identify which project is throwing a compiler error and whether the error is occurring on dotnet build step or on dotnet pack

Copilot AI review requested due to automatic review settings January 17, 2025 23:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

TheCodeTraveler and others added 2 commits January 17, 2025 15:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@TheCodeTraveler TheCodeTraveler marked this pull request as draft January 17, 2025 23:31
@TheCodeTraveler TheCodeTraveler marked this pull request as ready for review January 17, 2025 23:54
@TheCodeTraveler TheCodeTraveler enabled auto-merge (squash) January 17, 2025 23:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

name: Build Library
runs-on: ${{ matrix.os }}
env:
VSTEST_TESTHOST_SHUTDOWN_TIMEOUT: 1100 # Fixes "The active test run was aborted. Reason: Test host process crashed"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have this issue on new pipeline?
I also curious if this variable is specific to Azure Pipelines or exists in Github.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha - I wish I knew the answer to that!

I don't have direct evidence that supports whether we still need it in GitHub Actions or not, but I'd kinda rather keep it just in case since it doesn't introduce any adverse effects to the pipeline and it may save us headaches in the future.

run: dotnet build ${{ env.PathToCommunityToolkitCoreCsproj }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }}

- name: 'Build CommunityToolkit.Maui'
run: dotnet build ${{ env.PathToLibrarySolution }} -c Release -p:PackageVersion=${{ env.NugetPackageVersion }} -p:Version=${{ env.NugetPackageVersion }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a library, not solution

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the Library SLN on purpose to help ensure the pipeline always builds all of the projects.

In the future, a PR may add a new library but forget to update the pipeline. This ensures that the pipeline will still compile the new code until we remember to add it as a separate step.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, in that case I still don't see the benefit of building each project individually to build the whole solution later.
I have no strong objections merging the PR, but I still voting keeping it as simple as possible (less code). Once we get the issue with build investigation we can back to the changes.

@TheCodeTraveler TheCodeTraveler merged commit fbfd456 into main Jan 23, 2025
15 of 17 checks passed
@TheCodeTraveler TheCodeTraveler deleted the Add-Benchmarks-to-GitHub-Actions branch January 23, 2025 04:11
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants