Update build procedures and documentation
This commit is contained in:
@@ -30,8 +30,9 @@ the project version, or pass your own at configure time:
|
||||
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DAPP_VERSION="1.2.3"
|
||||
```
|
||||
|
||||
The Nix package bakes `-DAPP_VERSION=<pkg version>` via `cmakeFlags` (version is
|
||||
hardcoded `0.1.0` in `nix/package.nix`, not read from the flake). `nix develop`
|
||||
The Nix package bakes `-DAPP_VERSION=<pkg version>` via `cmakeFlags` (`version`
|
||||
defaults to `0.1.0` in `nix/package.nix`; the flake overrides it from the
|
||||
`APP_VERSION` env var on impure evals). `nix develop`
|
||||
sets `APP_VERSION=dev` and exports `API_KEY` from the ambient environment
|
||||
(falling back to `RWT_LIVE_API_KEY`). CMake seeds a *fresh* configure from the
|
||||
`APP_VERSION` / `API_KEY` env vars; `-D` wins on reconfigure.
|
||||
@@ -230,11 +231,16 @@ cached.
|
||||
- Do not modify files in `archive/` — reference only.
|
||||
- Build needs SDL3 + SDL3_ttf/image/mixer/net + GTest installed; CI uses
|
||||
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.<system>.default` (build + the
|
||||
offline test suite; `checks` is keyed per-system, so the workflow resolves
|
||||
the current system via `nix eval --impure --expr 'builtins.currentSystem'`);
|
||||
when the `RWT_LIVE_API_KEY` secret is set it also runs
|
||||
The workflow lives in `.gitea/workflows/build.yml` and is **manual-only**
|
||||
(`workflow_dispatch`); pick the branch when dispatching. It runs
|
||||
`nix build -L .#checks.<system>.default` (build + the offline test suite;
|
||||
`checks` is keyed per-system, so the workflow resolves the current system
|
||||
via `nix eval --impure --expr 'builtins.currentSystem'`). The build bakes
|
||||
in a per-branch `APP_VERSION` — the current git tag on `main`, the current
|
||||
commit hash on `dev` — plus the portal API key from the `RWT_API_KEY`
|
||||
secret. The flake reads `APP_VERSION`/`API_KEY` from the environment via
|
||||
`builtins.getEnv`, so the build must pass `--impure` (pure evals get the
|
||||
package defaults). When the `RWT_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). Those live tests
|
||||
also need `RWT_LIVE_ACCOUNT_EMAIL`, `RWT_LIVE_LICENSE_EMAIL`, and
|
||||
|
||||
Reference in New Issue
Block a user