Cocoa + Emscripten CI coverage #112

Open
opened 2026-05-29 07:23:51 +02:00 by OragonEfreet · 0 comments
Owner

.forgejo/workflows/ today only exercises Linux (linux-linux-gcc) and MinGW cross-compile (linux-windows-mingw). #107 added or significantly touched two backends that aren't built in CI:

  • Cocoa (src/cocoa/video_cocoa.m) — only buildable on macOS. Regressions only surface when a contributor or maintainer builds on a Mac.
  • Emscripten (src/emscripten/video_emscripten.c) — buildable from Linux through emscripten/emsdk but not wired into any workflow.

Both backends shipped real changes in #107 (draw-callback wiring, sub-rect present, rAF scheduling on Emscripten); both were validated only locally / manually. Without CI a future PR can break them silently.

Outcome

Two new workflow extensions:

Cocoa

  • New job in ci-test.yml (or a dedicated ci-macos.yml) that runs on a macos-* runner.
  • Configures the project with default CMake (Cocoa auto-enables on APPLE), builds, runs ctest.
  • Optional: smoke-runs an example like template_callbacks to confirm the lifecycle.

Emscripten

  • New job (or workflow) that uses the emscripten/emsdk:latest container.
  • Configures with emcmake cmake ... -DBANJO_CONFIG_EMSCRIPTEN_BACKEND=ON -DBUILD_TESTING=ON.
  • Builds, then runs the test executables under node (e.g. node build/test/unit_app.js).
  • Same dance we manually did in #107 (commits 6 and 7's verification).

Acceptance criteria

  • A trivial PR that breaks the Cocoa backend (e.g. delete cocoa_request_redraw) goes red in CI.
  • Same for a trivial Emscripten break (e.g. wrong arg count to MAIN_THREAD_EM_ASM).
  • Both jobs run on every PR to main.

Out of scope

  • iOS, Android, FreeBSD CI.
  • Cross-compiling Emscripten from macOS or Windows runners.
  • Browser-based test runs (we run under node). Real browser smoke would need a Selenium-style harness — separate card if we ever want it.
  • GitHub Actions migration. Forgejo Actions stays the home for CI per the project's existing .forgejo/ layout.
`.forgejo/workflows/` today only exercises Linux (`linux-linux-gcc`) and MinGW cross-compile (`linux-windows-mingw`). #107 added or significantly touched two backends that aren't built in CI: - **Cocoa** (`src/cocoa/video_cocoa.m`) — only buildable on macOS. Regressions only surface when a contributor or maintainer builds on a Mac. - **Emscripten** (`src/emscripten/video_emscripten.c`) — buildable from Linux through `emscripten/emsdk` but not wired into any workflow. Both backends shipped real changes in #107 (draw-callback wiring, sub-rect present, rAF scheduling on Emscripten); both were validated only locally / manually. Without CI a future PR can break them silently. ## Outcome Two new workflow extensions: ### Cocoa - New job in `ci-test.yml` (or a dedicated `ci-macos.yml`) that runs on a `macos-*` runner. - Configures the project with default CMake (Cocoa auto-enables on `APPLE`), builds, runs `ctest`. - Optional: smoke-runs an example like `template_callbacks` to confirm the lifecycle. ### Emscripten - New job (or workflow) that uses the `emscripten/emsdk:latest` container. - Configures with `emcmake cmake ... -DBANJO_CONFIG_EMSCRIPTEN_BACKEND=ON -DBUILD_TESTING=ON`. - Builds, then runs the test executables under `node` (e.g. `node build/test/unit_app.js`). - Same dance we manually did in #107 (commits 6 and 7's verification). ## Acceptance criteria - A trivial PR that breaks the Cocoa backend (e.g. delete `cocoa_request_redraw`) goes red in CI. - Same for a trivial Emscripten break (e.g. wrong arg count to `MAIN_THREAD_EM_ASM`). - Both jobs run on every PR to `main`. ## Out of scope - iOS, Android, FreeBSD CI. - Cross-compiling Emscripten from macOS or Windows runners. - Browser-based test runs (we run under node). Real browser smoke would need a Selenium-style harness — separate card if we ever want it. - GitHub Actions migration. Forgejo Actions stays the home for CI per the project's existing `.forgejo/` layout.
OragonEfreet added this to the 1.0 milestone 2026-05-29 07:23:51 +02:00
OragonEfreet removed their assignment 2026-05-29 09:21:06 +02:00
OragonEfreet removed this from the 1.0 milestone 2026-05-29 18:28:32 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
OragonEfreet/banjo#112
No description provided.