Skip to content

build: Improve android build #5616

build: Improve android build

build: Improve android build #5616

name: Rust backend test for android
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- master
- stable
jobs:
check:
name: Cargo test on Ubuntu
runs-on: ubuntu-22.04
container:
image: ghcr.io/${{ github.repository }}/opencv-builder:4.11.0
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
- name: Install cargo-nextest
uses: baptiste0928/cargo-install@1cd874a5478fdca35d868ccc74640c5aabbb8f1b # v3.0.0
with:
crate: cargo-nextest
version: 0.9
- 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: false
# - name: Rust Cache
# uses: Swatinem/rust-cache@27b8ea9368cf428f0bfe41b0876b1a7e809d9844 # v2.7.7
# with:
# workspaces: rust -> rust/target
- name: cargo nextest
run: |
cd rust
cargo nextest run --retries 2 --locked
cargo nextest run --no-default-features --features active --retries 2 --locked
cargo nextest run --no-default-features --retries 2 --locked