Auto merge of #12382 - Alexendoo:macos-ci, r=flip1995

Bump macOS CI version to 13

I looked into the random failures we've been getting on macOS CI, not entirely sure what is going on but it seems to be an issue out of our department. A [plain driver](314425001d/src/driver.rs) being ran on the test files [without `ui_test` or any special flags](314425001d/src/driver.rs) hit the same issue

It didn't occur on `macos-13` the few times I tried it though so let's upgrade to that. [The current `macos-latest` refers to `macos-12`](https://github.com/actions/runner-images?tab=readme-ov-file#available-images), later this year it will refer to `macos-14` which runs on `aarch64` so specifying the version for our x64 macOS tests will also save a future headache

r? `@flip1995`

changelog: none
This commit is contained in:
bors 2024-02-29 16:14:14 +00:00
commit 3b8da4ac4b
3 changed files with 11 additions and 36 deletions

4
.github/driver.sh vendored
View File

@ -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)

View File

@ -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

View File

@ -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 }}