ling-lang 2030.1.39

Ling - The Omniglot Systems Language
Documentation
name: CI

on:
  push:
    branches: [master, main, develop]
  pull_request:
    branches: [master, main]

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

      - name: Build
        run: cargo build --workspace --verbose

      # ling-kernel's own boot assembly (boot32.rs) calls `kernel_entry`,
      # which it never defines itself — that symbol is only ever supplied by
      # a generated kernel project's own main.rs (`ling build --platform
      # kernel`, see gen_kernel_main_rs in src/main.rs). `cargo build` is
      # fine (a lib doesn't need to link), but `cargo test` tries to link a
      # standalone test binary for every workspace member and fails with
      # "unresolved external symbol kernel_entry" for this one — confirmed
      # by reproducing the exact CI failure locally.
      - name: Run tests
        run: cargo test --workspace --exclude ling-kernel --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