Files
CI-Images/README.md
T
SubQ 8ad0c484aa
Build CI images / build (linux-native) (push) Successful in 11s
Build CI images / build (nixos) (push) Successful in 1m4s
Build CI images / build (vulkan) (push) Successful in 17s
Build CI images / build (windows-clang) (push) Successful in 1m44s
Build CI images / build (windows-gcc) (push) Successful in 24s
Add Node.js to the runner images
2026-12-06 07:46:44 +03:00

78 lines
3.2 KiB
Markdown

# Void CI Images
Container images used by the Void Gitea Actions runners. They are built by
`.gitea/workflows/build.yml` and pushed to the Gitea container registry:
git.faumaray.com/void/ci-images:<tag>
| Tag | Purpose | Base |
| --- | --- | --- |
| `linux-native` | Native C++ build/test without GPU or Windows tooling | Arch Linux |
| `nixos` | Nix with flakes enabled for `nix-shell` / `nix develop` | `nixos/nix` |
| `vulkan` | Build and test Vulkan code on the AMD GPU or the lavapipe software driver | Arch Linux |
| `windows-gcc` | Cross-build Windows x86_64 binaries with MinGW-w64 GCC (UCRT) and run them under Wine | Arch Linux |
| `windows-clang` | The same Windows workflow with the LLVM-MinGW clang toolchain | `mstorsjo/llvm-mingw` |
## Dependencies baked in
The C++ toolchain the Void research projects (Engine, Build-System, Library)
use is already installed in `linux-native` and `vulkan`:
- GCC 16 (C++26 with `-freflection`), CMake 4, Ninja, `pkg-config`, ccache
- Node.js and npm (for the TypeScript/web projects)
- Boost, OpenSSL, SQLite, libsodium, libarchive, FreeType, GLFW, GoogleTest
- Vulkan headers, loader, validation layers, tools, glslang, shaderc, Slang
- Mesa with RADV (AMD hardware) and lavapipe (software Vulkan)
- Wine in both Windows images for running Windows tests
`windows-gcc` additionally carries the `mingw-w64-toolchain` group
(`x86_64-w64-mingw32-gcc/g++`, binutils, CRT, winpthreads) and an initialised
64-bit Wine prefix. `windows-clang` carries the LLVM-MinGW toolchain (clang,
lld, compiler-rt, libc++, UCRT) from the upstream image.
### UCRT
`mingw-w64` 14 made UCRT the default (`--with-default-msvcrt` defaults to
`ucrt`), so Arch's `mingw-w64-gcc` 16.2 and LLVM-MinGW both target the UCRT.
The resulting binaries expect `ucrtbase.dll`, which Wine 11 and Windows 10+
provide.
Arch Linux ships only the core MinGW toolchain. Additional Windows libraries
are left to each project (CMake `FetchContent`, vcpkg or conan); the Vulkan
headers are copied into the MinGW sysroot because they are platform-independent.
## Using the images
Add a label to the runner in `modules/dev/gitea-runner.nix`:
```nix
"vulkan:docker://git.faumaray.com/void/ci-images:vulkan"
```
and select it from a workflow with `runs-on: vulkan`.
Both Windows images set `WINEPATH` to the MinGW runtime directory, so
`libstdc++`/`libc++` DLLs resolve under Wine; `-static` linking works too.
The Vulkan image needs the host render node. The runner already sets
`container.options`; add `--device=/dev/dri` there (the desktop host has an AMD
GPU). Without a GPU, request the software driver explicitly:
```sh
VK_DRIVER_FILES=/usr/share/vulkan/icd.d/lvp_icd.json vulkaninfo --summary
```
## Publishing
A push to `main` builds every image and pushes it to the registry. The
container registry does not accept the Actions job token, so the workflow logs
in with the organization `RELEASE_BOT_TOKEN` as `echoion-release-bot`. Set the
repository variable `REGISTRY_USER` and secret `REGISTRY_TOKEN` to use a
dedicated account instead.
## Adding an image
1. Add `images/<name>/Dockerfile`.
2. Add `<name>` to the matrix in `.gitea/workflows/build.yml`.
3. Add the matching label in `gitea-runner.nix`.