mirror of
https://github.com/ruffle-rs/ruffle-android.git
synced 2024-11-26 23:20:22 +00:00
Add CI for linting
This commit is contained in:
parent
bf88d5c8e6
commit
d60c614630
53
.github/workflows/lint.yml
vendored
Normal file
53
.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
name: Lint & Format
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
rust:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: stable
|
||||
targets: aarch64-linux-android
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: Install cargo-ndk
|
||||
run: cargo install cargo-ndk
|
||||
|
||||
- name: Check clippy
|
||||
run: cargo ndk -t arm64-v8a -- clippy --all --all-features --tests -- -D warnings
|
||||
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4.2.1
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- uses: gradle/wrapper-validation-action@v2
|
||||
name: Validate Gradle Wrapper
|
||||
|
||||
- name: Validate ktlint
|
||||
run: ./gradlew ktlintCheck
|
Loading…
Reference in New Issue
Block a user