defmt-serial 0.7.0

Log defmt-messages over serial
Documentation
name: Rust tests

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

env:
  CARGO_TERM_COLOR: always
  DEFMT_LOG: debug

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Install latest nightly
        uses: actions-rs/toolchain@v1
        with:
            toolchain: nightly
            override: true

      - name: Install deps
        run: |
          sudo apt-get -y update
          sudo apt-get -y install build-essential libssl-dev gcc-arm-none-eabi binutils-arm-none-eabi libclang-dev clang curl git
          cargo install defmt-print

      - name: Add rust target for thumbv6m, thumbv7em and musl
        run: |
          rustup target add thumbv7em-none-eabihf
          rustup target add thumbv6m-none-eabi
          rustup target add x86_64-unknown-linux-musl

      - name: Build
        run: cargo build --verbose

      - name: Build artemis example
        working-directory: example-artemis
        run: cargo build --verbose

      - name: Build pi-pico example
        working-directory: example-pi-pico
        run: cargo build --verbose

      - name: Build std example
        working-directory: example-std
        run: cargo build --verbose

      - name: Run std example
        working-directory: example-std
        run: cargo run --verbose