name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
rust:
- stable
- 1.56.0 cargo_args:
- ""
- --features serde
include:
- os: ubuntu-latest
rust: nightly
cargo_args: ""
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: ${{ matrix.cargo_args }}
- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: ${{ matrix.cargo_args }}
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.cargo_args }}
- name: Run cargo bench
uses: actions-rs/cargo@v1
if: ${{ matrix.rust == 'nightly' }}
with:
command: bench
args: ${{ matrix.cargo_args }}