Skip to content

Commit 86f6fae

Browse files
authored
Rollup merge of #125590 - ChrisDenton:mingw-ci-3, r=Kobzol
Add a "Setup Python" action for github-hosted runners and remove unnecessary `CUSTOM_MINGW` environment variable The Setup Python action isn't strictly necessary ([even on Windows](#125584)) but it is [recommend by GitHub](https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#specifying-a-python-version). The `CUSTOM_MINGW` environment variable is redundant now as it's always set for mingw and always unset otherwise. try-job: x86_64-mingw try-job: x86_64-mingw try-job: dist-x86_64-msvc try-job: dist-x86_64-mingw
2 parents 78b4caf + f931290 commit 86f6fae

File tree

4 files changed

+11
-49
lines changed

4 files changed

+11
-49
lines changed

Diff for: .github/workflows/ci.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,12 @@ jobs:
154154

155155
- name: checkout submodules
156156
run: src/ci/scripts/checkout-submodules.sh
157-
158-
- name: install MSYS2
159-
run: src/ci/scripts/install-msys2.sh
157+
158+
- name: Setup Python
159+
uses: actions/setup-python@v5
160+
with:
161+
python-version: '3.x'
162+
if: runner.environment == 'github-hosted'
160163

161164
- name: install MinGW
162165
run: src/ci/scripts/install-mingw.sh

Diff for: src/ci/github-actions/jobs.yml

-4
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ auto:
378378
# We are intentionally allowing an old toolchain on this builder (and that's
379379
# incompatible with LLVM downloads today).
380380
NO_DOWNLOAD_CI_LLVM: 1
381-
CUSTOM_MINGW: 1
382381
<<: *job-windows-8c
383382

384383
- image: x86_64-mingw
@@ -390,7 +389,6 @@ auto:
390389
# We are intentionally allowing an old toolchain on this builder (and that's
391390
# incompatible with LLVM downloads today).
392391
NO_DOWNLOAD_CI_LLVM: 1
393-
CUSTOM_MINGW: 1
394392
<<: *job-windows-8c
395393

396394
- image: dist-x86_64-msvc
@@ -439,7 +437,6 @@ auto:
439437
# incompatible with LLVM downloads today).
440438
NO_DOWNLOAD_CI_LLVM: 1
441439
SCRIPT: python x.py dist bootstrap --include-default-paths
442-
CUSTOM_MINGW: 1
443440
DIST_REQUIRE_ALL_TOOLS: 1
444441
<<: *job-windows-8c
445442

@@ -453,7 +450,6 @@ auto:
453450
# We are intentionally allowing an old toolchain on this builder (and that's
454451
# incompatible with LLVM downloads today).
455452
NO_DOWNLOAD_CI_LLVM: 1
456-
CUSTOM_MINGW: 1
457453
DIST_REQUIRE_ALL_TOOLS: 1
458454
<<: *job-windows-8c
459455

Diff for: src/ci/scripts/install-mingw.sh

+5-15
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/bin/bash
2-
# If we need to download a custom MinGW, do so here and set the path
3-
# appropriately.
4-
#
5-
# Otherwise install MinGW through `pacman`
2+
# For mingw builds use a vendored mingw.
63

74
set -euo pipefail
85
IFS=$'\n\t'
@@ -16,19 +13,16 @@ if isWindows && isKnownToBeMingwBuild; then
1613
case "${CI_JOB_NAME}" in
1714
*i686*)
1815
bits=32
19-
arch=i686
2016
mingw_archive="${MINGW_ARCHIVE_32}"
2117
;;
2218
*x86_64*)
2319
bits=64
24-
arch=x86_64
2520
mingw_archive="${MINGW_ARCHIVE_64}"
2621
;;
2722
*aarch64*)
2823
# aarch64 is a cross-compiled target. Use the x86_64
2924
# mingw, since that's the host architecture.
3025
bits=64
31-
arch=x86_64
3226
mingw_archive="${MINGW_ARCHIVE_64}"
3327
;;
3428
*)
@@ -38,13 +32,9 @@ if isWindows && isKnownToBeMingwBuild; then
3832
;;
3933
esac
4034

41-
if [[ "${CUSTOM_MINGW:-0}" == 0 ]]; then
42-
pacman -S --noconfirm --needed mingw-w64-$arch-toolchain
43-
else
44-
mingw_dir="mingw${bits}"
35+
mingw_dir="mingw${bits}"
4536

46-
curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}"
47-
7z x -y mingw.7z > /dev/null
48-
ciCommandAddPath "$(pwd)/${mingw_dir}/bin"
49-
fi
37+
curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}"
38+
7z x -y mingw.7z > /dev/null
39+
ciCommandAddPath "$(pwd)/${mingw_dir}/bin"
5040
fi

Diff for: src/ci/scripts/install-msys2.sh

-27
This file was deleted.

0 commit comments

Comments
 (0)