Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD kernel support #128

Merged
merged 10 commits into from
Nov 4, 2022
Prev Previous commit
.builds: try to fix OpenBSD
Signed-off-by: Matt Layher <mdlayher@gmail.com>
  • Loading branch information
mdlayher committed Nov 4, 2022
commit 4dfa10a174c5f78e7d42cfe4a29dfc51b21e2229
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