Skip to content

Update to latest macos - #3974

Draft
corbob wants to merge 1 commit into
chocolatey:developfrom
corbob:3785-macos-latest
Draft

corbob wants to merge 1 commit into
chocolatey:developfrom
corbob:3785-macos-latest

Conversation

@corbob

@corbob corbob commented Nov 6, 2026

Copy link
Copy Markdown
Member

NOTE: This PR is draft as I need it to run in GitHub Actions to see if it's fixed the build.

Description Of Changes

  • Change the macos-build job in .github/workflows/build.yml and .github/workflows/test.yml from runs-on: macos-14 to runs-on: macos-latest.
  • Add an Install Mono step to both macOS jobs that runs brew install mono and then mono --version. It runs before the dotnet setup, the same way the Ubuntu jobs install Mono before building.

Motivation and Context

The macOS jobs were pinned to macos-14 in 17682ea as a temporary workaround. Newer macOS runner images don't include Mono, so the build couldn't run on them.

That workaround no longer works: GitHub retired the macos-14 images on November 2, 2026, so the pinned jobs can no longer run. macos-latest now points to the macOS 26 Arm64 image. That image still doesn't include Mono, but it does include Homebrew, and the Homebrew mono formula (6.14.1) has a ready-built package for macOS 26 on Arm64. Installing Mono at the start of the job lets the builds run on macos-latest, so they will keep up with future runner image updates instead of being pinned to a version that will be retired.

Testing

  1. TODO(author): Record the result of the macos-build job in the Chocolatey Builds workflow on this PR. That run on macos-latest is the test for this change.
  2. TODO(author): Optionally, run the Chocolatey Integration Tests workflow (test.yml) by hand and record the macos-build result. It only runs on a schedule or by manual dispatch, so the PR won't run it automatically.

Operating Systems Testing

  • macOS 26 (Arm64), GitHub Actions macos-latest runner, through this PR's CI. TODO(author): confirm once the run completes.

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v3 compatibility checked?
  • Significant design decisions: ADR has been created by a Chocolatey team member?
  • All items are complete on the Definition of Done.

Related Issue

Fixes #3785

@corbob
corbob force-pushed the 3785-macos-latest branch 3 times, most recently from 177c07e to 15b17d5 Compare November 6, 2026 22:56
The macos-14 runner images were retired from GitHub Actions on
November 2, 2026, so the macOS jobs pinned to them can no longer run.
The macos-latest image is Arm64 and does not include Mono.

Install Mono from the official universal package, which runs as x64
under Rosetta. Homebrew's Mono runs Arm-native, where the LibGit2Sharp
0.27 used by Cake.Git cannot load, as it has no osx-arm64 library.

Also include the runner architecture in the tools cache key, so tools
restored on one architecture are never run on another.
@corbob
corbob force-pushed the 3785-macos-latest branch from 15b17d5 to cfe7686 Compare November 6, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update GitHub Actions to use macos-latest and install mono

1 participant