From 9bdf3f23ea8fe4f7252e94ab12aaf97c479ab0f3 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Fri, 28 Feb 2025 00:34:31 +0000 Subject: [PATCH 1/5] Revert "Fix 32-bit MSVC CI" This reverts commit 6ea4823733254432aee255465177b8e53f01a79d. --- src/ci/github-actions/jobs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 279c7649ca3d0..64e64867de26f 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -474,13 +474,13 @@ auto: env: RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc --enable-sanitizers SCRIPT: make ci-msvc-py - <<: *job-windows-8c + <<: *job-windows - name: i686-msvc-2 env: RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc --enable-sanitizers SCRIPT: make ci-msvc-ps1 - <<: *job-windows-8c + <<: *job-windows # x86_64-msvc-ext is split into multiple jobs to run tests in parallel. - name: x86_64-msvc-ext1 @@ -595,7 +595,7 @@ auto: SCRIPT: python x.py dist bootstrap --include-default-paths DIST_REQUIRE_ALL_TOOLS: 1 CODEGEN_BACKENDS: llvm,cranelift - <<: *job-windows-8c + <<: *job-windows - name: dist-aarch64-msvc env: From ef693231ecd8d854b214e1e616fca52f857deff1 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Thu, 27 Feb 2025 21:50:30 +0000 Subject: [PATCH 2/5] Downgrade Win SDK to 10.0.22621.0 --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de144ee6104c5..3e4ecd49f8cb6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,21 @@ jobs: # Check the `calculate_matrix` job to see how is the matrix defined. include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }} steps: + # Temporary fix to unblock CI + # We revert to an older Windows SDK for 32-bit Windows MSVC builds. + # See issue https://github.com/rust-lang/rust/issues/137733 for more details. + - name: Downgrade Windows SDK + shell: pwsh + if: ${{ matrix.name == 'i686-msvc-1' || matrix.name == 'i686-msvc-2' || matrix.name == 'dist-i686-msvc' }} + run: | + echo ";c:/msys64/usr/bin" >> $env:GITHUB_PATH + $vs = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -format value -property installationPath + &$vs\Common7\Tools\Launch-VsDevShell.ps1 -HostArch Amd64 -Arch x86 + Enter-VsDevshell -VsInstallPath $vs -HostArch Amd64 -Arch x86 -DevCmdArguments "-winsdk=10.0.22621.0" + $new_env = ls env: | foreach { echo "$($_.key)=$($_.value)" } + $new_env >> $env:GITHUB_ENV + $env:PATH >> $env:GITHUB_PATH + - name: disable git crlf conversion run: git config --global core.autocrlf false From 5e8ba43e610a3fcc1d3e8266f5460dc1dc721065 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Fri, 28 Feb 2025 02:38:45 +0000 Subject: [PATCH 3/5] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e4ecd49f8cb6..698b7d222a30f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: shell: pwsh if: ${{ matrix.name == 'i686-msvc-1' || matrix.name == 'i686-msvc-2' || matrix.name == 'dist-i686-msvc' }} run: | - echo ";c:/msys64/usr/bin" >> $env:GITHUB_PATH + echo "c:/msys64/usr/bin" >> $env:GITHUB_PATH $vs = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -format value -property installationPath &$vs\Common7\Tools\Launch-VsDevShell.ps1 -HostArch Amd64 -Arch x86 Enter-VsDevshell -VsInstallPath $vs -HostArch Amd64 -Arch x86 -DevCmdArguments "-winsdk=10.0.22621.0" From c19d358a012d200389ab5b2ec2912c6385dee4e2 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Fri, 28 Feb 2025 02:45:06 +0000 Subject: [PATCH 4/5] Update ci.yml --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 698b7d222a30f..87ab3e455f3a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,13 +85,18 @@ jobs: shell: pwsh if: ${{ matrix.name == 'i686-msvc-1' || matrix.name == 'i686-msvc-2' || matrix.name == 'dist-i686-msvc' }} run: | + # Add the msys2 bin dir to PATH to stop it from prepending itself to PATH echo "c:/msys64/usr/bin" >> $env:GITHUB_PATH + + # Get the Visual Studio shell, setting the SDK version to 10.0.22621.0 $vs = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -format value -property installationPath &$vs\Common7\Tools\Launch-VsDevShell.ps1 -HostArch Amd64 -Arch x86 Enter-VsDevshell -VsInstallPath $vs -HostArch Amd64 -Arch x86 -DevCmdArguments "-winsdk=10.0.22621.0" + + # Update the github environment and path. $new_env = ls env: | foreach { echo "$($_.key)=$($_.value)" } $new_env >> $env:GITHUB_ENV - $env:PATH >> $env:GITHUB_PATH + foreach ($path in $env:PATH -split ';') { echo $path >> $env:GITHUB_PATH } - name: disable git crlf conversion run: git config --global core.autocrlf false From 354ff1a34cd812d9369a1ec4b87842cedd74dee3 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Fri, 28 Feb 2025 02:58:10 +0000 Subject: [PATCH 5/5] Update ci.yml --- .github/workflows/ci.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87ab3e455f3a6..bbac7f9a2cd94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,26 +78,6 @@ jobs: # Check the `calculate_matrix` job to see how is the matrix defined. include: ${{ fromJSON(needs.calculate_matrix.outputs.jobs) }} steps: - # Temporary fix to unblock CI - # We revert to an older Windows SDK for 32-bit Windows MSVC builds. - # See issue https://github.com/rust-lang/rust/issues/137733 for more details. - - name: Downgrade Windows SDK - shell: pwsh - if: ${{ matrix.name == 'i686-msvc-1' || matrix.name == 'i686-msvc-2' || matrix.name == 'dist-i686-msvc' }} - run: | - # Add the msys2 bin dir to PATH to stop it from prepending itself to PATH - echo "c:/msys64/usr/bin" >> $env:GITHUB_PATH - - # Get the Visual Studio shell, setting the SDK version to 10.0.22621.0 - $vs = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -format value -property installationPath - &$vs\Common7\Tools\Launch-VsDevShell.ps1 -HostArch Amd64 -Arch x86 - Enter-VsDevshell -VsInstallPath $vs -HostArch Amd64 -Arch x86 -DevCmdArguments "-winsdk=10.0.22621.0" - - # Update the github environment and path. - $new_env = ls env: | foreach { echo "$($_.key)=$($_.value)" } - $new_env >> $env:GITHUB_ENV - foreach ($path in $env:PATH -split ';') { echo $path >> $env:GITHUB_PATH } - - name: disable git crlf conversion run: git config --global core.autocrlf false @@ -194,6 +174,26 @@ jobs: - name: ensure the stable version number is correct run: src/ci/scripts/verify-stable-version-number.sh + # Temporary fix to unblock CI + # We revert to an older Windows SDK for 32-bit Windows MSVC builds. + # See issue https://github.com/rust-lang/rust/issues/137733 for more details. + - name: Downgrade Windows SDK + shell: pwsh + if: ${{ matrix.name == 'i686-msvc-1' || matrix.name == 'i686-msvc-2' || matrix.name == 'dist-i686-msvc' }} + run: | + # Add the msys2 bin dir to PATH to stop it from prepending itself to PATH + echo "c:/msys64/usr/bin" >> $env:GITHUB_PATH + + # Get the Visual Studio shell, setting the SDK version to 10.0.22621.0 + $vs = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -format value -property installationPath + &$vs\Common7\Tools\Launch-VsDevShell.ps1 -HostArch Amd64 -Arch x86 + Enter-VsDevshell -VsInstallPath $vs -HostArch Amd64 -Arch x86 -DevCmdArguments "-winsdk=10.0.22621.0" + + # Update the github environment and path. + $new_env = ls env: | foreach { echo "$($_.key)=$($_.value)" } + $new_env >> $env:GITHUB_ENV + foreach ($path in $env:PATH -split ';') { $path >> $env:GITHUB_PATH } + # Show the environment just before we run the build # This makes it easier to diagnose problems with the above install scripts. - name: show the current environment