From 6a144f780ab62a5e6936d8f551dd03f51b11a153 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 1 Oct 2026 17:00:46 +0900 Subject: test/sharefs: migrate tests This runs tests directly in the container, significantly reducing overhead introduced by virtualisation. Signed-off-by: Ophestra --- internal/workflows/doc.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'internal/workflows/doc.go') diff --git a/internal/workflows/doc.go b/internal/workflows/doc.go index 0c7e94b9..e34c59c8 100644 --- a/internal/workflows/doc.go +++ b/internal/workflows/doc.go @@ -47,6 +47,7 @@ The container can be specified via docker-compose: runner: restart: always image: docker.io/gitea/act_runner:nightly + network_mode: host environment: CONFIG_FILE: /config.yaml GITEA_INSTANCE_URL: "https://git.gensokyo.uk" @@ -62,17 +63,21 @@ The container can be specified via docker-compose: Before starting the container, configure act_runner via config.yaml: container: - network: host options: -e PAGER=cat -e MBF_CACHE_DIR=/rosa -e MBF_POISON_OPEN=1 -v /var/lib/rosa:/rosa + --security-opt='unmask=/proc/*' + --cap-add=SYS_ADMIN --device=/dev/kvm + --device=/dev/fuse valid_volumes: - /var/lib/rosa where /var/lib/rosa is the absolute pathname of the cache directory in the init namespace. Setting MBF_POISON_OPEN enables cmd/mbf to run as root. It is also a good idea here to set runner.capacity to reflect the capacity of the guest, so -jobs can be consumed quicker. +jobs can be consumed quicker. Removing mount points covering /proc enables +testing of cmd/hakurei. Exposing the fuse device and adding capability SYS_ADMIN +enables testing of cmd/sharefs. Build a statically-linked cmd/mbf: -- cgit v1.3.1