fix(micro-espectre): limit CSI data to 128 bytes to prevent num_sc ov… #162
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] | |
| paths: | |
| - 'components/espectre/**' | |
| - 'micro-espectre/src/**' | |
| - 'micro-espectre/tests/**' | |
| - 'micro-espectre/requirements.txt' | |
| - 'test/**' | |
| - 'examples/*.yaml' | |
| - '.github/workflows/**' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'components/espectre/**' | |
| - 'micro-espectre/src/**' | |
| - 'micro-espectre/tests/**' | |
| - 'micro-espectre/requirements.txt' | |
| - 'test/**' | |
| - 'examples/*.yaml' | |
| - '.github/workflows/**' | |
| workflow_dispatch: # Manual trigger to warm up cache | |
| jobs: | |
| test-cpp: | |
| name: C++ Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| - name: Cache PlatformIO | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.platformio | |
| key: pio-test-${{ hashFiles('test/platformio.ini') }} | |
| restore-keys: | | |
| pio-test- | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install platformio gcovr | |
| - name: Run Tests with Coverage | |
| working-directory: test | |
| run: ./run_coverage.sh --ci | |
| - name: Upload Coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: test/coverage.xml,test/coverage.lcov | |
| flags: cpp | |
| fail_ci_if_error: true | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| test-python: | |
| name: Python Unit Tests (micro-espectre) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Dependencies | |
| run: pip install pytest pytest-cov numpy | |
| - name: Run Tests with Coverage | |
| working-directory: micro-espectre | |
| run: | | |
| pytest tests/ -v --cov=src --cov-report=xml --cov-report=term-missing | |
| - name: Upload Coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: micro-espectre/coverage.xml | |
| flags: python | |
| fail_ci_if_error: true | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| # Pre-cache job: downloads toolchain once, shared by all build jobs | |
| setup-cache: | |
| name: Setup Build Cache | |
| runs-on: ubuntu-latest | |
| outputs: | |
| cache-hit: ${{ steps.cache.outputs.cache-hit }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Cache PlatformIO | |
| id: cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.platformio | |
| ~/.esphome/cache | |
| key: pio-espidf-${{ hashFiles('components/espectre/**') }} | |
| restore-keys: | | |
| pio-espidf- | |
| - name: Install ESPHome and warm cache | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install esphome | |
| # Warm up cache by compiling one config (downloads all shared dependencies) | |
| esphome compile examples/espectre-c6.yaml | |
| build: | |
| name: ${{ matrix.qemu_chip && 'Smoke Test' || 'Build' }} ${{ matrix.chip }} | |
| runs-on: ubuntu-latest | |
| needs: setup-cache | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Standard builds (no QEMU) | |
| - chip: ESP32 | |
| config: examples/espectre-esp32.yaml | |
| - chip: ESP32-S2 | |
| config: examples/espectre-s2.yaml | |
| - chip: ESP32-S3 | |
| config: examples/espectre-s3.yaml | |
| - chip: ESP32-C3 | |
| config: examples/espectre-c3.yaml | |
| - chip: ESP32-C5 | |
| config: examples/espectre-c5.yaml | |
| - chip: ESP32-C6 | |
| config: examples/espectre-c6.yaml | |
| # QEMU smoke tests (examples/uart/) | |
| # Note: ESP32 original excluded - QEMU doesn't emulate PHY registers correctly | |
| - chip: ESP32-S3 | |
| config: examples/uart/espectre-s3.yaml | |
| qemu_chip: esp32s3 | |
| qemu_arch: xtensa | |
| qemu_machine: esp32s3 | |
| - chip: ESP32-C3 | |
| config: examples/uart/espectre-c3.yaml | |
| qemu_chip: esp32c3 | |
| qemu_arch: riscv32 | |
| qemu_machine: esp32c3 | |
| - chip: ESP32-C6 | |
| config: examples/uart/espectre-c6.yaml | |
| qemu_chip: esp32c6 | |
| qemu_arch: riscv32 | |
| qemu_machine: esp32c6 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Restore PlatformIO Cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.platformio | |
| ~/.esphome/cache | |
| key: pio-espidf-${{ hashFiles('components/espectre/**') }} | |
| restore-keys: | | |
| pio-espidf- | |
| - name: Install ESPHome | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install esphome | |
| - name: Compile | |
| run: esphome compile ${{ matrix.config }} | |
| # QEMU smoke test for UART builds | |
| - name: Run QEMU smoke test | |
| if: matrix.qemu_chip | |
| uses: ./.github/actions/qemu-smoke-test | |
| with: | |
| chip: ${{ matrix.qemu_chip }} | |
| arch: ${{ matrix.qemu_arch }} | |
| machine: ${{ matrix.qemu_machine }} | |
| - name: Upload QEMU logs | |
| if: matrix.qemu_chip && always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: qemu-logs-${{ matrix.qemu_machine }} | |
| path: qemu_output.log | |
| retention-days: 7 |