Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@ CI/CD workflows for the fbuild project, covering lint, test, documentation, and
- **`check-{macos,ubuntu,windows}.yml`** -- Clippy + tests per platform
- **`fmt.yml`** -- Rustfmt check | **`docs.yml`** -- Doc build with `-D warnings`
- **`msrv.yml`** -- MSRV 1.94.1 verification | **`validate-boards.yml`** -- Board JSON validation
- **`platform-boundary-research.yml`** -- Windows/Linux/macOS reconciliation of the #1307 research inventory and RED fixture
- **`loc-gate.yml`** -- Reject `.rs` files over 1000 LOC | **`lint-subprocess.yml`** -- Forbid direct subprocess spawns
- **`crate-gate.yml`** -- Reject new workspace crates (monocrate policy, `ci/check_workspace_crates.py`)

Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/platform-boundary-research.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
name: Platform Boundary Research

on:
workflow_dispatch: {}
pull_request:
branches: [main]

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"

jobs:
inventory:
name: Inventory (${{ matrix.host }})
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
host: linux
- os: windows-latest
host: windows
- os: macos-latest
host: macos
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v3
- uses: zackees/setup-soldr@v0
with:
version: 0.8.23
cache: true
toolchain: 1.94.1
prebuild-deps: none
- name: Check deterministic inventory
run: uv run --no-project python ci/platform_boundary_research.py --check --host-label ${{ matrix.host }}
- name: Run research scanner tests
run: uv run --no-project python -m unittest ci.test_platform_boundary_research
- name: Preserve RED compile evidence
run: soldr rustc --edition 2021 -D warnings --crate-type lib --emit metadata ci/fixtures/platform_boundary/research_red_pass.rs
1 change: 1 addition & 0 deletions ci/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ Python scripts for CI, packaging, and development tooling. All invoked via `uv r
- **`env.py`** -- Centralized PATH activation ensuring `.cargo/bin` is on PATH before invoking Rust tools
- **`extract_pio_build_flags.py`** -- Extracts compiler/linker flags from PlatformIO for each board and writes reference JSONs
- **`lint.py`** -- Workspace linting (rustfmt + clippy), supports single-file and auto-fix modes
- **`platform_boundary_research.py`** -- Host-independent phase-1 inventory and cross-host drift check for FastLED/fbuild#1307
- **`render_workflows.py`** -- Re-renders the `on:` blocks of `.github/workflows/build-*.yml` and the full `nightly-platforms.yml` from `board_families.json` + `ci_common_paths.txt`. CI invokes `--check` to enforce no drift. See [docs/DEVELOPMENT.md](../docs/DEVELOPMENT.md#ci-per-board-build-triggers) and FastLED/fbuild#835.
- **`board_families.json`** -- SOT: per-board metadata (workflow / test_dir / env_name / family) plus the family → crate-path mapping consumed by `render_workflows.py`.
- **`ci_common_paths.txt`** -- SOT: paths whose changes force-run *every* per-board build workflow.
Expand Down
6 changes: 6 additions & 0 deletions ci/fixtures/platform_boundary/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
# Platform-boundary fixtures

`research_red_pass.rs` preserves phase-1 evidence for FastLED/fbuild#1307: the
current workspace has no host-platform boundary lint, so representative private,
inactive, native-import, compile-host-fact, and `cfg!` constructs compile on each
supported host. Phase 2 converts these constructs into negative Dylint fixtures.
18 changes: 18 additions & 0 deletions ci/fixtures/platform_boundary/research_red_pass.rs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
#![allow(dead_code, unused_imports)]

// Phase-1 RED evidence: all of these constructs compile before the boundary
// from #1306 exists. Phase 2 converts them into negative Dylint fixtures.
#[cfg(windows)]
fn private_windows_only() {}

#[cfg(unix)]
use std::os::unix::ffi::OsStrExt as _;

#[cfg(windows)]
use std::os::windows::ffi::OsStrExt as _;

pub fn research_red_evidence() {
let _is_windows = cfg!(windows);
let _host_os = std::env::consts::OS;
let _target_os = option_env!("CARGO_CFG_TARGET_OS");
}
Loading
Loading