name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: "--deny warnings"
RUSTFLAGS: "--deny warnings"
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["windows-latest", "ubuntu-latest"]
toolchain: ["stable", "nightly"]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v2
- name: Install latest ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.target }}
profile: minimal
toolchain: ${{ matrix.toolchain }}
components: clippy
- name: Build
run: cargo build --target ${{ matrix.target }} --all-features
- name: Test
run: cargo test --target ${{ matrix.target }} --all-features
- name: Generate documentation
run: cargo doc --all-features
- name: Clippy check
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features