Repository navigation
fix(esp32): resolve unified toolchain by registry version for pioardu… #2369
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: Check Ubuntu | ||
| on: | ||
| workflow_dispatch: {} | ||
| workflow_call: | ||
| inputs: | ||
| ref: | ||
| type: string | ||
| required: false | ||
| default: "" | ||
| # 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: check-ubuntu.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: | ||
| check: | ||
| name: Check (ubuntu-latest) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: ${{ inputs.ref }} | ||
| - name: Verify candidate SHA | ||
| if: inputs.ref != '' | ||
| env: | ||
| CANDIDATE_SHA: ${{ inputs.ref }} | ||
| run: | | ||
| [[ "$CANDIDATE_SHA" =~ ^[0-9a-f]{40}$ ]] | ||
| test "$(git rev-parse HEAD)" = "$CANDIDATE_SHA" | ||
| - uses: astral-sh/setup-uv@v3 | ||
| - name: Setup soldr | ||
| id: setup-soldr | ||
| uses: zackees/setup-soldr@67ed4018aca013f8388050ac9bc264244f9b742c | ||
| with: | ||
| # Own build-cache store (setup-soldr#237): with no suffix this job | ||
| # shared one Cargo.lock-keyed entry with ~10 other workflows, and | ||
| # the first small job to save it (165 MB) froze it -- an exact hit | ||
| # never re-saves -- so every run recompiled ~240 crates. | ||
| cache-key-suffix: check-ubuntu | ||
| 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 | ||
| # Realistic zccache payload for the workspace check job is | ||
| # ~1.5–2 GiB (issue #400). Raise the soft warn threshold above | ||
| # the steady-state size so the action only flags genuinely | ||
| # runaway caches. Hard cap stays at the action default (6 GiB). | ||
| cache-payload-warn-bytes: 2GiB | ||
| # Distinct from python-facade-tests below. With one shared key the | ||
| # job that finishes first owns the immutable entry: the facade job's | ||
| # 166MB fbuild-python-only cache won over this job's 479MB save, and | ||
| # PRs restored it at a 28-32% hit rate. | ||
| cache-key-suffix: check-ubuntu | ||
| # No separate `cargo check`: clippy type-checks the same | ||
| # `--workspace --all-targets` set, so a prior check only re-did that work. | ||
| # Measured locally (fresh target dir, warm zccache): check+clippy 194s | ||
| # vs clippy alone 106s. | ||
| - name: Clippy | ||
| run: soldr cargo clippy --workspace --all-targets -- -D warnings | ||
| # Both guards are stdlib-only. `--no-project` skips building the fbuild | ||
| # package, whose soldr build backend is pinned older than the broker | ||
| # setup-soldr started, and the mismatched daemon refused every compile. | ||
| - name: Lint subprocess spawns | ||
| run: uv run --no-project python ci/find_direct_subprocess.py --fail | ||
| - name: Guard production USB VID/PID catalogue literals | ||
| run: uv run --no-project python ci/check_usb_vidpid_literals.py | ||
| - name: Test | ||
| run: soldr cargo test --workspace | ||
| python-facade-tests: | ||
| # FastLED/fbuild#1485 §5.2/§6: the embedded-CPython AT-P integration | ||
| # tests need libpython at link and run time, so they're `#[ignore]`d | ||
| # out of the default `soldr cargo test --workspace` sweep above and run | ||
| # here instead, under a pinned interpreter, with `--ignored`. | ||
| # No LD_LIBRARY_PATH export: crates/fbuild-python/build.rs bakes the | ||
| # PYO3_PYTHON libdir into the test binaries' RUNPATH (#1487). | ||
| name: Python facade tests (ubuntu-latest) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: ${{ inputs.ref }} | ||
| - name: Verify candidate SHA | ||
| if: inputs.ref != '' | ||
| env: | ||
| CANDIDATE_SHA: ${{ inputs.ref }} | ||
| run: | | ||
| [[ "$CANDIDATE_SHA" =~ ^[0-9a-f]{40}$ ]] | ||
| test "$(git rev-parse HEAD)" = "$CANDIDATE_SHA" | ||
| - uses: astral-sh/setup-uv@v3 | ||
| with: | ||
| python-version: "3.10" | ||
| - name: Setup soldr | ||
| uses: zackees/setup-soldr@67ed4018aca013f8388050ac9bc264244f9b742c | ||
| with: | ||
| cache-key-suffix: python-facades | ||
| cache: true | ||
| build-cache: true | ||
| target-cache: true | ||
| prebuild-deps: none | ||
| linker: platform-default | ||
| cache-key-suffix: python-facades | ||
| - name: Run embedded-CPython facade tests | ||
| run: | | ||
| uv python install 3.10 | ||
| PYO3_PYTHON="$(uv python find 3.10)" | ||
| echo "PYO3_PYTHON=$PYO3_PYTHON" >> "$GITHUB_ENV" | ||
| PYTHONHOME="$("$PYO3_PYTHON" -c 'import sys; print(sys.prefix)')" | ||
| echo "PYTHONHOME=$PYTHONHOME" >> "$GITHUB_ENV" | ||
| - name: Test (python facades, --ignored) | ||
| run: soldr cargo test -p fbuild-python --test python_facades -- --ignored | ||