From 354ff1a34cd812d9369a1ec4b87842cedd74dee3 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Fri, 28 Feb 2025 02:58:10 +0000 Subject: [PATCH] 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 87ab3e455f3a..bbac7f9a2cd9 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