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:
fail-fast: false
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 }}
toolchain: ${{ matrix.toolchain }}
components: clippy
override: true
- name: Build
run: cargo build --target ${{ matrix.target }} ${{ matrix.toolchain == 'nightly' && '--all-features' || '--features latest' }}
- name: Generate documentation
run: cargo doc ${{ matrix.toolchain == 'nightly' && '--all-features' || '--features latest' }}
- name: Clippy check
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: ${{ matrix.toolchain == 'nightly' && '--all-features' || '--features latest' }}