babble-bridge 0.1.3

simulation harness and CLI for BabbleSim/Zephyr RF simulation workflows
Documentation
name: test

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

concurrency:
  group: test-${{ github.ref }}
  cancel-in-progress: true

jobs:
  bare-metal:
    name: cargo test (bare metal)
    runs-on: ubuntu-latest
    timeout-minutes: 90

    steps:
      - name: Checkout (with submodules)
        uses: actions/checkout@v4
        with:
          submodules: recursive
          fetch-depth: 0

      - name: Set up Zephyr build host
        uses: ./.github/actions/setup-zephyr-host

      - name: Cache cargo registry + build
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
          restore-keys: |
            ${{ runner.os }}-cargo-

      - name: Build Zephyr + BabbleSim from source
        run: cargo xtask zephyr-setup --build-from-source

      - name: Run cargo test
        run: cargo test --all-features -- --nocapture

      - name: Upload bsim bin on failure
        if: failure()
        uses: actions/upload-artifact@v4
        with:
          name: bsim-bin-debug-${{ github.run_id }}
          path: external/tools/bsim/bin/
          if-no-files-found: ignore
          retention-days: 7