refactor: use struct for intermediate cfg instead of tuple (#824) #2
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-checks | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- Cargo.* | |
- src/**/* | |
- keyberon/**/* | |
- cfg_samples/**/* | |
- parser/**/* | |
- .github/workflows/rust.yml | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- Cargo.* | |
- src/**/* | |
- keyberon/**/* | |
- parser/**/* | |
- cfg_samples/**/* | |
- .github/workflows/rust.yml | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check fmt | |
run: cargo fmt --all --check | |
build-test-clippy: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- build: linux | |
os: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
- build: windows | |
os: windows-latest | |
target: x86_64-pc-windows-msvc | |
- build: macos | |
os: macos-latest | |
target: x86_64-apple-darwin | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "persist-cross-job" | |
workspaces: ./ | |
- run: rustup component add clippy | |
- name: Run tests no features | |
run: cargo test --all --no-default-features | |
- name: Run clippy no features | |
run: cargo clippy --all --no-default-features -- -D warnings | |
- name: Run tests default features | |
run: cargo test --all | |
- name: Run clippy default features | |
run: cargo clippy --all -- -D warnings | |
- name: Run tests all features | |
run: cargo test --all --all-features | |
- name: Run clippy all features | |
run: cargo clippy --all --all-features -- -D warnings |