File tree Expand file tree Collapse file tree 8 files changed +63
-50
lines changed
Expand file tree Collapse file tree 8 files changed +63
-50
lines changed Original file line number Diff line number Diff line change 3939 enable_windows_checks : false
4040
4141 tests-windows :
42+ defaults :
43+ run :
44+ shell : powershell
4245 name : Windows (${{ matrix.swift_version }})
4346 runs-on : ${{ contains(matrix.swift_version, 'nightly') && 'windows-2019' || 'windows-2022' }}
4447 strategy :
@@ -50,18 +53,18 @@ jobs:
5053 uses : actions/checkout@v4
5154 - name : Install node.js
5255 if : ${{ !vars.skip_nodejs_install }}
53- run : powershell.exe -NoLogo -File $env:GITHUB_WORKSPACE\ .github\workflows\scripts\windows\install-nodejs.ps1
56+ run : . .github\workflows\scripts\windows\install-nodejs.ps1
5457 - name : Install Visual Studio Build Tools
5558 if : ${{ !vars.skip_vsb_install }}
56- run : powershell.exe -NoLogo -File $env:GITHUB_WORKSPACE\ .github\workflows\scripts\windows\install-vsb.ps1
59+ run : . .github\workflows\scripts\windows\install-vsb.ps1
5760 - name : Install Swift
5861 if : ${{ !vars.skip_swift_install }}
59- run : powershell.exe -NoLogo -File $env:GITHUB_WORKSPACE\ .github\workflows\scripts\windows\swift\install-swift-${{ matrix.swift_version }}.ps1
62+ run : . .github\workflows\scripts\windows\swift\install-swift-${{ matrix.swift_version }}.ps1
6063 - name : Check dependencies
6164 run : |
6265 swift --version
6366 node --version
6467 - name : Create test script
6568 run : |
6669 cd $env:GITHUB_WORKSPACE
67- powershell.exe -NoLogo -File docker\test-windows.ps1
70+ -File docker\test-windows.ps1
Original file line number Diff line number Diff line change 11$NODEJS = ' https://nodejs.org/dist/v18.20.4/node-v18.20.4-x64.msi'
22$NODEJS_SHA256 = ' c2654d3557abd59de08474c6dd009b1d358f420b8e4010e4debbf130b1dfb90a'
3+ Set-Variable ErrorActionPreference Stop
4+ Set-Variable ProgressPreference SilentlyContinue
35Write-Host - NoNewLine (' Downloading {0} ... ' -f ${NODEJS} )
46Invoke-WebRequest - Uri ${NODEJS} - OutFile $env: TEMP \node.msi
57Write-Host ' SUCCESS'
Original file line number Diff line number Diff line change 11$VSB = ' https://aka.ms/vs/17/release/vs_buildtools.exe'
22$VSB_SHA256 = ' 99C7677154366062A43082921F40F3CE00EF2614DBF94DB23B244DD13DC9443D'
3+ Set-Variable ErrorActionPreference Stop
4+ Set-Variable ProgressPreference SilentlyContinue
35Write-Host - NoNewLine (' Downloading {0} ... ' -f ${VSB} )
46Invoke-WebRequest - Uri $VSB - OutFile $env: TEMP \vs_buildtools.exe
57Write-Host ' SUCCESS'
Original file line number Diff line number Diff line change 1+ . $PSScriptRoot \install-swift.ps1
2+
13$SWIFT = ' https://download.swift.org/swift-5.10.1-release/windows10/swift-5.10.1-RELEASE/swift-5.10.1-RELEASE-windows10.exe'
24$SWIFT_SHA256 = ' 3027762138ACFA1BBE3050FF6613BBE754332E84C9EFA5C23984646009297286'
3- Write-Host - NoNewLine (' Downloading {0} ... ' -f ${env: SWIFT} )
4- Invoke-WebRequest - Uri ${env: SWIFT} - OutFile installer.exe
5- Write-Host ' SUCCESS'
6- Write-Host - NoNewLine (' Verifying SHA256 ({0}) ... ' -f ${env: SWIFT_SHA256} )
7- $Hash = Get-FileHash installer.exe - Algorithm sha256
8- if ($Hash.Hash -eq ${env: SWIFT_SHA256} ) {
9- Write-Host ' SUCCESS'
10- } else {
11- Write-Host (' FAILED ({0})' -f $Hash.Hash )
12- exit 1
13- }
14- Write-Host - NoNewLine ' Installing Swift ... '
15- $Process = Start-Process installer.exe - Wait - PassThru - NoNewWindow - ArgumentList @ (
16- ' /quiet' ,
17- ' /norestart'
18- )
19- if ($Process.ExitCode -eq 0 ) {
20- Write-Host ' SUCCESS'
21- } else {
22- Write-Host (' FAILED ({0})' -f $Process.ExitCode )
23- exit 1
24- }
25- Remove-Item - Force installer.exe
5+
6+ Install-Swift - Url $SWIFT - Sha256 $SWIFT_SHA256
Original file line number Diff line number Diff line change 1+ . $PSScriptRoot \install-swift.ps1
2+
3+ $SWIFT = ' https://download.swift.org/swift-5.9.2-release/windows10/swift-5.9.2-RELEASE/swift-5.9.2-RELEASE-windows10.exe'
4+ $SWIFT_SHA256 = ' D78A717551C78E824C9B74B0CFB1AD86060FC286EA071FDDB26DF18F56DC7212'
5+
6+ Install-Swift - Url $SWIFT - Sha256 $SWIFT_SHA256
Original file line number Diff line number Diff line change 1+ . $PSScriptRoot \install-swift.ps1
2+
13$SWIFT = ' https://download.swift.org/swift-6.0.2-release/windows10/swift-6.0.2-RELEASE/swift-6.0.2-RELEASE-windows10.exe'
24$SWIFT_SHA256 = ' 516FE8E64713BD92F03C01E5198011B74A27F8C1C88627607A2F421718636126'
3- Write-Host - NoNewLine (' Downloading {0} ... ' -f $SWIFT )
4- Invoke-WebRequest - Uri $SWIFT - OutFile installer.exe
5- Write-Host ' SUCCESS'
6- Write-Host - NoNewLine (' Verifying SHA256 ({0}) ... ' -f $SWIFT_SHA256 )
7- $Hash = Get-FileHash installer.exe - Algorithm sha256
8- if ($Hash.Hash -eq $SWIFT_SHA256 ) {
9- Write-Host ' SUCCESS'
10- } else {
11- Write-Host (' FAILED ({0})' -f $Hash.Hash )
12- exit 1
13- }
14- Write-Host - NoNewLine ' Installing Swift ... '
15- $Process = Start-Process installer.exe - Wait - PassThru - NoNewWindow - ArgumentList @ (
16- ' /quiet' ,
17- ' /norestart'
18- )
19- if ($Process.ExitCode -eq 0 ) {
20- Write-Host ' SUCCESS'
21- } else {
22- Write-Host (' FAILED ({0})' -f $Process.ExitCode )
23- exit 1
24- }
25- Remove-Item - Force installer.exe
5+
6+ Install-Swift - Url $SWIFT - Sha256 $SWIFT_SHA256
Original file line number Diff line number Diff line change 1+ . $PSScriptRoot \install-swift.ps1
2+
3+ $SWIFT_RELEASE_METADATA = ' http://download.swift.org/swift-6.0-branch/windows10/latest-build.json'
4+ $Release = curl.exe - sL ${SWIFT_RELEASE_METADATA}
5+ $SWIFT_URL = " https://download.swift.org/swift-6.0-branch/windows10/$ ( $ ($Release | ConvertFrom-JSON ).dir) /$ ( $ ($Release | ConvertFrom-JSON ).download) "
6+
7+ Install-Swift - Url $SWIFT_URL - Sha256 " "
Original file line number Diff line number Diff line change 1+ function Install-Swift {
2+ param (
3+ [string ]$Url ,
4+ [string ]$Sha256
5+ )
6+ Set-Variable ErrorActionPreference Stop
7+ Set-Variable ProgressPreference SilentlyContinue
8+ Write-Host - NoNewLine (' Downloading {0} ... ' -f $url )
9+ Invoke-WebRequest - Uri $url - OutFile installer.exe
10+ Write-Host ' SUCCESS'
11+ Write-Host - NoNewLine (' Verifying SHA256 ({0}) ... ' -f $Sha256 )
12+ $Hash = Get-FileHash installer.exe - Algorithm sha256
13+ if ($Hash.Hash -eq $Sha256 -or $Sha256 -eq " " ) {
14+ Write-Host ' SUCCESS'
15+ } else {
16+ Write-Host (' FAILED ({0})' -f $Hash.Hash )
17+ exit 1
18+ }
19+ Write-Host - NoNewLine ' Installing Swift ... '
20+ $Process = Start-Process installer.exe - Wait - PassThru - NoNewWindow - ArgumentList @ (
21+ ' /quiet' ,
22+ ' /norestart'
23+ )
24+ if ($Process.ExitCode -eq 0 ) {
25+ Write-Host ' SUCCESS'
26+ } else {
27+ Write-Host (' FAILED ({0})' -f $Process.ExitCode )
28+ exit 1
29+ }
30+ Remove-Item - Force installer.exe
31+ }
You can’t perform that action at this time.
0 commit comments