S188: Cross-primal doc cleanup — 550→425, capability-based language i… #81
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: Hardware Tests | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| hardware-tests: | |
| name: Hardware Tests (strandgate) | |
| runs-on: self-hosted | |
| needs: [] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Detect hardware | |
| run: | | |
| echo "=== DRI Devices ===" | |
| ls -la /dev/dri/ || true | |
| echo "" | |
| echo "=== GPU Identification ===" | |
| for card in /sys/class/drm/card*/device; do | |
| echo "$card: vendor=$(cat $card/vendor 2>/dev/null) device=$(cat $card/device 2>/dev/null)" | |
| done | |
| echo "" | |
| echo "=== NPU ===" | |
| lspci | grep -i "brainchip\|akida" || echo "No Akida NPU" | |
| echo "" | |
| echo "=== V4L2 ===" | |
| ls /dev/video* 2>/dev/null || echo "No V4L2 devices" | |
| - name: Run GPU tests (AMD + NVIDIA) | |
| run: | | |
| echo "--- AMD adapter (card0) ---" | |
| TOADSTOOL_GPU_ADAPTER=0 cargo test -p toadstool-runtime-gpu -p toadstool-runtime-universal -- --ignored --test-threads=1 || true | |
| echo "" | |
| echo "--- NVIDIA adapter (card1) ---" | |
| TOADSTOOL_GPU_ADAPTER=1 cargo test -p toadstool-runtime-gpu -p toadstool-runtime-universal -- --ignored --test-threads=1 || true | |
| echo "" | |
| echo "--- Auto adapter ---" | |
| TOADSTOOL_GPU_ADAPTER=auto cargo test -p toadstool-runtime-universal -- --ignored --test-threads=1 || true | |
| - name: Run NPU tests (Akida) | |
| if: always() | |
| run: | | |
| if [ -e "/dev/akida0" ]; then | |
| cargo test -p akida-driver -- --ignored --test-threads=1 | |
| else | |
| echo "Akida driver not loaded — skipping" | |
| fi | |
| - name: Run display tests (V4L2) | |
| if: always() | |
| run: | | |
| if ls /dev/video* &>/dev/null; then | |
| cargo test -p toadstool-display -- --ignored --test-threads=1 | |
| else | |
| echo "No V4L2 capture device — skipping" | |
| fi | |
| hardware-coverage: | |
| name: Hardware Coverage (strandgate) | |
| runs-on: self-hosted | |
| needs: [hardware-tests] | |
| if: github.event_name == 'push' | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install llvm-cov | |
| run: cargo install cargo-llvm-cov --locked 2>/dev/null || true | |
| - name: Run coverage with hardware | |
| run: ./scripts/run-hardware-tests.sh coverage | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: hardware-coverage | |
| path: target/llvm-cov/html/ | |
| retention-days: 14 |