blob: 13ea825684d84ff41169bf7b380b7e3da33f1274 [file] [edit]
name: Rust
"on":
push:
branches:
- master
- main
pull_request:
branches:
- "**"
jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust_version: ['stable', 'beta', 'nightly']
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust_version }}
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose
lint:
name: Lint Check
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust_version: ['nightly']
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Lint
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt
- name: Lint
run: cargo +nightly fmt -- --check
clippy:
name: Clippy Check
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust_version: ['stable']
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- name: Clippy
run: cargo clippy-outdated