Fix android compatibility issue #12
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
on: [push, pull_request] | |
name: bita-CI | |
env: | |
MSRV: 1.74.1 | |
jobs: | |
# Run bita tests. | |
bita: | |
name: "bita tests" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
rust: | |
- stable | |
- nightly | |
- $MSRV | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: build | |
run: cargo build | |
- name: test | |
run: cargo test --verbose | |
- name: bita lzma/zstd compression tests | |
run: cargo test --verbose --features lzma-compression,zstd-compression | |
# Verify that bita with rustls doesn't link to libssl. | |
no-ssl: | |
name: "bita+rustls" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Verify build without libssl | |
run: ./scripts/test-no-ssl-build.sh | |
# Run formatting check. | |
fmt: | |
name: formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: 1.77.2 | |
components: rustfmt | |
- name: Check formatting | |
run: cargo fmt -p bita -- --check | |
# Run clippy check. | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: 1.77.2 | |
components: clippy | |
- name: Check lints | |
run: cargo clippy -p bita -- -D warnings -A clippy::cognitive-complexity |