From 19e834cf36ed757738ff7504eb8b3fff45f67a79 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Thu, 17 Oct 2019 23:58:22 +0300 Subject: 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 --- azure-pipelines.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8c86cd8..e041854 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -56,11 +56,14 @@ steps: condition: eq( variables['Agent.OS'], 'Darwin' ) 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: | - 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") 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' ) displayName: Install Go on Windows @@ -88,8 +91,8 @@ steps: workingDirectory: '$(modulePath)' displayName: Get dependencies +# its behavior is governed by .golangci.yml - script: | - # its behavior is governed by .golangci.yml (golangci-lint run --out-format junit-xml) > test-results/lint-result.xml exit 0 workingDirectory: '$(modulePath)' -- cgit v1.2.3