Skip to content

feat: add optional defmt support #69

feat: add optional defmt support

feat: add optional defmt support #69

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request: {}
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
strategy:
matrix:
include:
- toolchain: nightly
cargo-args: --all-features
- toolchain: stable
cargo-args: ""
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
components: clippy
- uses: actions-rs/cargo@v1
with:
toolchain: ${{ matrix.toolchain }}
command: clippy
args: ${{ matrix.cargo-args }} -- -D warnings
package:
name: Cargo package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: package
build_and_test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- toolchain: nightly
cargo-args: --all-features
- toolchain: stable
cargo-args: ""
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: thumbv6m-none-eabi
- name: Build
uses: actions-rs/cargo@v1
with:
toolchain: ${{ matrix.toolchain }}
command: build
args: --release ${{ matrix.cargo-args }}
- name: Build example
uses: actions-rs/cargo@v1
with:
toolchain: ${{ matrix.toolchain }}
command: build
args: --release --example stm32f042 --target thumbv6m-none-eabi
use-cross: true
- name: Test
uses: actions-rs/cargo@v1
with:
toolchain: ${{ matrix.toolchain }}
command: test
args: --lib ${{ matrix.cargo-args }}