Skip to content

ci: add Android and Rust CI workflows #2

ci: add Android and Rust CI workflows

ci: add Android and Rust CI workflows #2

Workflow file for this run

name: Rust Continuous Integration
on:
push:
paths:
- "floresta-ffi/**"
pull_request:
paths:
- "floresta-ffi/**"
permissions: {}
jobs:
test:
name: "Run tests"
runs-on: ubuntu-24.04
defaults:
run:
working-directory: floresta-ffi
steps:
- name: "Checkout"
uses: actions/checkout@v5
with:
persist-credentials: false
- name: "Set up Rust"
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
- name: "Check Cargo.lock"
run: |
if ! cargo check --locked; then
echo "::error::Cargo.lock is stale. Run 'cargo generate-lockfile'."
exit 1
fi
- name: "Build"
run: cargo build
- name: "Test"
run: cargo test
check:
name: "Run clippy and fmt"
needs: test
runs-on: ubuntu-24.04
defaults:
run:
working-directory: floresta-ffi
steps:
- name: "Checkout"
uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
components: clippy, rustfmt
- name: "Check fmt"
run: cargo fmt --all -- --check
- name: "Check clippy"
run: cargo clippy --all-targets