CI on Forgejo Actions for Linux and Windows #7

Closed
UnflavoredMeson/Primal_Plus_Plus
opened 2026-11-24 20:15:49 +00:00 by UnflavoredMeson · 0 comments
Owner

Why

Two OSes and three compilers: something you didn't build locally breaks on every other push. CI catches it before the next session starts from a broken state.

Decided

  • Forgejo Actions, workflows in .forgejo/workflows/.
  • Linux: a CI image built from Tools/CI/Dockerfile and published to Forgejo's registry (Tools/CI/publish-image.sh); Tools/CI/ci.sh holds the jobs so they run the same locally (ci.sh build <preset>, tidy, checks, sanitizers).
  • Windows: a runner in a Windows VM (host mode, label windows, one job at a time): the four configurations and UnitTests.
  • Jobs are added as their tools appear: TSan in S2, graphics tests on Xvfb + lavapipe in S6.

Read first

Steps

  • 1. Write Tools/CI/Dockerfile with clang, GCC, CMake, Ninja and the libraries; build it locally.
  • 2. Write ci.sh with build, tidy and checks; run it inside the image.
  • 3. Publish the image and add .forgejo/workflows/linux.yml.
  • 4. Set up the Windows runner (Tools/CI/WindowsRunner.md in the fork's repo describes it) and add windows.yml.
  • 5. Push a branch with a deliberate warning and watch both fail.

Done when

  • A push runs Linux (clang, GCC, tidy, checks) and Windows (four configurations, UnitTests), and both pass.
  • ci.sh build linux-debug passes locally.

Claude can help with

  • Writing the Dockerfile and ci.sh from your list of jobs.
  • Reading CI logs when a job fails only in CI.

Learn

  • Why the CI image tag is pinned and published before the push that needs it.
  • The difference between a host-mode runner and a container runner.
## Why Two OSes and three compilers: something you didn't build locally breaks on every other push. CI catches it before the next session starts from a broken state. ## Decided - Forgejo Actions, workflows in `.forgejo/workflows/`. - Linux: a CI image built from `Tools/CI/Dockerfile` and published to Forgejo's registry (`Tools/CI/publish-image.sh`); `Tools/CI/ci.sh` holds the jobs so they run the same locally (`ci.sh build <preset>`, `tidy`, `checks`, `sanitizers`). - Windows: a runner in a Windows VM (host mode, label `windows`, one job at a time): the four configurations and UnitTests. - Jobs are added as their tools appear: TSan in S2, graphics tests on Xvfb + lavapipe in S6. ## Read first - [LinuxVulkanPort](https://forgejo.unflavoredmeson.com/UnflavoredMeson/Primal_Plus_Plus/wiki/LinuxVulkanPort), open items about CI. - `UnflavoredMeson/Primal#14`. ## Steps - [x] 1. Write `Tools/CI/Dockerfile` with clang, GCC, CMake, Ninja and the libraries; build it locally. - [x] 2. Write `ci.sh` with `build`, `tidy` and `checks`; run it inside the image. - [x] 3. Publish the image and add `.forgejo/workflows/linux.yml`. - [x] 4. Set up the Windows runner (`Tools/CI/WindowsRunner.md` in the fork's repo describes it) and add `windows.yml`. - [x] 5. Push a branch with a deliberate warning and watch both fail. ## Done when - [x] A push runs Linux (clang, GCC, tidy, checks) and Windows (four configurations, UnitTests), and both pass. - [x] `ci.sh build linux-debug` passes locally. ## Claude can help with - Writing the Dockerfile and `ci.sh` from your list of jobs. - Reading CI logs when a job fails only in CI. ## Learn - Why the CI image tag is pinned and published before the push that needs it. - The difference between a host-mode runner and a container runner.
Sign in to join this conversation.
No assignees
No project
No milestone
Depends on
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
UnflavoredMeson/Primal_Plus_Plus#7
No description provided.