name: Build
on:
push:
branches: [ main ]
paths-ignore:
- .git*
- scripts/**
- README.md
pull_request:
branches: [ main ]
jobs:
all-build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, nightly]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout...
uses: actions/checkout@v2
- name: rustup
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --all
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings