on: [push, pull_request]
name: Continuous integration
jobs:
ci:
name: CI
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain:
- 1.0.0
- 1.6.0 - 1.10.0
- 1.15.0
- 1.20.0
- 1.25.0
- 1.26.0 - 1.30.0 - 1.31.0 - 1.36.0
- 1.37.0
- 1.40.0
- 1.45.0
- stable
- beta
steps:
- uses: actions/checkout@v1
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true
- name: Run tests
run: cargo test
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Run rustfmt
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
no_std:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: thumbv6m-none-eabi
override: true
- run: cargo build --target thumbv6m-none-eabi --verbose