Acceptance gates (#205) #331
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: Acceptance gates (#205) | |
| on: | |
| # Don't run on every PR -- these tests take 10+ minutes each because they | |
| # download Teensyduino + arm-gcc + STM32duino. Trigger explicitly. | |
| workflow_dispatch: | |
| schedule: | |
| # Nightly at 04:00 UTC. Catches drift in Teensyduino / STM32duino | |
| # framework downloads and fbuild's resolver behaviour. | |
| - cron: '0 4 * * *' | |
| pull_request: | |
| paths: | |
| # Run when something that could affect resolver behaviour changes. | |
| - 'crates/fbuild-header-scan/**' | |
| - 'crates/fbuild-library-select/**' | |
| - 'crates/fbuild-build/src/framework_libs.rs' | |
| - 'crates/fbuild-build/src/teensy/**' | |
| - 'crates/fbuild-build/src/stm32/**' | |
| - 'crates/fbuild-build/tests/teensylc_acceptance.rs' | |
| - 'crates/fbuild-build/tests/teensy30_acceptance.rs' | |
| - 'crates/fbuild-build/tests/teensy41_acceptance.rs' | |
| - 'crates/fbuild-build/tests/stm32_acceptance.rs' | |
| - '.github/workflows/acceptance-205.yml' | |
| # Auto-cancel superseded PR runs: pushing again to a feature branch | |
| # supersedes the in-flight run instead of queueing behind it. Non-PR | |
| # events key on run_id so each gets its own group -- a shared group keeps | |
| # only ONE pending run, which would silently drop queued main SHAs. | |
| concurrency: | |
| group: acceptance-205.yml-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-D warnings" | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| jobs: | |
| acceptance: | |
| name: Acceptance (${{ matrix.gate }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - gate: teensyLC | |
| test_bin: teensylc_acceptance | |
| test_fn: teensylc_blink_meets_205_acceptance_criteria | |
| - gate: teensy30 AnalogOutput | |
| test_bin: teensy30_acceptance | |
| test_fn: teensy30_analog_output_meets_205_ac2 | |
| - gate: stm32f103c8 SPI | |
| test_bin: stm32_acceptance | |
| test_fn: stm32f103c8_blink_with_spi_auto_discovers_library_205_ac4 | |
| - gate: teensy41 cold resolver | |
| test_bin: teensy41_acceptance | |
| test_fn: teensy41_cold_library_selection_meets_205_ac6 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v3 | |
| - name: Setup soldr | |
| uses: zackees/setup-soldr@v0 | |
| with: | |
| cache: true | |
| build-cache: true | |
| target-cache: true | |
| prebuild-deps: none | |
| # Opt out of the implicit `SOLDR_LINKER=fast` injection so cargo / | |
| # rust-toolchain.toml stays in charge. Silences the routine | |
| # "defaulting SOLDR_LINKER=fast" warning (issue #400 / | |
| # setup-soldr#377). | |
| linker: platform-default | |
| # Acceptance gates compile a full test binary; payload may exceed | |
| # the 512 MiB action default (issue #400). Raise the soft warn | |
| # threshold; hard cap stays at the action default (6 GiB). | |
| cache-payload-warn-bytes: 2GiB | |
| - name: Run ${{ matrix.gate }} acceptance gate | |
| run: | | |
| soldr cargo test -p fbuild-build --test ${{ matrix.test_bin }} -- --ignored --exact ${{ matrix.test_fn }} --nocapture --test-threads=1 |