mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
Auto merge of #12812 - Alexendoo:driver-integration, r=flip1995
Manually set library paths in .github/driver.sh Fixes https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Windows.20CI.20failing Rustup 1.27.1 no longer adds `[SYSROOT]/bin` to `PATH` by default - https://github.com/rust-lang/rustup/issues/3825. This is fine for the packaged binaries since windows loads `dll`s from the folder the executable is in, but our built one is in a different folder There's an environment variable to get the old behaviour back, but as it's deprecated and not much code I think returning to setting it manually is fine changelog: none
This commit is contained in:
commit
6c8ff3f894
3 changed files with 15 additions and 14 deletions
19
.github/driver.sh
vendored
19
.github/driver.sh
vendored
|
@ -2,15 +2,18 @@
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
# Check sysroot handling
|
sysroot="$(rustc --print sysroot)"
|
||||||
sysroot=$(./target/debug/clippy-driver --print sysroot)
|
case $OS in
|
||||||
test "$sysroot" = "$(rustc --print sysroot)"
|
Linux) export LD_LIBRARY_PATH="$sysroot/lib" ;;
|
||||||
|
macOS) export DYLD_FALLBACK_LIBRARY_PATH="$sysroot/lib" ;;
|
||||||
|
Windows) export PATH="$(cygpath "$sysroot")/bin:$PATH" ;;
|
||||||
|
*) exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ ${OS} == "Windows" ]]; then
|
# Check sysroot handling
|
||||||
desired_sysroot=C:/tmp
|
test "$(./target/debug/clippy-driver --print sysroot)" = "$sysroot"
|
||||||
else
|
|
||||||
desired_sysroot=/tmp
|
desired_sysroot="target/sysroot"
|
||||||
fi
|
|
||||||
# Set --sysroot in command line
|
# Set --sysroot in command line
|
||||||
sysroot=$(./target/debug/clippy-driver --sysroot $desired_sysroot --print sysroot)
|
sysroot=$(./target/debug/clippy-driver --sysroot $desired_sysroot --print sysroot)
|
||||||
test "$sysroot" = $desired_sysroot
|
test "$sysroot" = $desired_sysroot
|
||||||
|
|
6
.github/workflows/clippy.yml
vendored
6
.github/workflows/clippy.yml
vendored
|
@ -69,6 +69,6 @@ jobs:
|
||||||
working-directory: clippy_dev
|
working-directory: clippy_dev
|
||||||
|
|
||||||
- name: Test clippy-driver
|
- name: Test clippy-driver
|
||||||
run: |
|
run: .github/driver.sh
|
||||||
TOOLCHAIN=$(rustup show active-toolchain | cut -f1 -d' ')
|
env:
|
||||||
rustup run $TOOLCHAIN bash .github/driver.sh
|
OS: ${{ runner.os }}
|
||||||
|
|
4
.github/workflows/clippy_bors.yml
vendored
4
.github/workflows/clippy_bors.yml
vendored
|
@ -116,9 +116,7 @@ jobs:
|
||||||
working-directory: clippy_dev
|
working-directory: clippy_dev
|
||||||
|
|
||||||
- name: Test clippy-driver
|
- name: Test clippy-driver
|
||||||
run: |
|
run: .github/driver.sh
|
||||||
TOOLCHAIN=$(rustup show active-toolchain | cut -f1 -d' ')
|
|
||||||
rustup run $TOOLCHAIN bash .github/driver.sh
|
|
||||||
env:
|
env:
|
||||||
OS: ${{ runner.os }}
|
OS: ${{ runner.os }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue