File tree Expand file tree Collapse file tree 3 files changed +50
-3
lines changed
Expand file tree Collapse file tree 3 files changed +50
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Install Visual Studio Tools
2+ description : Installs Visual Studio Tools
3+ runs :
4+ using : composite
5+ steps :
6+ - name : Run Script
7+ shell : powershell
8+ run : .\install-vsb.ps1
Original file line number Diff line number Diff line change 1+ $VSB = ' https://aka.ms/vs/17/release/vs_buildtools.exe'
2+ $VSB_SHA256 = ' 99C7677154366062A43082921F40F3CE00EF2614DBF94DB23B244DD13DC9443D'
3+ Set-Variable ErrorActionPreference Stop
4+ Set-Variable ProgressPreference SilentlyContinue
5+ Write-Host - NoNewLine (' Downloading {0} ... ' -f ${VSB} )
6+ Invoke-WebRequest - Uri $VSB - OutFile $env: TEMP \vs_buildtools.exe
7+ Write-Host ' SUCCESS'
8+ Write-Host - NoNewLine (' Verifying SHA256 ({0}) ... ' -f $VSB_SHA256 )
9+ $Hash = Get-FileHash $env: TEMP \vs_buildtools.exe - Algorithm sha256
10+ if ($Hash.Hash -eq $VSB_SHA256 ) {
11+ Write-Host ' SUCCESS'
12+ } else {
13+ Write-Host (' FAILED ({0})' -f $Hash.Hash )
14+ exit 1
15+ }
16+ Write-Host - NoNewLine ' Installing Visual Studio Build Tools ... '
17+ $Process =
18+ Start-Process $env: TEMP \vs_buildtools.exe - Wait - PassThru - NoNewWindow - ArgumentList @ (
19+ ' --quiet' ,
20+ ' --wait' ,
21+ ' --norestart' ,
22+ ' --nocache' ,
23+ ' --add' , ' Microsoft.VisualStudio.Component.Windows11SDK.22000' ,
24+ ' --add' , ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
25+ )
26+ if ($Process.ExitCode -eq 0 -or $Process.ExitCode -eq 3010 ) {
27+ Write-Host ' SUCCESS'
28+ } else {
29+ Write-Host (' FAILED ({0})' -f $Process.ExitCode )
30+ exit 1
31+ }
32+ Remove-Item - Force $env: TEMP \vs_buildtools.exe
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ jobs:
108108 - name : Checkout repository
109109 uses : actions/checkout@v4
110110 with :
111- # ref: ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036=
111+ ref : ${{ github.ref }} # Include changes to the target branch when action is re-run https://github.com/actions/checkout/issues/1036=
112112 - name : Set environment variables
113113 if : ${{ inputs.windows_env_vars }}
114114 run : |
@@ -129,10 +129,17 @@ jobs:
129129 echo "image=$Image" >> "$env:GITHUB_OUTPUT"
130130 - name : Install Visual Studio Build Tools
131131 if : ${{ !inputs.enable_windows_docker }}
132- run : . .github\workflows\scripts\windows\install-vsb.ps1
132+ run : |
133+ Invoke-WebRequest -Uri https://raw.githubusercontent.com/award999/github-workflows/refs/heads/dockerless-windows/.github/workflows/scripts/windows/install-vsb.ps1 -OutFile install-vsb.ps1
134+ . .\install-vsb.ps1
135+ del .\install-vsb.ps1
133136 - name : Install Swift
134137 if : ${{ !inputs.enable_windows_docker }}
135- run : . .github\workflows\scripts\windows\swift\install-swift-${{ matrix.swift_version }}.ps1
138+ run : |
139+ Invoke-WebRequest -Uri https://raw.githubusercontent.com/award999/github-workflows/refs/heads/dockerless-windows/.github/workflows/scripts/windows/swift/install-swift.ps1 -OutFile install-swift.ps1
140+ Invoke-WebRequest -Uri https://raw.githubusercontent.com/award999/github-workflows/refs/heads/dockerless-windows/.github/workflows/scripts/windows/swift/install-swift-${{ matrix.swift_version }}.ps1 -OutFile install-swift-${{ matrix.swift_version }}.ps1
141+ . .\install-swift-${{ matrix.swift_version }}.ps1
142+ del .\install-swift*.ps1
136143 - name : Create test script
137144 run : |
138145 mkdir $env:TEMP\test-script
You can’t perform that action at this time.
0 commit comments