Files
Stefan ArentzandClaude Fable 5 751d94cef5 CI: point clang at the Homebrew prefix via CPATH/LIBRARY_PATH
The committed Makefile does not search /opt/homebrew, so SDL2
headers are not found on the arm64 macOS runner. src/ is frozen,
so pass the paths through the environment instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 08:40:29 -04:00

49 lines
1.2 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
jobs:
# The C job builds on macOS (like the old Travis config): the tree uses
# -Werror and gcc on Linux flags an implicit fallthrough in two.c that
# clang does not. src/ is frozen until Phase 9, so the warning cannot be
# fixed there.
c:
name: C build
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install SDL2
run: brew install sdl2
# The committed Makefile does not search the Homebrew prefix, and src/
# cannot be changed; clang picks these paths up from the environment.
- name: Build
run: make -C src
env:
CPATH: /opt/homebrew/include
LIBRARY_PATH: /opt/homebrew/lib
rust:
name: Rust checks
runs-on: ubuntu-latest
defaults:
run:
working-directory: rust
steps:
- uses: actions/checkout@v4
- name: Install SDL2
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev
- uses: Swatinem/rust-cache@v2
with:
workspaces: rust
- name: Format
run: cargo fmt --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Test
run: cargo test