Refactorings of p2p
crate
#651
Workflow file for this run
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
name: Cargo | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
name: Build & Test | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'macos-latest'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get install -y libhidapi-dev libusb-1.0-0-dev | |
- uses: actions/checkout@v2 | |
- name: Build | |
run: cargo build --verbose | |
env: | |
RUSTFLAGS: -D warnings | |
RUST_BACKTRACE: 1 | |
- name: Run tests | |
run: cargo test --all --verbose | |
docs: | |
name: Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dependencies | |
run: sudo apt-get install -y libhidapi-dev libusb-1.0-0-dev | |
- uses: actions/checkout@v2 | |
- name: Docs | |
run: cargo doc --all | |
env: | |
RUSTDOCFLAGS: -D warnings | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dependencies | |
run: sudo apt-get install -y libhidapi-dev libusb-1.0-0-dev | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.65 | |
profile: minimal | |
components: clippy, rustfmt | |
override: true | |
- name: Cache cargo registry | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/registry | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
- name: Run clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all --tests | |
env: | |
RUSTFLAGS: -D warnings | |
- name: Check formating | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check |