@@ -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
|
||||
'
|
||||
@@ -199,7 +199,12 @@ cached.
|
||||
- Do not commit audio assets (`.wav` files) — downloaded at runtime.
|
||||
- Do not modify files in `archive/` — reference only.
|
||||
- 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
|
||||
that break the app at runtime.
|
||||
- `cmake --build build` builds everything; pass `--target <name>` to build one
|
||||
|
||||
@@ -594,6 +594,7 @@ status to decide which page to show.
|
||||
- Do not modify files in `archive/` -- it is reference only.
|
||||
- `build/` is gitignored. Do not commit build artifacts.
|
||||
- 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
|
||||
fonts and images that would break the app at runtime.
|
||||
|
||||
Reference in New Issue
Block a user