Feat/retire aimdb ws protocol #583
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: thumbv7em-none-eabihf, wasm32-unknown-unknown | |
| components: rustfmt, clippy | |
| - name: Cache dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-format-${{ hashFiles('**/Cargo.lock') }} | |
| - 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: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: thumbv7em-none-eabihf, wasm32-unknown-unknown | |
| - name: Cache dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} | |
| - 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 | |
| # 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: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: thumbv7em-none-eabihf | |
| - name: Cache dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-embedded-${{ hashFiles('**/Cargo.lock') }} | |
| - 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: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| # 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 | |
| - name: Cache dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| ~/.cache/.wasm-pack | |
| target | |
| key: ${{ runner.os }}-cargo-wasm-browser-${{ hashFiles('**/Cargo.lock') }} | |
| # 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: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: thumbv7em-none-eabihf, wasm32-unknown-unknown | |
| components: rustfmt, clippy | |
| - name: Cache dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-comprehensive-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run comprehensive development check | |
| run: make check | |
| - name: Generate documentation | |
| run: make doc |