Skip to content

feat(052): runtime-neutral MQTT connector #757

feat(052): runtime-neutral MQTT connector

feat(052): runtime-neutral MQTT connector #757

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
env:
CARGO_TERM_COLOR: always
jobs:
# Format and lint using Makefile
format-and-lint:
name: Format and Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
# A text comparison, so it needs no toolchain and can fail before we spend
# one. `make check` runs it again in comprehensive-check, which gates on
# three other jobs and would report drift far later.
- name: Check the devcontainer pin matches rust-toolchain.toml
run: make check-toolchain-pin
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Check formatting (workspace members only)
run: make fmt-check
- name: Run clippy on all valid feature combinations
run: make clippy
# Build and test using Makefile
makefile-build:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Build all valid feature combinations
run: make build
- name: Test all valid feature combinations
run: make test
- name: Check README quickstart drift
run: make readme-check
- name: Check codegen template drift
run: make codegen-drift
- name: Prove production is simulation-free
run: make check-no-sim
- name: Prove no library crate installs a process-global
run: make check-no-globals
# Embedded target testing
embedded-targets:
name: Embedded Cross-compilation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Test embedded cross-compilation
run: make test-embedded
wasm-browser-tests:
name: WASM Browser Tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
# wasm-pack downloads wasm-bindgen/wasm-opt binaries into here.
cache-directories: ~/.cache/.wasm-pack
# Prebuilt: the Makefile's fallback is `cargo install wasm-pack --locked`,
# a multi-minute source build on a cold runner.
- name: Install wasm-pack
uses: taiki-e/install-action@wasm-pack
# Chrome is preinstalled on the runner image, so this pins chromedriver to
# its major version; chromedriver refuses a browser it does not match.
- name: Install browser toolchain
run: make wasm-test-deps
- name: Run browser test suite
run: make wasm-test
# Miri: catches undefined behavior (e.g. use-after-free) in the embassy
# adapter's unsafe 'static lifetime extension (design 039 F1). Scoped to
# aimdb-embassy-adapter's host-std sync tests only — Miri is slow and can't
# drive the embassy-executor async tests.
miri:
name: Miri (aimdb-embassy-adapter)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Install Rust nightly with Miri
uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- name: Cache dependencies
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.lock') }}
- name: Run Miri on aimdb-embassy-adapter
run: |
cargo +nightly miri test -p aimdb-embassy-adapter \
--no-default-features --features "alloc,embassy-sync,embassy-time"
# Comprehensive validation using Makefile
comprehensive-check:
name: Comprehensive Development Check
runs-on: ubuntu-latest
needs: [format-and-lint, makefile-build, embedded-targets]
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Run comprehensive development check
run: make check
- name: Generate documentation
run: make doc
# `make check` runs every crate-level leg but not `examples`, so the demo
# binaries — the only end-to-end proof of the embedded path — were the one
# artifact CI never compiled. `all` is `build test examples`; the first two
# re-run here against a warm cache.
- name: Build everything, including the example binaries
run: make all