build: Improve android build (#2439) #5370
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust clippy | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- stable | |
jobs: | |
linter: | |
name: Cargo clippy | |
runs-on: ubuntu-22.04 | |
container: | |
image: ghcr.io/${{ github.repository }}/opencv-builder@sha256:c55a187a86eac41e1381d1f305eb1f139c80ba0082dea1cd9f9b55e43329d8f3 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4.1.1 | |
with: | |
fetch-depth: 50 | |
submodules: 'recursive' | |
- name: Install system dependancies | |
run: | | |
sudo apt update | |
sudo apt install -y clang libclang-dev | |
- name: Install Rust stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: 1.84.0 | |
components: clippy | |
- name: Install uniffi_bindgen | |
uses: actions-rs/install@v0.1 | |
with: | |
crate: uniffi_bindgen | |
version: 0.22.0 # Must be in sync with version in Cargo.toml | |
use-tool-cache: true | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@27b8ea9368cf428f0bfe41b0876b1a7e809d9844 # v2.7.7 | |
with: | |
workspaces: rust -> rust/target | |
- name: cargo clippy | |
run: | | |
cd rust | |
cargo clippy --all-targets --all-features -- -D warnings |