mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-23 03:13:31 +08:00
v2 ci: speed up some of powershell's processes (#2818)
* v2: speed up some of powershell's processes * v2-ci: downloading latest Go on Windows isn't slow anymore, so update the log message accordingly * v2: CI: use 7z on Windows instead of Expand-Archive
This commit is contained in:
parent
bce2edd22d
commit
19e834cf36
|
@ -56,11 +56,14 @@ steps:
|
||||||
condition: eq( variables['Agent.OS'], 'Darwin' )
|
condition: eq( variables['Agent.OS'], 'Darwin' )
|
||||||
displayName: Install Go on macOS
|
displayName: Install Go on macOS
|
||||||
|
|
||||||
|
# The low performance is partly due to PowerShell's attempt to update the progress bar. Disabling it speeds up the process.
|
||||||
|
# Reference: https://github.com/PowerShell/PowerShell/issues/2138
|
||||||
- powershell: |
|
- powershell: |
|
||||||
Write-Host "Downloading Go... (please be patient, I am very slow)"
|
$ProgressPreference = 'SilentlyContinue'
|
||||||
|
Write-Host "Downloading Go..."
|
||||||
(New-Object System.Net.WebClient).DownloadFile("https://dl.google.com/go/$(LATEST_GO).windows-amd64.zip", "$(LATEST_GO).windows-amd64.zip")
|
(New-Object System.Net.WebClient).DownloadFile("https://dl.google.com/go/$(LATEST_GO).windows-amd64.zip", "$(LATEST_GO).windows-amd64.zip")
|
||||||
Write-Host "Extracting Go... (I'm slow too)"
|
Write-Host "Extracting Go... (I'm slow too)"
|
||||||
Expand-Archive "$(LATEST_GO).windows-amd64.zip" -DestinationPath "$(gorootDir)"
|
7z x "$(LATEST_GO).windows-amd64.zip" -o"$(gorootDir)"
|
||||||
condition: eq( variables['Agent.OS'], 'Windows_NT' )
|
condition: eq( variables['Agent.OS'], 'Windows_NT' )
|
||||||
displayName: Install Go on Windows
|
displayName: Install Go on Windows
|
||||||
|
|
||||||
|
@ -88,8 +91,8 @@ steps:
|
||||||
workingDirectory: '$(modulePath)'
|
workingDirectory: '$(modulePath)'
|
||||||
displayName: Get dependencies
|
displayName: Get dependencies
|
||||||
|
|
||||||
|
# its behavior is governed by .golangci.yml
|
||||||
- script: |
|
- script: |
|
||||||
# its behavior is governed by .golangci.yml
|
|
||||||
(golangci-lint run --out-format junit-xml) > test-results/lint-result.xml
|
(golangci-lint run --out-format junit-xml) > test-results/lint-result.xml
|
||||||
exit 0
|
exit 0
|
||||||
workingDirectory: '$(modulePath)'
|
workingDirectory: '$(modulePath)'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user