Skip to content

Commit

Permalink
Fix missing MSVC components after actions/runner-images#9701
Browse files Browse the repository at this point in the history
  • Loading branch information
mrobinson committed May 16, 2024
1 parent 00f267e commit 8e52475
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,27 @@ jobs:
with:
crate: taplo-cli
locked: true
- name: Install MSVC components
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToRemove = @(
"Microsoft.VisualStudio.Component.Windows10SDK.19041"
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
"Microsoft.VisualStudio.Component.VC.ATL"
"Microsoft.VisualStudio.Component.VC.ATLMFC"
)
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# should be run twice
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
- name: Install wixtoolset
run: |
choco install wixtoolset
echo "C:\\Program Files (x86)\\WiX Toolset v3.11\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# For some reason WiX isn't currently on the GitHub runner path. This is a
# temporary workaround until that is fixed.
"$env:WIX\bin" >> $env:GITHUB_PATH
- uses: actions/setup-python@v5
with:
python-version: '3.10'
Expand All @@ -78,11 +95,6 @@ jobs:
python mach fetch
python mach bootstrap-gstreamer
cargo install --path support/crown
# For some reason WiX isn't currently on the GitHub runner path. This is a
# temporary workaround until that is fixed.
- name: Add WiX to Path
run: |
"$env:WIX\bin" >> $env:GITHUB_PATH
- name: Build (${{ inputs.profile }})
run: |
python mach build --locked --${{ inputs.profile }}
Expand Down

0 comments on commit 8e52475

Please sign in to comment.