Skip to content

Commit 90d4ef3

Browse files
authored
Rollup merge of rust-lang#61304 - lzybkr:iwr_progress, r=alexcrichton
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 this [issue](PowerShell/PowerShell#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' I measured downloading LLVM and it took about 220s before, 5s after, so the improvement is significant.
2 parents eebe62a + 6c534c3 commit 90d4ef3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.azure-pipelines/steps/install-clang.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ steps:
2727
# Original downloaded here came from
2828
# http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe
2929
- script: |
30-
powershell -Command "iwr -outf %TEMP%\LLVM-7.0.0-win64.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/LLVM-7.0.0-win64.exe"
30+
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %TEMP%\LLVM-7.0.0-win64.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/LLVM-7.0.0-win64.exe"
3131
set CLANG_DIR=%CD%\citools\clang-rust
3232
%TEMP%\LLVM-7.0.0-win64.exe /S /NCRC /D=%CLANG_DIR%
3333
set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --set llvm.clang-cl=%CLANG_DIR%\bin\clang-cl.exe

.azure-pipelines/steps/install-sccache.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ steps:
99

1010
- script: |
1111
md sccache
12-
powershell -Command "iwr -outf sccache\sccache.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc"
12+
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf sccache\sccache.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc"
1313
echo ##vso[task.prependpath]%CD%\sccache
1414
displayName: Install sccache (Windows)
1515
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

.azure-pipelines/steps/install-windows-build-deps.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ steps:
5454
# Note that we don't literally overwrite the gdb.exe binary because it appears
5555
# to just use gdborig.exe, so that's the binary we deal with instead.
5656
- script: |
57-
powershell -Command "iwr -outf %MINGW_ARCHIVE% %MINGW_URL%/%MINGW_ARCHIVE%"
57+
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %MINGW_ARCHIVE% %MINGW_URL%/%MINGW_ARCHIVE%"
5858
7z x -y %MINGW_ARCHIVE% > nul
59-
powershell -Command "iwr -outf 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe"
59+
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe"
6060
mv 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_DIR%\bin\gdborig.exe
6161
echo ##vso[task.prependpath]%CD%\%MINGW_DIR%\bin
6262
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), ne(variables['MINGW_URL'],''))
@@ -81,7 +81,7 @@ steps:
8181
# Note that this is originally from the github releases patch of Ninja
8282
- script: |
8383
md ninja
84-
powershell -Command "iwr -outf 2017-03-15-ninja-win.zip https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2017-03-15-ninja-win.zip"
84+
powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-03-15-ninja-win.zip https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2017-03-15-ninja-win.zip"
8585
7z x -oninja 2017-03-15-ninja-win.zip
8686
del 2017-03-15-ninja-win.zip
8787
set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --enable-ninja

0 commit comments

Comments
 (0)