Add Windows cross-build and Gitea release; share CI setup

- just windows-deps / windows / package-windows: cross-compile with Odin
  objects + lld-link against an xwin SDK, static VC runtime
- Release workflow runs on v* tags, builds Linux and Windows packages,
  uploads them to the package registry and creates a Gitea release
- Shared toolchain setup as a local composite action

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SansanandClaude Opus 5.5 committed 2026-10-01 21:27:22 +02:00
1 parent 9ee2eabe9a
commit e893c45d4f
6 files changed
+165 -66

No files matched your search

+13 -3
View File
@@ -10,9 +10,15 @@ Requires [Odin](https://odin-lang.org) (dev-2026-09) and [just](https://just.sys
just run # build and play (debug)
just check # type-check with -vet
just test # run tests
just package 1.0 # release build -> build/HanjaKanaMun_1.0_<os>_<arch>.tar.gz
just package 1.0 # native release build -> build/HanjaKanaMun_1.0_<os>_<arch>.tar.gz
just windows-deps # Linux only: fetch Windows SDK/CRT (xwin) and raylib.lib
just package-windows 1.0 # cross-compiled Windows build -> build/HanjaKanaMun_1.0_windows_x86_64.zip
```
The Windows build needs `lld-link`. On macOS, `brew install lld` and set `LLD_LINK`, and point `XWIN_SDK` and
`RAYLIB_WINDOWS` at an xwin splat and Odin's Windows `vendor/raylib/windows` folder (the Linux/macOS Odin releases
don't include `raylib.lib`).
### Neovim
`ols.json` and `odinfmt.json` configure the [ols](https://github.com/DanielGavin/ols) language server and formatter.
@@ -22,8 +28,12 @@ Formatting goes through ols (`vim.lsp.buf.format()`), or `just fmt` if `odinfmt`
## CI
- `.gitea/workflows/gitea-build.yaml`: check, test and build on pushes and PRs to `main` and `develop`.
- `.gitea/workflows/gitea-release.yaml`: on version branches like `1.0`, packages the Linux build and uploads it to
the Gitea generic package registry (`HanjaKanaMun/<version>`). Needs a `TOKEN` secret with package write access.
- `.gitea/workflows/gitea-release.yaml`: on a version tag like `v1.0`, builds Linux and Windows packages, uploads them
to the Gitea generic package registry (`HanjaKanaMun/1.0`) and creates a Gitea release with both attached.
Needs a `TOKEN` secret with package write access.
- `.gitea/actions/setup`: shared toolchain setup (apt packages, Odin, just).
Release: `git tag v1.0 && git push origin v1.0`
## Credits