Add workflow actions
build / nix-build (push) Canceled after 0s

This commit is contained in:
NeilClack
2026-08-07 15:02:19 -05:00
parent 9251b3a196
commit aa65f75e9f
3 changed files with 38 additions and 2 deletions
+30
View File
@@ -0,0 +1,30 @@
name: build
on:
push:
branches: [dev, main]
pull_request:
jobs:
nix-build:
runs-on: build-server
steps:
- uses: actions/checkout@v4
- name: Build + offline test suite
run: nix build -L .#checks.default
- name: Live portal tests
if: ${{ secrets.RW_LIVE_API_KEY != '' }}
env:
RW_LIVE_API_KEY: ${{ secrets.RW_LIVE_API_KEY }}
RW_LIVE_ACCOUNT_EMAIL: ${{ secrets.RW_LIVE_ACCOUNT_EMAIL }}
RW_LIVE_LICENSE_EMAIL: ${{ secrets.RW_LIVE_LICENSE_EMAIL }}
RW_LIVE_LICENSE_KEY: ${{ secrets.RW_LIVE_LICENSE_KEY }}
run: |
nix develop --command bash -c '
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build build --target test_api_client test_license_service
./build/test_api_client
./build/test_license_service
'
+6 -1
View File
@@ -199,7 +199,12 @@ cached.
- Do not commit audio assets (`.wav` files) — downloaded at runtime. - Do not commit audio assets (`.wav` files) — downloaded at runtime.
- Do not modify files in `archive/` — reference only. - Do not modify files in `archive/` — reference only.
- Build needs SDL3 + SDL3_ttf/image/mixer/net + GTest installed; CI uses - Build needs SDL3 + SDL3_ttf/image/mixer/net + GTest installed; CI uses
self-hosted Forgejo runners. Gitea Actions on a self-hosted host runner (`build-server`, no docker).
The workflow lives in `.gitea/workflows/build.yml` and runs on both `dev`
and `main`. It runs `nix build -L .#checks.default` (build + the offline
test suite); when the `RW_LIVE_API_KEY` secret is set it also runs
`test_api_client` / `test_license_service` against the portal via
`nix develop` (outside the sandbox, like a dev machine).
- `test_assets` must pass before committing — it catches missing fonts/images - `test_assets` must pass before committing — it catches missing fonts/images
that break the app at runtime. that break the app at runtime.
- `cmake --build build` builds everything; pass `--target <name>` to build one - `cmake --build build` builds everything; pass `--target <name>` to build one
+2 -1
View File
@@ -594,6 +594,7 @@ status to decide which page to show.
- Do not modify files in `archive/` -- it is reference only. - Do not modify files in `archive/` -- it is reference only.
- `build/` is gitignored. Do not commit build artifacts. - `build/` is gitignored. Do not commit build artifacts.
- Use the Nix dev shell or ensure SDL3 is installed for building. - Use the Nix dev shell or ensure SDL3 is installed for building.
- CI uses self-hosted Forgejo runners. - CI uses Gitea Actions on a self-hosted host runner (`build-server`); the
workflow is `.gitea/workflows/build.yml`.
- Asset tests (`test_assets`) must pass before committing -- they catch missing - Asset tests (`test_assets`) must pass before committing -- they catch missing
fonts and images that would break the app at runtime. fonts and images that would break the app at runtime.