From aa65f75e9ff9d5a3f8beca040be6a88b49d50c97 Mon Sep 17 00:00:00 2001 From: NeilClack Date: Fri, 7 Aug 2026 15:02:19 -0500 Subject: [PATCH] Add workflow actions --- .gitea/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ AGENTS.md | 7 ++++++- README.md | 3 ++- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..5fb567e --- /dev/null +++ b/.gitea/workflows/build.yml @@ -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 + ' diff --git a/AGENTS.md b/AGENTS.md index ea5dbea..3f3d4dd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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 ` to build one diff --git a/README.md b/README.md index ccc5d0f..305928a 100644 --- a/README.md +++ b/README.md @@ -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.