25 lines
818 B
YAML
Raw Normal View History

2022-05-07 22:13:13 +02:00
name: rust
on: [push, pull_request]
2022-03-31 21:44:48 +02:00
jobs:
build:
2022-05-18 14:32:12 +02:00
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
# runs-on: ubuntu-latest
2022-03-31 21:44:48 +02:00
steps:
2022-05-07 22:13:13 +02:00
- uses: actions/checkout@v2
- run: rustup update stable
- name: Cache cargo build
uses: actions/cache@v1
2022-05-13 10:15:12 +02:00
with:
path: target
2022-05-18 14:32:12 +02:00
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
# key: ubuntu-latest-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
2022-05-07 22:13:13 +02:00
- run: rustup component add rustfmt
- run: rustup component add clippy
- run: cargo build --all-features
- run: cargo test --all-features
- run: cargo fmt --all -- --check
- run: cargo clippy --all-features --all-targets -- --deny warnings