hilt 0.2.0

Renode-based hardware-in-the-loop test fixtures for embedded Rust projects
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt --check
      - run: cargo clippy --all-targets --all-features -- -D warnings
      - run: cargo test --all-features
      - run: cargo doc --no-deps

  # Boots the tests/fw firmware in real Renode (antmicro/renode via docker).
  # HILT_E2E_REQUIRED turns the e2e test's "skip when unavailable" into a
  # failure, so this job can never pass vacuously.
  e2e:
    runs-on: ubuntu-latest
    env:
      HILT_E2E_REQUIRED: "1"
      HILT_CONTAINER_RUNTIME: docker
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: thumbv6m-none-eabi
      - uses: Swatinem/rust-cache@v2
        with:
          workspaces: |
            .
            tests/fw
      - run: docker pull docker.io/antmicro/renode:latest
      - run: cargo test --test e2e -- --nocapture