Rust #59
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: Rust | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- "**.rs" | |
- "Cargo.toml" | |
pull_request: | |
branches: [ main ] | |
paths: | |
- "**.rs" | |
- "Cargo.toml" | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, ubuntu-20.04, macos-14] | |
features: [--all-features, --no-default-features] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Check cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run tests | |
run: cargo test --workspace --verbose ${{ matrix.features }} | |
- name: Run examples | |
run: cargo test --examples --verbose ${{ matrix.features }} |