From ce4b81d2a71129bd84f63f5c86258ed5c20f040f Mon Sep 17 00:00:00 2001 From: Alex Macleod Date: Wed, 28 Feb 2024 22:37:00 +0000 Subject: [PATCH] Bump macOS CI version to 13 --- .github/driver.sh | 4 ++-- .github/workflows/clippy.yml | 11 +++-------- .github/workflows/clippy_bors.yml | 32 ++++++------------------------- 3 files changed, 11 insertions(+), 36 deletions(-) diff --git a/.github/driver.sh b/.github/driver.sh index 11fd6b5c79e..2eafdd0fbc8 100755 --- a/.github/driver.sh +++ b/.github/driver.sh @@ -50,11 +50,11 @@ diff -u normalized.stderr tests/ui/double_neg.stderr # make sure "clippy-driver --rustc --arg" and "rustc --arg" behave the same SYSROOT=$(rustc --print sysroot) -diff -u <(LD_LIBRARY_PATH=${SYSROOT}/lib ./target/debug/clippy-driver --rustc --version --verbose) <(rustc --version --verbose) +diff -u <(./target/debug/clippy-driver --rustc --version --verbose) <(rustc --version --verbose) echo "fn main() {}" >target/driver_test.rs # we can't run 2 rustcs on the same file at the same time -CLIPPY=$(LD_LIBRARY_PATH=${SYSROOT}/lib ./target/debug/clippy-driver ./target/driver_test.rs --rustc) +CLIPPY=$(./target/debug/clippy-driver ./target/driver_test.rs --rustc) RUSTC=$(rustc ./target/driver_test.rs) diff -u <($CLIPPY) <($RUSTC) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 5ba960db66d..603f91a910b 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -44,11 +44,6 @@ jobs: run: rustup show active-toolchain # Run - - name: Set LD_LIBRARY_PATH (Linux) - run: | - SYSROOT=$(rustc --print sysroot) - echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV - - name: Build run: cargo build --tests --features deny-warnings,internal @@ -72,6 +67,6 @@ jobs: working-directory: clippy_dev - name: Test clippy-driver - run: bash .github/driver.sh - env: - OS: ${{ runner.os }} + run: | + TOOLCHAIN=$(rustup show active-toolchain | cut -f1 -d' ') + rustup run $TOOLCHAIN bash .github/driver.sh diff --git a/.github/workflows/clippy_bors.yml b/.github/workflows/clippy_bors.yml index 012797e5ca7..0bc28c1f9d9 100644 --- a/.github/workflows/clippy_bors.yml +++ b/.github/workflows/clippy_bors.yml @@ -59,7 +59,7 @@ jobs: host: i686-unknown-linux-gnu - os: windows-latest host: x86_64-pc-windows-msvc - - os: macos-latest + - os: macos-13 host: x86_64-apple-darwin runs-on: ${{ matrix.os }} @@ -87,23 +87,6 @@ jobs: rustup show active-toolchain # Run - - name: Set LD_LIBRARY_PATH (Linux) - if: runner.os == 'Linux' - run: | - SYSROOT=$(rustc --print sysroot) - echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV - - name: Link rustc dylib (MacOS) - if: runner.os == 'macOS' - run: | - SYSROOT=$(rustc --print sysroot) - sudo mkdir -p /usr/local/lib - sudo find "${SYSROOT}/lib" -maxdepth 1 -name '*dylib' -exec ln -s {} /usr/local/lib \; - - name: Set PATH (Windows) - if: runner.os == 'Windows' - run: | - SYSROOT=$(rustc --print sysroot) - echo "$SYSROOT/bin" >> $GITHUB_PATH - - name: Build run: cargo build --tests --features deny-warnings,internal @@ -136,7 +119,9 @@ jobs: working-directory: clippy_dev - name: Test clippy-driver - run: bash .github/driver.sh + run: | + TOOLCHAIN=$(rustup show active-toolchain | cut -f1 -d' ') + rustup run $TOOLCHAIN bash .github/driver.sh env: OS: ${{ runner.os }} @@ -236,11 +221,6 @@ jobs: - name: Install toolchain run: rustup show active-toolchain - - name: Set LD_LIBRARY_PATH - run: | - SYSROOT=$(rustc --print sysroot) - echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV - # Download - name: Download target dir uses: actions/download-artifact@v3 @@ -254,8 +234,8 @@ jobs: # Run - name: Test ${{ matrix.integration }} run: | - RUSTUP_TOOLCHAIN="$(rustup show active-toolchain | grep -o -E "nightly-[0-9]{4}-[0-9]{2}-[0-9]{2}")" \ - $CARGO_TARGET_DIR/debug/integration --show-output + TOOLCHAIN=$(rustup show active-toolchain | cut -f1 -d' ') + rustup run $TOOLCHAIN $CARGO_TARGET_DIR/debug/integration --show-output env: INTEGRATION: ${{ matrix.integration }}