Fix freebsd tests (#2346)

This commit is contained in:
Evgenii 2024-07-31 08:58:04 +01:00 committed by GitHub
parent da39c8bbca
commit 9d2047a08a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 15 deletions

View File

@ -13,7 +13,7 @@ concurrency:
jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Test in FreeBSD
@ -21,19 +21,15 @@ jobs:
uses: vmactions/freebsd-vm@v1
with:
usesh: true
copyback: false
release: "14.1"
prepare: |
pkg install -y curl
pkg install -y git
pkg install -y go
# -x - to print all executed commands
# -e - to faile on first error
run: |
set -x
curl -o go.tar.gz https://go.dev/dl/go1.21.11.freebsd-amd64.tar.gz -L
tar zxf go.tar.gz
mv go /usr/local/go
ln -s /usr/local/go/bin/go /usr/local/bin/go
go mod tidy
go test -timeout 5m -p 1 ./iface/...
go test -timeout 5m -p 1 ./client/...
cd client
go build .
cd ..
set -e -x
go build -o netbird client/main.go
go test -timeout 5m -p 1 -failfast ./iface/...
go test -timeout 5m -p 1 -failfast ./client/...

View File

@ -1,4 +1,4 @@
//go:build darwin || dragonfly || freebsd || netbsd || openbsd
//go:build darwin
package main