name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [stable, beta, nightly]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: build
uses: actions-rs/cargo@v1
with:
command: build
args: "--verbose"
- name: test --tests
uses: actions-rs/cargo@v1
with:
command: test
args: "--verbose --tests"
- name: test --doc
uses: actions-rs/cargo@v1
with:
command: test
args: "--verbose --doc"
- name: doc
uses: actions-rs/cargo@v1
with:
command: doc
args: "--verbose"
- name: build --release
uses: actions-rs/cargo@v1
with:
command: build
args: "--verbose --release"