Skip to content

Commit 1cbeada

Browse files
Merge v1.19 into master (#1566)
2 parents b0c9638 + 69d4a72 commit 1cbeada

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/actions/windows/prepare-build/action.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,38 @@ outputs:
1717
runs:
1818
using: composite
1919
steps:
20+
# Reinstall VC15 (Visual Studio 2017) for PHP 7.4 using the suggested script
21+
# from https://github.com/actions/runner-images/issues/9701
22+
- name: Remove VC15 component for PHP 7.4
23+
if: ${{ inputs.version == '7.4' }}
24+
shell: pwsh
25+
run: |
26+
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
27+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
28+
$componentsToRemove= @(
29+
"Microsoft.VisualStudio.Component.VC.v141.x86.x64"
30+
)
31+
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_}
32+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
33+
# should be run twice
34+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
35+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
36+
37+
- name: Install VC15 component for PHP 7.4
38+
if: ${{ inputs.version == '7.4' }}
39+
shell: pwsh
40+
run: |
41+
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
42+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
43+
$componentsToRemove= @(
44+
"Microsoft.VisualStudio.Component.VC.v141.x86.x64"
45+
)
46+
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --add " + $_}
47+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
48+
# should be run twice
49+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
50+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
51+
2052
- name: Setup PHP SDK
2153
id: setup-php
2254

0 commit comments

Comments
 (0)