Skip to content

Commit

Permalink
.builds: try to fix OpenBSD
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Layher <mdlayher@gmail.com>
  • Loading branch information
mdlayher committed Nov 4, 2022
1 parent f15695f commit 4dfa10a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .builds/openbsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ 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.
go test -v ./...
# 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'
9 changes: 7 additions & 2 deletions .cibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 wg0 create
doas ifconfig wg0 up

# TODO: wireguard-go only builds using Go 1.19+. However, openbsd/latest
# currently has an older version.
exit 0
fi

Expand Down

0 comments on commit 4dfa10a

Please sign in to comment.