From 1df953a96a0f964666d01cf0cc0838d0b3423e7d Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Fri, 4 Nov 2022 09:47:55 -0400 Subject: [PATCH] .builds: try to fix OpenBSD Signed-off-by: Matt Layher --- .builds/openbsd.yml | 5 ++--- .cibuild.sh | 9 +++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.builds/openbsd.yml b/.builds/openbsd.yml index 8800122..08b1ddd 100644 --- a/.builds/openbsd.yml +++ b/.builds/openbsd.yml @@ -14,7 +14,6 @@ tasks: go version go install honnef.co/go/tools/cmd/staticcheck@latest cd wgctrl-go/ - diff -u <(echo -n) <(/usr/local/go/bin/gofmt -d -s .) go vet ./... $GOBIN/staticcheck ./... # The race detector is not supported on OpenBSD. @@ -22,8 +21,8 @@ tasks: # 32-bit sanity checking for different kernel structure sizes. GOARCH=386 go build ./... go test -c . - # TODO: re-enable once Go 1.18 is available in openbsd/latest and wireguard-go can be built + doas bash -c 'WGCTRL_INTEGRATION=yesreallydoit ./wgctrl.test -test.v -test.run TestIntegration' + # TODO: re-enable once Go 1.19 is available in openbsd/latest and wireguard-go can be built exit 0 # Use wireguard-go for additional testing. doas /usr/local/bin/wireguard-go tun0 - doas bash -c 'WGCTRL_INTEGRATION=yesreallydoit ./wgctrl.test -test.v -test.run TestIntegration' diff --git a/.cibuild.sh b/.cibuild.sh index ae383dd..afc4d79 100755 --- a/.cibuild.sh +++ b/.cibuild.sh @@ -10,8 +10,13 @@ KERNEL=$(uname -s) SUDO="sudo" if [ "${KERNEL}" == "OpenBSD" ]; then SUDO="doas" - # TODO: wireguard-go only builds using Go 1.18. However, openbsd/latest - # currently has an older version. Re-enable once Go 1.18 is available. + + # Configure a WireGuard interface. + doas ifconfig wg create name wg0 + doas ifconfig wg0 up + + # TODO: wireguard-go only builds using Go 1.19+. However, openbsd/latest + # currently has an older version. exit 0 fi