File tree Expand file tree Collapse file tree 3 files changed +49
-2
lines changed Expand file tree Collapse file tree 3 files changed +49
-2
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 @@ -125,10 +125,17 @@ jobs:
125
125
echo "image=$Image" >> "$env:GITHUB_OUTPUT"
126
126
- name : Install Visual Studio Build Tools
127
127
if : ${{ !inputs.enable_windows_docker }}
128
- run : . .github\workflows\scripts\windows\install-vsb.ps1
128
+ run : |
129
+ 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
130
+ . .\install-vsb.ps1
131
+ del .\install-vsb.ps1
129
132
- name : Install Swift
130
133
if : ${{ !inputs.enable_windows_docker }}
131
- run : . .github\workflows\scripts\windows\swift\install-swift-${{ matrix.swift_version }}.ps1
134
+ run : |
135
+ 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
136
+ 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
137
+ . .\install-swift-${{ matrix.swift_version }}.ps1
138
+ del .\install-swift*.ps1
132
139
- name : Create test script
133
140
run : |
134
141
mkdir $env:TEMP\test-script
You can’t perform that action at this time.
0 commit comments