cpp-packaging.yml: install patch.exe via choco on Windows #1005
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a workaround for the
patch.exe
from Strawberry Perl crashing when attempting to patch snappy athttps://github.com/firebase/firebase-ios-sdk/blob/4cf275ff08a5998da1712f7eb8bb0f613d73b97e/cmake/external/snappy.cmake#L37
The upgrade of the firebase-ios-sdk dependency from 9.1.0 to 9.2.0 in #1003 caused some GitHub Actions Windows runners to fail to build with this error:
Note that #1003 has some special logic in 77f3e70 to remove the patching of the "snappy" library.
The problem appears to be that the GitHub Actions runners use the patch command that is bundled with Strawberry Perl, which cannot seem to handle the patch file format and crashes.
This PR attempts to fix the issue by installing the latest version of GNU patch using Chocolatey, in hopes that it will be chosen instead of the one from Strawberry Perl.
Googlers see b/236958574 for full details.