1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CI
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
# minifb (graphics) needs X11/Wayland headers; cpal (audio) needs ALSA.
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libasound2-dev libudev-dev libxkbcommon-dev libwayland-dev xorg-dev
# ling-kernel is excluded from both steps below: it's no_std/bare-metal
# and requires the nightly toolchain (`#![feature(abi_x86_interrupt)]`,
# plus `-Z build-std` for a real build — see `ling build --platform
# kernel` / gen_kernel_cargo_toml in src/main.rs), which this job never
# installs (stable only, line 20). `cargo build --workspace` without
# the exclude fails immediately with E0554 ("#![feature] may not be
# used on the stable release channel") — confirmed against the exact
# CI failure. Its own boot assembly (boot32.rs) also calls
# `kernel_entry`, which it never defines itself (only a generated
# kernel project's main.rs does), so even on nightly `cargo test`
# would fail to link a standalone test binary for it regardless.
#
# ling-user is excluded from the test step only: it's the no_std
# userland runtime ring-3 LingOS processes link against, with its own
# `#[panic_handler]` (see crates/ling-user/src/entry.rs) — its own
# Cargo.toml already sets `test = false` to stop `cargo test -p
# ling-user` from linking std alongside that handler (E0152 duplicate
# `panic_impl`), but a workspace-wide `cargo test` still pulls it into
# the shared test-profile dependency graph unless excluded here too.
# It builds fine as an ordinary rlib dependency, so `cargo build`
# doesn't need the same exclude.
- name: Build
run: cargo build --workspace --exclude ling-kernel --verbose
- name: Run tests
run: cargo test --workspace --exclude ling-kernel --exclude ling-user --verbose
lint:
name: Format & Clippy (non-blocking)
runs-on: ubuntu-latest
# Advisory only — does not gate the CI status / test badge.
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Format check
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace