From 642e8d4434c4f6214a908eea0019b3185323431f Mon Sep 17 00:00:00 2001 From: Jason Shirk Date: Tue, 28 May 2019 22:57:12 -0700 Subject: [PATCH] Speed up Azure CI installing Windows dependencies There is known issue where PowerShell is unreasonably slow downloading files due to an issue with rendering the progress bar, see: https://github.com/PowerShell/PowerShell/issues/2138 That issue is fixed in PowerShell Core (available in Azure Pipelines as pwsh.exe) but it can also be worked around by setting: $ProgressPreference = 'SilentlyContinue' --- .azure-pipelines/steps/install-clang.yml | 2 +- .azure-pipelines/steps/install-sccache.yml | 2 +- .azure-pipelines/steps/install-windows-build-deps.yml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/steps/install-clang.yml b/.azure-pipelines/steps/install-clang.yml index 26a223282cd87..7a662c498f4b5 100644 --- a/.azure-pipelines/steps/install-clang.yml +++ b/.azure-pipelines/steps/install-clang.yml @@ -27,7 +27,7 @@ steps: # Original downloaded here came from # http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe - script: | - powershell -Command "iwr -outf %TEMP%\LLVM-7.0.0-win64.exe https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/LLVM-7.0.0-win64.exe" + powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %TEMP%\LLVM-7.0.0-win64.exe https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/LLVM-7.0.0-win64.exe" set CLANG_DIR=%CD%\citools\clang-rust %TEMP%\LLVM-7.0.0-win64.exe /S /NCRC /D=%CLANG_DIR% set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --set llvm.clang-cl=%CLANG_DIR%\bin\clang-cl.exe diff --git a/.azure-pipelines/steps/install-sccache.yml b/.azure-pipelines/steps/install-sccache.yml index 39f58002a7358..8f80c955f7e49 100644 --- a/.azure-pipelines/steps/install-sccache.yml +++ b/.azure-pipelines/steps/install-sccache.yml @@ -9,7 +9,7 @@ steps: - script: | md sccache - powershell -Command "iwr -outf sccache\sccache.exe https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc" + powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf sccache\sccache.exe https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc" echo ##vso[task.prependpath]%CD%\sccache displayName: Install sccache (Windows) condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) diff --git a/.azure-pipelines/steps/install-windows-build-deps.yml b/.azure-pipelines/steps/install-windows-build-deps.yml index 037c8daa2a80a..0e9c0b99b46f1 100644 --- a/.azure-pipelines/steps/install-windows-build-deps.yml +++ b/.azure-pipelines/steps/install-windows-build-deps.yml @@ -54,9 +54,9 @@ steps: # Note that we don't literally overwrite the gdb.exe binary because it appears # to just use gdborig.exe, so that's the binary we deal with instead. - script: | - powershell -Command "iwr -outf %MINGW_ARCHIVE% %MINGW_URL%/%MINGW_ARCHIVE%" + powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %MINGW_ARCHIVE% %MINGW_URL%/%MINGW_ARCHIVE%" 7z x -y %MINGW_ARCHIVE% > nul - powershell -Command "iwr -outf 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe" + powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe" mv 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_DIR%\bin\gdborig.exe echo ##vso[task.prependpath]%CD%\%MINGW_DIR%\bin condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), ne(variables['MINGW_URL'],'')) @@ -81,7 +81,7 @@ steps: # Note that this is originally from the github releases patch of Ninja - script: | md ninja - powershell -Command "iwr -outf 2017-03-15-ninja-win.zip https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-03-15-ninja-win.zip" + powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-03-15-ninja-win.zip https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-03-15-ninja-win.zip" 7z x -oninja 2017-03-15-ninja-win.zip del 2017-03-15-ninja-win.zip set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --enable-ninja