Skip to content

Correct an Android NPE #428

Correct an Android NPE

Correct an Android NPE #428

Workflow file for this run

name: Rust
on:
push:
branches: [dev, master]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
grcov-version: 0.8.0
jobs:
build:
strategy:
matrix:
os:
- macOS-latest
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install libdbus-1-dev
- name: Check
run: cargo check --all --bins --examples
- name: Check without default features
run: cargo check --all --bins --examples --no-default-features
- name: Check with all features
run: cargo check --all --bins --examples --all-features
- name: Run tests
run: cargo test --all
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
name: clippy ${{ matrix.os }}
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Format Rust code
run: cargo fmt --all -- --check
# coverage:
# strategy:
# matrix:
# os:
# - macOS-latest
# - ubuntu-latest
# - windows-latest
# runs-on: ${{ matrix.os }}
#
# env:
# RUSTC_BOOTSTRAP: 1
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# if: ${{ runner.os == 'Linux' }}
# run: sudo apt-get install libdbus-1-dev
# - name: Cache grcov
# uses: actions/cache@v2
# with:
# path: |
# ~/.cargo/bin/grcov
# ~/.cargo/bin/grcov.exe
# ~/.cargo/.crates.toml
# ~/.cargo/.crates2.json
# key: ${{ runner.os }}-cargo-bin-${{ env.grcov-version }}
# - name: Install grcov
# uses: actions-rs/[email protected]
# with:
# crate: grcov
# version: ${{ env.grcov-version }}
# - name: Install llvm-tools
# run: rustup component add llvm-tools-preview
# - name: Build for coverage
# run: cargo build --all-features
# env:
# RUSTFLAGS: "-Zinstrument-coverage -Ccodegen-units=1"
# - name: Run tests with coverage
# run: cargo test --all-features
# env:
# RUSTFLAGS: "-Zinstrument-coverage"
# LLVM_PROFILE_FILE: "test-coverage-%p-%m.profraw"
# - name: Convert coverage
# run: grcov . -s . --binary-path target/debug/ -t lcov --branch --ignore-not-existing -o target/debug/lcov.info
# - name: Upload coverage to codecov.io
# uses: codecov/codecov-action@v1
# with:
# directory: ./target/debug
# fail_ci_if_error: true