Skip to content

Commit

Permalink
Merge pull request #74 from zalando/freebsd-cgo-disabled
Browse files Browse the repository at this point in the history
Test building on freebsd with cgo disabled
  • Loading branch information
mikkeloscar authored Mar 21, 2022
2 parents 7f07573 + 5d9f194 commit def2add
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,14 @@ jobs:
id: test
uses: vmactions/freebsd-vm@v0.1.6
with:
usesh: true
prepare: pkg install -y go gnome-keyring
run: |
go version
go build -v ./...
go build -v
dbus-run-session -- sh -c "echo 'somecredstorepass' | gnome-keyring-daemon --unlock; go test -v ./..."
# verify that we can build for freebsd with cgo disabled
# This will disable the functionality as it depends on cgo (via
# godbus) but should still be buildable to not break backwards
# compatibility
CGO_ENABLED=0 go build -v
3 changes: 1 addition & 2 deletions keyring_unix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dragonfly || freebsd || linux || netbsd || openbsd
// +build dragonfly freebsd linux netbsd openbsd

This comment has been minimized.

Copy link
@Luckyfive

Luckyfive Mar 22, 2022

pretty sure you need this second line otherwise builds fail with the following error:
//go:build comment without // +build comment
when using go version 1.16

This comment has been minimized.

Copy link
@mikkeloscar

mikkeloscar Mar 22, 2022

Author Member

It was dropped because Go 1.16 is no longer an officially supported go version, however, if someone has a need for this we can bring it back ofc.

//go:build (dragonfly && cgo) || (freebsd && cgo) || linux || netbsd || openbsd

package keyring

Expand Down

0 comments on commit def2add

Please sign in to comment.