Skip to content

Commit d2760d3

Browse files
committed
fix paths
1 parent 920aaca commit d2760d3

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/build-project.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,24 @@ jobs:
357357
with:
358358
submodules: recursive
359359
fetch-depth: 0
360-
360+
- name: 'Add msbuild to PATH'
361+
uses: microsoft/setup-msbuild@v1
362+
- name: Install build components
363+
run: |
364+
# For versions update see here: https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022
365+
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
366+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
367+
$componentsToInstall= @(
368+
"Microsoft.VisualStudio.Component.VC.v141.x86.x64"
369+
"Microsoft.VisualStudio.Component.VC.14.39.17.9.x86.x64"
370+
"Microsoft.VisualStudio.Component.VC.14.39.17.9.ATL"
371+
)
372+
[string]$workloadArgs = $componentsToInstall | ForEach-Object {" --add " + $_}
373+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
374+
# should be run twice
375+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
376+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
377+
shell: powershell
361378
- uses: actions/cache@v4
362379
id: ccache-cache
363380
if: github.event_name == 'pull_request'

0 commit comments

Comments
 (0)