Skip to content

Merge pull request #27 from Ralith/remove-ub #121

Merge pull request #27 from Ralith/remove-ub

Merge pull request #27 from Ralith/remove-ub #121

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
build:
timeout-minutes: 5
strategy:
matrix:
rust_version: [stable, "1.51"]
os: [windows-latest, macos-latest, ubuntu-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Rust toolchain
id: setup-rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust_version }}
components: rustfmt, clippy
default: true
override: true
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.os }}-${{ steps.setup-rust.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-${{ steps.setup-rust.outputs.rustc_hash }}
- uses: actions-rs/cargo@v1
with:
command: build
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions-rs/cargo@v1
with:
command: clippy
if: matrix.rust_version == 'stable'
cargo-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Rust toolchain
run: |
rustup component add rustfmt
- name: Rustfmt
run: |
cargo fmt -- --check
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: EmbarkStudios/cargo-deny-action@v1
with:
log-level: warn
command: check
arguments: --all-features