Skip to content

ci: add macos to ci, switch to matrix build #961

ci: add macos to ci, switch to matrix build

ci: add macos to ci, switch to matrix build #961

Workflow file for this run

name: cargo-checks
on:
push:
branches: [ "main" ]
paths:
- Cargo.*
- src/**/*
- keyberon/**/*
- cfg_samples/**/*
- parser/**/*
- test_cfgs/**/*
- .github/workflows/**/*
pull_request:
branches: [ "main" ]
paths:
- Cargo.*
- src/**/*
- keyberon/**/*
- parser/**/*
- cfg_samples/**/*
- test_cfgs/**/*
- .github/workflows/**/*
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:
# You can add more, for any target you'd like!
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-musl
- build: macos
os: macos-latest
target: x86_64-apple-darwin
- build: windows
os: windows-latest
target: x86_64-pc-windows-msvc
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
run: cargo test --all
- name: Run tests all features
run: cargo test --all --all-features
- name: Run clippy no features
run: cargo clippy --all -- -D warnings
- name: Run clippy all features
run: cargo clippy --all --all-features -- -D warnings