Initial commit #20
Workflow file for this run
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: CI | |
on: [pull_request, push] | |
env: | |
CARGO_INCREMENTAL: 0 | |
RUSTFLAGS: "-C debuginfo=0 -D warnings" | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
toolchain: [stable, 1.56] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
- name: Configure cache | |
uses: Swatinem/rust-cache@v1 | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Rust (nightly) | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
components: rustfmt | |
- name: Run rustfmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
- name: Setup Rust (stable) | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Configure cache | |
uses: Swatinem/rust-cache@v1 | |
- name: Run clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-features -- -D warnings | |
cargo-deny: | |
name: Cargo Deny | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
checks: | |
- advisories | |
- bans licenses sources | |
continue-on-error: ${{ matrix.checks == 'advisories' }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check ${{ matrix.checks }} | |
uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check ${{ matrix.checks }} |