actions / runner-images

GitHub Actions runner images
MIT License
9.32k stars 2.89k forks source link

macOS-latest workflows will use macOS-11 #4060

Closed miketimofeev closed 2 years ago

miketimofeev commented 2 years ago

Breaking changes

macOS-11 is ready to be the default version for the "macos-latest" label in GitHub Actions and Azure DevOps.

Target date

This change will be rolled out over a period of several weeks beginning on September, 15. We plan to complete the migration by November, 3 December, 13 January 14.

The motivation for the changes

GitHub Actions and Azure DevOps have supported macOS-11 in preview mode since October 2020, and starting from August 2021 macOS-11 is generally available for all customers. For almost a year we have monitored customer feedback to improve the macOS-11 image stability and now we are ready to set it as the latest.

Possible impact

The macOS-11 image has a different set of software than macOS-10.15. The most significant changes are listed in the table below:

Tool name macOS-10.15 macOS-11 Notes
R lang 4.* - R was not available for Big Sur when we prepared the image for the first time. Please use standard tool request process if the tool needs to be added
Virtualbox and Vagrant 6. and 2. - Virtualbox on macOS 11 requires security preferences changes, which can't be easily done. The PR with virtualbox is not yet merged https://github.com/actions/virtual-environments/pull/4010
Java 8(default)
11
12
13
8(default)
11
Due to our software guidelines we left only LTS versions on the image. If you need to use other versions of Java, consider using setup-java and Java tool installer tasks
Python toolcache 2.7
3.5
3.6
3.7
3.8
3.9
3.7
3.8
3.9
EOL python versions were deprecated
PyPy toolcache 2.7
3.6
3.7
2.7
3.7
Version 3.6 was deprecated as it won't receive any updates
Go toolcache 1.13
1.14
1.15
1.16
1.17
1.15
1.16
1.17
EOL go versions were deprecated
Xamarin.Mono 6.4 - 6.12 6.12 Old versions and versions incompatible with the pre-installed Xcodes were removed
Xamarin.iOS 13.2 - 14.10 13.20 - 14.20 Old versions and versions incompatible with the pre-installed Xcodes were removed
Xamarin.Mac 6.2 - 7.8 6.20 - 7.14 Old versions and versions incompatible with the pre-installed Xcodes were removed
Xamarin.Android 10.0 - 11.2 11.0 - 11.3 Old versions and versions incompatible with the pre-installed Xcodes were removed
Xcode 12.4 (default)
12.3
12.2
12.1.1
12.1
12.0.1
11.7
11.6
11.5
11.4.1
11.3.1
11.2.1
10.3
13.0 (beta)
12.5.1 (default)
12.5
12.4
11.7
Only OS-compatible versions left + the latest 11 version
Android SDK build-tools and platforms 24 - 31 27 - 31 Android Platforms and build tools < 27.0 were removed from image. Consider installation in runtime using sdkmanager

Virtual environments affected

Mitigation ways

If you see any issues with your workflows during this transition period:

chowarth commented 2 years ago

When doing a nuget restore on a xamarin solutions with windows, ios, and android I am getting ##[error]The nuget command failed with exit code(1) and error(/Users/runner/work/1/s/YYY/YYY.UWP/YYYY.UWP.csproj : error MSB4057: The target "_IsProjectRestoreSupported" does not exist in the project. It works if the vmImage version is 11.6, but not 11.6.1

We're also seeing this same issue today. So far I've not had much luck getting it sorted; using msbuild -t:restore allowed the NuGet restore to complete but caused the iOS build to fail (Android was fine) thinking that the packages/references weren't there.

TriplEight commented 2 years ago

using the macos-latest just got a job executed by image and my binary is no longer executable neither on macos-11 nor macos-10.5.

Please roll back your staging from production.

chevdor commented 2 years ago

FYI: I had CI runs this morning using macos-latest. They did run on MacOS 11. They produced binaries running in the runner but not valid on an Intel Mac running 11.6 (Big Sur).

Specifying macos-10.15 instead of macos-latest as suggested in the issue indeed solves the problem for now.

anders9ustafsson commented 2 years ago

When doing a nuget restore on a xamarin solutions with windows, ios, and android I am getting ##[error]The nuget command failed with exit code(1) and error(/Users/runner/work/1/s/YYY/YYY.UWP/YYYY.UWP.csproj : error MSB4057: The target "_IsProjectRestoreSupported" does not exist in the project. It works if the vmImage version is 11.6, but not 11.6.1

It seems like a temporary workaround is to add a dummy target in the UWP project file, i.e.

  <Target Name="_IsProjectRestoreSupported" />

