Skip to content

Commit

Permalink
probably fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-conway committed Jun 10, 2024
1 parent 7dea1bd commit 64d04ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ jobs:
runs-on: windows-2022
timeout-minutes: 90
steps:
- name: Install VS2022 BuildTools 17.9.7
run: choco install -y visualstudio2022buildtools --version=117.9.7.0 --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --installChannelUri https://aka.ms/vs/17/release/180911598_-255012421/channel"
- uses: KyleMayes/install-llvm-action@8b37482c5a2997a3ab5dbf6561f8109e2eaa7d3b
with:
version: 16.0.6
Expand Down
20 changes: 13 additions & 7 deletions windows-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ $ErrorActionPreference = "Stop"
# Set up MSVC environment variables. This is taken from Bun's 'scripts\env.ps1'
if ($env:VSINSTALLDIR -eq $null) {
Write-Host "Loading Visual Studio environment, this may take a second..."
$vsDir = Get-ChildItem -Path "C:\Program Files\Microsoft Visual Studio\2022" -Directory
if ($vsDir -eq $null) {
throw "Visual Studio directory not found."
}
Push-Location $vsDir
try {
. (Join-Path -Path $vsDir.FullName -ChildPath "Common7\Tools\Launch-VsDevShell.ps1") -Arch amd64 -HostArch amd64
Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=amd64 -host_arch=amd64'
} catch {
$vsDir = Get-ChildItem -Path "C:\Program Files\Microsoft Visual Studio\2022" -Directory
if ($vsDir -eq $null) {
throw "Visual Studio directory not found."
}
Push-Location $vsDir
try {
. (Join-Path -Path $vsDir.FullName -ChildPath "Common7\Tools\Launch-VsDevShell.ps1") -Arch amd64 -HostArch amd64
} finally {
Pop-Location
}
}
finally { Pop-Location }
}

if ($Env:VSCMD_ARG_TGT_ARCH -eq "x86") {
Expand Down

0 comments on commit 64d04ec

Please sign in to comment.