mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-03 03:59:07 +02:00
* [misc] Move the FreeBSD port test to release 15.1 FreeBSD 15.0 reached end of life on 2026-09-30 and the ports tree marks it unsupported since freebsd/freebsd-ports@ed90b23fe9 (2026-10-01), so `make package` refuses to run on the 15.0 VM and the FreeBSD Port job fails on every PR. The pinned vmactions/freebsd-vm v1.4.8 ships a 15.1 image, so only the release needs to move. * [misc] Run the FreeBSD unit tests on release 15.1 too The job installs binary packages instead of building from the ports tree, so it kept passing on the EOL 15.0 image, but the client should be tested on the same supported release the port is built on, and the EOL image is only served from the archive mirror from now on.
63 lines
2.4 KiB
YAML
63 lines
2.4 KiB
YAML
name: "FreeBSD"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- "release-*"
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.actor_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
name: "Client / Unit"
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Read Go version from go.mod
|
|
id: goversion
|
|
run: echo "version=$(awk '/^go / {print $2}' go.mod)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Test in FreeBSD
|
|
id: test
|
|
env:
|
|
GO_VERSION: ${{ steps.goversion.outputs.version }}
|
|
uses: vmactions/freebsd-vm@b84ab5559b5a1bb4b8ee2737d2506a16e1737636 # v1.4.8
|
|
with:
|
|
usesh: true
|
|
copyback: false
|
|
release: "15.1"
|
|
envs: "GO_VERSION"
|
|
prepare: |
|
|
pkg install -y curl pkgconf xorg
|
|
GO_TARBALL="go${GO_VERSION}.freebsd-amd64.tar.gz"
|
|
GO_URL="https://go.dev/dl/$GO_TARBALL"
|
|
curl -vLO "$GO_URL"
|
|
tar -C /usr/local -vxzf "$GO_TARBALL"
|
|
|
|
# -x - to print all executed commands
|
|
# -e - to faile on first error
|
|
run: |
|
|
set -e -x
|
|
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
|
|
time go build -o netbird client/main.go
|
|
# check all component except management, since we do not support management server on freebsd
|
|
time go test -tags privileged -timeout 1m -failfast ./base62/...
|
|
# NOTE: without -p1 `client/internal/dns` will fail because of `listen udp4 :33100: bind: address already in use`
|
|
time go test -tags privileged -timeout 8m -failfast -v -p 1 ./client/...
|
|
time go test -tags privileged -timeout 1m -failfast ./dns/...
|
|
time go test -tags privileged -timeout 1m -failfast ./encryption/...
|
|
time go test -tags privileged -timeout 1m -failfast ./formatter/...
|
|
time go test -tags privileged -timeout 1m -failfast ./client/iface/...
|
|
time go test -tags privileged -timeout 1m -failfast ./route/...
|
|
time go test -tags privileged -timeout 1m -failfast ./sharedsock/...
|
|
time go test -tags privileged -timeout 1m -failfast ./util/...
|
|
time go test -tags privileged -timeout 1m -failfast ./version/...
|