From e9ca3178140118f66885bb24370834fbf7d958ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= <39484203+jieyouxu@users.noreply.github.com> Date: Mon, 10 Feb 2025 16:45:07 +0800 Subject: [PATCH 1/2] Revert "Auto merge of #136588 - ChrisDenton:no-msys2, r=Kobzol" Seems like for whatever reason the msys2 installation here is needed for the 32-bit `i686-pc-windows-gnu`, otherwise `rustc` distributed for that target seems to link against the 64-bit libraries or sth. This revert is mostly just to buy time to investigate. This reverts commit e0607238c95df66e3d25a6c17aebe18c6726fc74, reversing changes made to a9e7b30487235621751cc628f170c0f15fb215c4. --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0934e42b277e4..7a46d123c5d94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,6 +62,9 @@ jobs: name: ${{ matrix.full_name }} needs: [ calculate_matrix ] runs-on: "${{ matrix.os }}" + defaults: + run: + shell: ${{ contains(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }} timeout-minutes: 360 env: CI_JOB_NAME: ${{ matrix.name }} @@ -77,6 +80,22 @@ jobs: # Check the `calculate_matrix` job to see how is the matrix defined. include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }} steps: + - if: contains(matrix.os, 'windows') + uses: msys2/setup-msys2@v2.22.0 + with: + # i686 jobs use mingw32. x86_64 and cross-compile jobs use mingw64. + msystem: ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }} + # don't try to download updates for already installed packages + update: false + # don't try to use the msys that comes built-in to the github runner, + # so we can control what is installed (i.e. not python) + release: true + # Inherit the full path from the Windows environment, with MSYS2's */bin/ + # dirs placed in front. This lets us run Windows-native Python etc. + path-type: inherit + install: > + make + - name: disable git crlf conversion run: git config --global core.autocrlf false From f55585e6f8814fdf3a671cefb695b4fedd618bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= <39484203+jieyouxu@users.noreply.github.com> Date: Mon, 10 Feb 2025 16:58:02 +0800 Subject: [PATCH 2/2] ci: add FIXME for 32-bit windows-gnu msys2 problem --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a46d123c5d94..978cad95bec34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,6 +83,10 @@ jobs: - if: contains(matrix.os, 'windows') uses: msys2/setup-msys2@v2.22.0 with: + # FIXME(#136795): this mingw installation seems to be needed for + # `i686-pc-windows-gnu`, otherwise we somehow incorrectly ship the + # 64-bit `libwinpthread-1.dll` and then `rustc` explodes. + # # i686 jobs use mingw32. x86_64 and cross-compile jobs use mingw64. msystem: ${{ contains(matrix.name, 'i686') && 'mingw32' || 'mingw64' }} # don't try to download updates for already installed packages