-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[win][CI] Convert paths to Windows format before adding to PATH #140754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
r? @marcoieni rustbot has assigned @marcoieni. Use |
@@ -42,5 +42,5 @@ if isWindows && isKnownToBeMingwBuild; then | |||
|
|||
curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}" | |||
7z x -y mingw.7z > /dev/null | |||
ciCommandAddPath "$(pwd)/${mingw_dir}/bin" | |||
ciCommandAddPath "$(cygpath -m "$(pwd)/${mingw_dir}/bin")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change is useful for non-mingw builds, but this line runs only in mingw builds (see isKnownToBeMingwBuild
in the if
).
Is this still useful in your opinion? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is still useful.
Even though this is a MinGW build, we are not running the MinGW versions of all of the tools. For example, we are still using a native Windows Rust toolchain, and it is using native Windows paths (for example: https://github.com/rust-lang-ci/rust/actions/runs/14918934614/job/41910551227#step:27:214).
the rest of the pr looks good to me. Let's just run a bors try to check that the CI keeps working 👍 |
Sure: but I don't have permissions to run try... |
If you list the jobs you want to test I can kick off the try build 👍 |
Done, ready to try! |
While trying to get the
aarch64-msvc
build working correctly (#140136), I noticed that thePATH
observed during the Rust steps of the build on Windows builds had some entries still in MinGW format, which means that Windows would not be able to use them correctly:From https://github.com/rust-lang/rust/actions/runs/14606167901/job/40975555680#step:28:192 note the path for
ninja
andsccache
.The fix for this is to use
cygpath
to convert from the Cygwin format back to native Windows format before adding to thePATH
.try-job: dist-aarch64-msvc
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-msvc-1
try-job: i686-msvc-2
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
try-job: dist-i686-mingw