Skip to content

Commit

Permalink
Add individual clippy checks based on features to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Dec 17, 2023
1 parent 7ce5d46 commit 3e18409
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/c_bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ jobs:
- name: Test dummies
run: ./bindings/c/tests/test_checksum_dummies.sh

check_clippy_c_bindings:
name: Check clippy for C bindings
runs-on: ubuntu-latest

steps:
- name: Checkout reposistory
uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Setup clippy
run: rustup component add clippy

- name: Run clippy
run: cargo clippy --all-targets --features c_bindings -- -D warnings

release:
name: Release ${{ matrix.crate-type }} for ${{ matrix.target }}
runs-on: ubuntu-20.04
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/maturin_upload_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,31 @@ jobs:
name: wheels
path: dist

check_clippy_python_bindings:
name: Check clippy for C bindings
runs-on: ubuntu-latest

steps:
- name: Checkout reposistory
uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Setup clippy
run: rustup component add clippy

- name: Run clippy
run: cargo clippy --all-targets --features python_bindings -- -D warnings

release:
name: Release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [linux, windows, macos, sdist]
needs: [linux, windows, macos, sdist, check_clippy_python_bindings]
strategy:
fail-fast: false
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_crate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: rustup component add clippy

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo clippy --all-targets -- -D warnings

run_tests:
name: Run tests
Expand Down

0 comments on commit 3e18409

Please sign in to comment.