I guess this workaround should be handled with caution, since I think including this target in the UWP project file will override correctly implemented instances of the _IsProjectRestoreSupported target. But until the original problem is fixed, this might be a better way forward e.g. than downgrading the Xamarin SDK.

MuddyChrisA commented 2 years ago

When doing a nuget restore on a xamarin solutions with windows, ios, and android I am getting ##[error]The nuget command failed with exit code(1) and error(/Users/runner/work/1/s/YYY/YYY.UWP/YYYY.UWP.csproj : error MSB4057: The target "_IsProjectRestoreSupported" does not exist in the project. It works if the vmImage version is 11.6, but not 11.6.1

It seems like a temporary workaround is to add a dummy target in the UWP project file, i.e.

  <Target Name="_IsProjectRestoreSupported" />

I guess this workaround should be handled with caution, since I think including this target in the UWP project file will override correctly implemented instances of the _IsProjectRestoreSupported target. But until the original problem is fixed, this might be a better way forward e.g. than downgrading the Xamarin SDK.

This does not work for me as it breaks my UWP build

Error WMC9999: Type universe cannot resolve assembly: System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

JoeDiesel40 commented 2 years ago

So running this would do what?

ramondeklein commented 2 years ago

Adding <Target Name="_IsProjectRestoreSupported" /> broke the UWP build when running in AppCenter.

anders9ustafsson commented 2 years ago

@ramondeklein @MuddyChrisA

Adding <Target Name="_IsProjectRestoreSupported" /> broke the UWP build when running in AppCenter.

I found a more sufficient workaround here. Instead of adding a dummy <Target />, when building the iOS or Android apps, the UWP project(s) is removed from the solution in the post-clone build script.

ramondeklein commented 2 years ago

@anders9ustafsson Love the hacks that people make to workaround this issue. :joy: My hack was a bit different. I patch out the <Target Name="_IsProjectRestoreSupported" /> using the appcenter-post-clone.sh script... Also works.

miketimofeev commented 2 years ago

Azure DevOps users have been fully migrated. Migration for GitHub actions users will be finished in the next 5-10 days.

JoeDiesel40 commented 2 years ago

🎊

On Tue, Dec 7, 2021, 2:53 PM Mikhail Timofeev @.***> wrote:

Azure DevOps users have been fully migrated. Migration for GitHub actions users will be finished in the next 5-10 days.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/actions/virtual-environments/issues/4060#issuecomment-988256157, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMCLEFX5MXSTFHVBCVZ7ODUPZX6DANCNFSM5DZFV56A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

edgiardina commented 2 years ago

Seeing an issue with our Azure Devops Build Pipeline. We have two pipelines, a CI pipeline and a release pipeline. The release pipeline signs the app for Store distribution, but otherwise is the same. the CI pipeline passes and the build pipeline fails. Pretty sure its related to the macOS 11 switch (both pipelines use macos-latest)

MTOUCH : error MT2101: Can't resolve the reference 'System.String CoreFoundation.CFString::FromHandle(System.IntPtr)', referenced from the method 'System.String Bind_TOCropViewController.TOCropToolbar::get_CancelTextButtonTitle()' in 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'.

The builds on Friday ran, the same commit that built friday fails with the above message. TOCropViewController is pulled from a nuget package we include.

UPDATE -- This build error appears to surface on macOS10.15 pipeline as well. Not sure how it can run locally, run in CI, but fail in build config /p:Platform=iPhone /p:BuildIpa=true (and pass with /p:Platform=iPhoneSimulator)

apologies after seeing the same issue on macOS 10.15 I am assuming this is just an unhappy coincidence

ghost commented 2 years ago

Some of my repos have been updated but others still on 11. I guess is slowly being rolled out to different repos?

miketimofeev commented 2 years ago

@filipworksdev correct, we migrate gradually. Sorry for the inconvenience!

miketimofeev commented 2 years ago

The migration is completed — all the jobs on macos-latest now run on macos-11.

ghost commented 2 years ago

My job doesn't run yet on macos-11 https://github.com/goblinengine/goblin/actions/runs/1730824706

miketimofeev commented 2 years ago

@filipworksdev the build took place 6 days ago, we finished the migration yesterday

iMonZ commented 2 years ago

@filipworksdev the build took place 6 days ago, we finished the migration yesterday

What about macOS 12?

ghost commented 2 years ago

@iMonZ @miketimofeev Guys you were right. Everything is done. The build was old. I did a fresh build and is all been ported. Is all good . Thank you everyone! Now I can finally use C++17 for iOS 👍