Skip to content

Add optional defmt::Format support for generated types. #229

Add optional defmt::Format support for generated types.

Add optional defmt::Format support for generated types. #229

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
env:
CARGO_INCREMENTAL: 0
RUSTUP_MAX_RETRIES: 10
CARGO_NET_RETRY: 10
RUST_BACKTRACE: full
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
rust:
name: Rust
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo target dir
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --all --verbose
- name: Tests
run: cargo test --all --verbose
- name: Install Rust targets we use for embedded
run: rustup target install thumbv7em-none-eabihf
- name: Build for embedded
run: cargo build -p can-embedded --target=thumbv7em-none-eabihf --no-default-features
- name: Install clippy
run: rustup component add clippy
- name: Annotate commit with clippy warnings
if: startsWith(matrix.os, 'ubuntu')
run: cargo clippy --all --all-features