Skip to content

Commit 1dda29f

Browse files
committed
Auto merge of rust-lang#136810 - jieyouxu:revert-msys2-removal, r=<try>
Do install msys2 in CI explicitly Reverts rust-lang#136588. Only papers over rust-lang#136795, but the root cause needs to be investigated (likely a bug in how `i686-pc-windows-gnu` is built?). Seems like for whatever reason the msys2 installation here is needed for the 32-bit `i686-pc-windows-gnu` target, otherwise `rustc` distributed for that target seems to link against the 64-bit `libwinpthread-1.dll` and such. This revert is mostly just to buy time to investigate without having to debug why the build logic for the 32-bit windows-gnu target is wrong. This reverts commit e060723, reversing changes made to a9e7b30. r? infra cc `@ChrisDenton` `@mati865` try-job: dist-x86_64-msvc try-job: dist-i686-msvc try-job: dist-aarch64-msvc try-job: dist-i686-mingw try-job: dist-x86_64-mingw try-job: dist-x86_64-msvc-alt
2 parents c03c38d + e35890a commit 1dda29f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci.yml

+24
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ jobs:
6262
name: ${{ matrix.full_name }}
6363
needs: [ calculate_matrix ]
6464
runs-on: "${{ matrix.os }}"
65+
defaults:
66+
run:
67+
shell: ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }}
6568
timeout-minutes: 360
6669
env:
6770
CI_JOB_NAME: ${{ matrix.name }}
@@ -77,6 +80,27 @@ jobs:
7780
# Check the `calculate_matrix` job to see how is the matrix defined.
7881
include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }}
7982
steps:
83+
- if: contains(matrix.os, 'windows')
84+
uses: msys2/[email protected]
85+
with:
86+
# FIXME(#136795): this mingw installation seems to be needed for
87+
# `i686-pc-windows-gnu`, otherwise we somehow incorrectly link to
88+
# 64-bit `libwinpthread-1.dll` and then `rustc` can't find the 32-bit
89+
# version it wants.
90+
#
91+
# i686 jobs use mingw32. x86_64 and cross-compile jobs use mingw64.
92+
msystem: ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }}
93+
# don't try to download updates for already installed packages
94+
update: false
95+
# don't try to use the msys that comes built-in to the github runner,
96+
# so we can control what is installed (i.e. not python)
97+
release: true
98+
# Inherit the full path from the Windows environment, with MSYS2's */bin/
99+
# dirs placed in front. This lets us run Windows-native Python etc.
100+
path-type: inherit
101+
install: >
102+
make
103+
80104
- name: disable git crlf conversion
81105
run: git config --global core.autocrlf false
82106

0 commit comments

Comments
 (0)