Skip to content

Commit 71e5018

Browse files
committed
ci: replace MINGW_URL with CUSTOM_MINGW=1
This commit replaces the mirrors base URL contained in the MINGW_URL with a CUSTOM_MINGW=1 environment variable. The mirrors base URL will be fetched instead through the MIRRORS_BASE environment variable, defined in src/ci/shared.sh.
1 parent e3d9984 commit 71e5018

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/ci/azure-pipelines/auto.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ jobs:
284284
MSYS_BITS: 32
285285
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
286286
SCRIPT: make ci-mingw-subset-1
287-
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
287+
CUSTOM_MINGW: 1
288288
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
289289
MINGW_DIR: mingw32
290290
# FIXME(#59637)
@@ -294,14 +294,14 @@ jobs:
294294
MSYS_BITS: 32
295295
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
296296
SCRIPT: make ci-mingw-subset-2
297-
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
297+
CUSTOM_MINGW: 1
298298
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
299299
MINGW_DIR: mingw32
300300
x86_64-mingw-1:
301301
MSYS_BITS: 64
302302
SCRIPT: make ci-mingw-subset-1
303303
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
304-
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
304+
CUSTOM_MINGW: 1
305305
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
306306
MINGW_DIR: mingw64
307307
# FIXME(#59637)
@@ -311,7 +311,7 @@ jobs:
311311
MSYS_BITS: 64
312312
SCRIPT: make ci-mingw-subset-2
313313
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
314-
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
314+
CUSTOM_MINGW: 1
315315
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
316316
MINGW_DIR: mingw64
317317

@@ -340,7 +340,7 @@ jobs:
340340
MSYS_BITS: 32
341341
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools --enable-profiler
342342
SCRIPT: python x.py dist
343-
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
343+
CUSTOM_MINGW: 1
344344
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
345345
MINGW_DIR: mingw32
346346
DIST_REQUIRE_ALL_TOOLS: 1
@@ -349,7 +349,7 @@ jobs:
349349
MSYS_BITS: 64
350350
SCRIPT: python x.py dist
351351
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler
352-
MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc
352+
CUSTOM_MINGW: 1
353353
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
354354
MINGW_DIR: mingw64
355355
DIST_REQUIRE_ALL_TOOLS: 1

src/ci/scripts/install-clang.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if isMacOS; then
1717
# Configure `AR` specifically so rustbuild doesn't try to infer it as
1818
# `clang-ar` by accident.
1919
ciCommandSetEnv AR "ar"
20-
elif isWindows && [[ -z ${MINGW_URL+x} ]]; then
20+
elif isWindows && [[ ${CUSTOM_MINGW-0} -ne 1 ]]; then
2121
# If we're compiling for MSVC then we, like most other distribution builders,
2222
# switch to clang as the compiler. This'll allow us eventually to enable LTO
2323
# amongst LLVM and rustc. Note that we only do this on MSVC as I don't think

src/ci/scripts/install-mingw.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ IFS=$'\n\t'
2828
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
2929

3030
if isWindows; then
31-
if [[ -z "${MINGW_URL+x}" ]]; then
31+
if [[ "${CUSTOM_MINGW-0}" -ne 1 ]]; then
3232
arch=i686
3333
if [ "$MSYS_BITS" = "64" ]; then
3434
arch=x86_64
@@ -37,9 +37,9 @@ if isWindows; then
3737
mingw-w64-$arch-gcc mingw-w64-$arch-python2
3838
ciCommandAddPath "${SYSTEM_WORKFOLDER}/msys2/mingw${MSYS_BITS}/bin"
3939
else
40-
curl -o mingw.7z "${MINGW_URL}/${MINGW_ARCHIVE}"
40+
curl -o mingw.7z "${MIRRORS_BASE}/${MINGW_ARCHIVE}"
4141
7z x -y mingw.7z > /dev/null
42-
curl -o "${MINGW_DIR}/bin/gdborig.exe" "${MINGW_URL}/2017-04-20-${MSYS_BITS}bit-gdborig.exe"
42+
curl -o "${MINGW_DIR}/bin/gdborig.exe" "${MIRRORS_BASE}/2017-04-20-${MSYS_BITS}bit-gdborig.exe"
4343
ciCommandAddPath "$(pwd)/${MINGW_DIR}/bin"
4444
fi
4545
fi

0 commit comments

Comments
 (0)