Skip to content

Commit

Permalink
Run CI checks for Rust 2024 as well
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Oct 30, 2024
1 parent c8c3d84 commit 2b41f9a
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,52 @@ jobs:
run: .github/driver.sh
env:
OS: ${{ runner.os }}

base-2024:
# NOTE: If you modify this job, make sure you copy the changes to clippy_bors.yml
runs-on: ubuntu-latest

steps:
# Setup
- name: Checkout
uses: actions/checkout@v4

- name: Select Rust 2024 edition
run: |
for i in clippy_config clippy_dev clippy_lints clippy_utils lintcheck; do
sed -i \
-e '1icargo-features = ["edition2024"]' \
-e 's/edition = "2021"/edition = "2024"/' \
$i/Cargo.toml
done
- name: Install toolchain
run: rustup show active-toolchain

# Run
- name: Build
run: cargo build --tests --features internal

- name: Test
run: cargo test --features internal

- name: Test clippy_lints
run: cargo test --features internal
working-directory: clippy_lints

- name: Test clippy_utils
run: cargo test
working-directory: clippy_utils

- name: Test rustc_tools_util
run: cargo test
working-directory: rustc_tools_util

- name: Test clippy_dev
run: cargo test
working-directory: clippy_dev

- name: Test clippy-driver
run: .github/driver.sh
env:
OS: ${{ runner.os }}
17 changes: 17 additions & 0 deletions .github/workflows/clippy_bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,19 @@ jobs:
include:
- os: ubuntu-latest
host: x86_64-unknown-linux-gnu
edition: 2021
- os: ubuntu-latest
host: x86_64-unknown-linux-gnu
edition: 2024
- os: ubuntu-latest
host: i686-unknown-linux-gnu
edition: 2021
- os: windows-latest
host: x86_64-pc-windows-msvc
edition: 2021
- os: macos-13
host: x86_64-apple-darwin
edition: 2021

runs-on: ${{ matrix.os }}

Expand All @@ -79,6 +86,16 @@ jobs:
sudo apt-get update
sudo apt-get install gcc-multilib zlib1g-dev:i386
- name: Select Rust 2024 edition
if: matrix.edition == 2024
run: |
for i in clippy_config clippy_dev clippy_lints clippy_utils lintcheck; do
sed -i \
-e '1icargo-features = ["edition2024"]' \
-e 's/edition = "2021"/edition = "2024"/' \
$i/Cargo.toml
done
- name: Install toolchain
run: |
rustup set default-host ${{ matrix.host }}
Expand Down

0 comments on commit 2b41f9a

Please sign in to comment.