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
5 changes: 3 additions & 2 deletions .github/workflows/ci-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ on:
type: boolean
default: true
dylint:
description: Run the repository Dylint gate. Enabled only for the native Linux x86 lane.
description: Run both workspace Dylints on the single Linux x86 lane.
type: boolean
default: false
cache-targets:
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
path: logs/kernel-substrate-timing.json
if-no-files-found: warn

# Dylint is intentionally a single Linux-x86 step. Its nightly artifacts
# Dylint runs once on Linux x86. Its nightly artifacts
# use a dedicated persistent cache so they cannot mix with the stable
# workspace build or impose a cold rebuild on every platform lane.
- name: Install Dylint nightly
Expand Down Expand Up @@ -265,6 +265,7 @@ jobs:
CARGO_BIN: cargo
CARGO_TARGET_DIR: ${{ runner.temp }}/running-process-dylint-target
run: |
rustup run nightly-2026-04-16 "$CARGO_BIN" dylint --all --workspace
rustup run nightly-2026-04-16 "$CARGO_BIN" dylint --path lints --pattern running-process-platform-boundary --workspace

# #1216: save only on main; PR runs restore main's entry.
Expand Down
2 changes: 1 addition & 1 deletion lints/running-process-platform-boundary/ui/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fn main() {
#[cfg(any(windows, not(target_os = "linux")))]
#[cfg(all(windows, not(target_os = "linux")))]
use std::os::windows::process::CommandExt as _;
}
4 changes: 2 additions & 2 deletions lints/running-process-platform-boundary/ui/main.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ LL | use std::os::windows::process::CommandExt as _;
error: host-platform cfg selection (windows) is not allowed here; host selection belongs in crates/running-process-platform-internal/src/lib.rs cfg_select!
--> $DIR/main.rs:2:15
|
LL | #[cfg(any(windows, not(target_os = "linux")))]
LL | #[cfg(all(windows, not(target_os = "linux")))]
| ^^^^^^^

error: host-platform cfg selection (target_os) is not allowed here; host selection belongs in crates/running-process-platform-internal/src/lib.rs cfg_select!
--> $DIR/main.rs:2:28
|
LL | #[cfg(any(windows, not(target_os = "linux")))]
LL | #[cfg(all(windows, not(target_os = "linux")))]
| ^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors
Expand Down
14 changes: 14 additions & 0 deletions tests/test_ci_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
from ci import lint as ci_lint


def test_one_linux_preflight_gates_both_workspace_dylints() -> None:
workflows = ci_lint.ROOT / ".github" / "workflows"
reusable = (workflows / "ci-preflight.yml").read_text(encoding="utf-8")
assert "dylint --all --workspace" in reusable
assert "--pattern running-process-platform-boundary" in reusable
for name in ("ci-linux.yml", "ci-macos.yml", "ci-windows.yml"):
source = (workflows / name).read_text(encoding="utf-8")
for label in ("linux-x86", "linux-arm") if name == "ci-linux.yml" else (
("macos-x86", "macos-arm") if name == "ci-macos.yml" else ("windows-x86", "windows-arm")
):
job = source.split(f"label: {label}", 1)[1].split("\n\n", 1)[0]
assert ("dylint: true" in job) == (label == "linux-x86"), (name, label)


def test_main_runs_lint_commands_through_running_process_cli(monkeypatch) -> None:
commands: list[list[str]] = []
monkeypatch.setattr(
Expand Down
Loading