WEFT_OS/.github/workflows/ci.yml
Marco Allegretti dcc09f319d
docs: add engineering contract, contributor toolkit and templates
Add AGENTS.md as the single engineering contract: sources of truth,
evidence and proof requirements, ownership, working modes, the reviewed
change loop, maintenance isolation, decision authority, dependency and
fork rules, the 0.0.x to 0.1.0 release progression, and branch and
publication rules.

Add .agents/ with scope, implement, verify, maintenance and release
procedures; reviewer, architecture debt scout, simplicity and refactoring
roles; skills for the compositor, Servo rendering, runtime capabilities,
appd sessions, packages and data, Linux deployment, integration
verification and documentation; and verify.py, which runs the existing
check profiles with --locked from any directory, stops on the first
failure and supports --dry-run.

check_toolkit.py validates local links and heading anchors, metadata,
catalog coverage and issue forms. A new contributor-toolkit CI job runs
both. The structure follows the Resina Design System toolkit at
1e768064f57a1e403ab271822383e732795905a6, adapted to WEFT.

Validation, against the committed lockfiles:
- verify.py toolkit: checker passes, 28 runner/checker tests pass
- verify.py portable, demos, packages: pass
- verify.py linux, runtime, servo-embed: fail on existing defects
  (clippy collapsible_if in the winit backend, three clippy lints in
  weft-runtime with wasmtime-runtime, and an E0308 in the selected Servo
  revision's servo-layout); the runner reports the failing status

Add CONTRIBUTING.md, issue forms for defects and changes, maintenance
problems and decisions of direction, and a pull request template asking
for ownership, proof and the validation actually performed. README.md
links the contribution guide.
2026-10-09 08:34:48 +00:00

126 lines
3.7 KiB
YAML

name: ci
on:
push:
branches:
- main
pull_request:
jobs:
# Crates that must compile on every supported host platform.
cross-platform:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.93.0
components: rustfmt, clippy
- name: cargo fmt
run: cargo fmt --all --check
- name: cargo clippy (cross-platform crates)
run: >
cargo clippy --workspace
--exclude weft-compositor
--exclude weft-servo-shell
--exclude weft-app-shell
--all-targets -- -D warnings
- name: cargo test (cross-platform crates)
run: >
cargo test --workspace
--exclude weft-compositor
--exclude weft-servo-shell
--exclude weft-app-shell
# Wayland compositor and other Linux-only system crates.
# These require libwayland-server and other Linux kernel interfaces.
linux-only:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.93.0
components: rustfmt, clippy
- name: install Linux system dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
libwayland-dev \
libxkbcommon-dev \
libegl-dev \
libgles2-mesa-dev \
libgbm-dev \
libdrm-dev \
libinput-dev \
libseat-dev \
libudev-dev \
libsystemd-dev \
libdisplay-info-dev \
pkg-config
- name: cargo clippy (linux-only crates)
run: >
cargo clippy
-p weft-compositor
-p weft-servo-shell
-p weft-app-shell
--all-targets -- -D warnings
- name: cargo test (linux-only crates)
run: >
cargo test
-p weft-compositor
-p weft-servo-shell
-p weft-app-shell
# Type-check the servo-embed feature gate.
# Full Servo compilation (30-60 min) is not run in CI; this job checks
# that the feature-gated code at least type-checks against the declared deps.
servo-embed-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.93.0
- name: install Linux system dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
libwayland-dev \
libxkbcommon-dev \
libegl-dev \
libgles2-mesa-dev \
libgbm-dev \
libdrm-dev \
libfontconfig-dev \
llvm \
pkg-config
- name: cargo check servo-embed (weft-servo-shell)
run: >
cargo check
-p weft-servo-shell
--features servo-embed
- name: cargo check servo-embed (weft-app-shell)
run: >
cargo check
-p weft-app-shell
--features servo-embed
# Contributor contract, toolkit documents and verification runner.
contributor-toolkit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: install toolkit check dependencies
run: python -m pip install -r .agents/scripts/requirements.txt
- name: check contributor toolkit
run: python .agents/scripts/verify.py toolkit