-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Note that PHP 7.4 and earlier requires windows-2019 #1
Conversation
GitHub recently removed vc15 from the windows-2022 image (see: actions/runner-images#9701).
README.md
Outdated
) | ||
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_} | ||
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache') | ||
# should be run twice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Care to clarify why it needs to run twice? :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd have to ask the OP in actions/runner-images#9701.
While experimenting with a solution on PHPC, I did get a successful build with removing the duplicate Start-Process
line as well as the first step that removes the component; however, I wasn't confident enough about those changes to rule out possible side effects.
That said, it's probably worth trying and if we run into any trouble I suppose we can always revise this after the fact. Opened mongodb/mongo-php-driver#1567 with some refactoring, and if that still passes I'll come back and refactor this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mongodb/mongo-php-driver#1567 looks good, so I've updated this PR to use a single, consolidated step.
$installPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" | ||
$component = "Microsoft.VisualStudio.Component.VC.v141.x86.x64" | ||
$args = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$installPath`"", '--add', $component, '--quiet', '--norestart', '--nocache') | ||
$process = Start-Process -FilePath cmd.exe -ArgumentList $args -Wait -PassThru -WindowStyle Hidden |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: capturing the return value of Start-Process
in a variable seems to suppress display of an ASCII table (for the process execution stats) in the workflow output. Therefore, I've left this in place.
GitHub recently removed vc15 from the windows-2022 image (see: actions/runner-images#9701).
The linked thread does discuss "Mitigation ways" to manually install missing toolsets, but I've yet to verify that. We recently encountered this in mongodb/mongo-php-driver#1555 (comment) and I'm in the process of fixing the
ext-mongodb
builds (tracked in PHPC-2388). I anticipate manual installation will be necessary in our case, since other parts of our release process will rely on windows-2022; however, that seems beyond the scope of this action's README.