fix clippy #75
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: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
BUILD_TYPE: ["Debug"] | |
os: [ windows-2022 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install rust stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
# enable cache | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run cargo check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
- uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Run cargo clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
- name: Run cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: -- --nocapture | |
# coverage | |
- name: run cmake | |
run: > | |
cmake . -DCMAKE_BUILD_TYPE=Debug -B build | |
- name: run coverage | |
run: | | |
cmake --build build --config Debug --target cov_all | |
cmake --build build --config Debug --target cov_summary | |
- name: Upload Report to Codecov | |
if: ${{ matrix.BUILD_TYPE == 'Debug' }} | |
uses: codecov/codecov-action@v2 | |
with: | |
files: ./lcov.info | |
fail_ci_if_error: true | |
functionalities: fix |