From df3987f291c45b38a8c3ea96a95cfad24d1e2860 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 7 Oct 2026 01:39:38 +0900 Subject: internal/workflows: unshare net for sandbox suite This avoids having multiple runs getting in the way of each other with their Xwayland abstract socket. Signed-off-by: Ophestra --- internal/workflows/step.go | 13 +++++++------ internal/workflows/test.go | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'internal') diff --git a/internal/workflows/step.go b/internal/workflows/step.go index fc95fd69..d4e9c2d8 100644 --- a/internal/workflows/step.go +++ b/internal/workflows/step.go @@ -60,7 +60,7 @@ var download = Step{ With: []KV[any]{ {"name", "dist-${{ needs.dist.outputs.rev }}"}, - {"path", "result"}, + {"path", "/tmp/dist"}, }, } @@ -72,7 +72,7 @@ var _download = Step{ With: []KV[any]{ {"name", "dist-${{ needs.dist-race.outputs.rev }}-race"}, - {"path", "result"}, + {"path", "/tmp/dist"}, }, } @@ -81,8 +81,10 @@ var _download = Step{ var install = Step{ Name: "Install hakurei", Run: "HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)\" && " + - "tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz && " + - "./hakurei-$HAKUREI_VERSION*-amd64/install.sh && " + + "tar -C /tmp/dist " + + "-xf /tmp/dist/hakurei-$HAKUREI_VERSION*-amd64.tar.gz && " + + "/tmp/dist/hakurei-$HAKUREI_VERSION*-amd64/install.sh && " + + "rm -rf /tmp/dist && " + "sudo -u ubuntu hakurei version && " + "mkdir /var/empty", } @@ -91,8 +93,7 @@ var install = Step{ func newTestsuite(name, prefix string) Step { return Step{ Name: "Compile and run test suite", - Run: prefix + "rm -rf result && " + - "go run -tags=testsuite ./cmd/" + name, + Run: prefix + "go run -tags=testsuite ./cmd/" + name, } } diff --git a/internal/workflows/test.go b/internal/workflows/test.go index 1f9bba58..80fb01e5 100644 --- a/internal/workflows/test.go +++ b/internal/workflows/test.go @@ -48,7 +48,7 @@ var _ = (&Workflow{ download, install, - newTestsuite("hakurei/testsuite/sandbox", ""), + newTestsuite("hakurei/testsuite/sandbox", "unshare -n "), }, }}, @@ -72,7 +72,7 @@ var _ = (&Workflow{ _download, install, - newTestsuite("hakurei/testsuite/sandbox", ""), + newTestsuite("hakurei/testsuite/sandbox", "unshare -n "), }, }}, -- cgit v1.3.1