diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml new file mode 100644 index 000000000..60b987420 --- /dev/null +++ b/.github/workflows/freebsd.yml @@ -0,0 +1,32 @@ +name: FreeBSD + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: macos-12 + + env: + CMAKE_GENERATOR: Ninja + + steps: + - uses: actions/checkout@v3 + + - name: Test in FreeBSD + id: test + uses: vmactions/freebsd-vm@v0 + with: + usesh: true + prepare: | + pkg install -y ninja cmake openssl-devel + + run: | + freebsd-version + cmake -B build && cmake --build build -t retest + ./build/test/retest -r -v diff --git a/CMakeLists.txt b/CMakeLists.txt index 0641fc35c..67f2be40c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -583,6 +583,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") src/dns/darwin/srv.c src/net/bsd/brt.c ) +elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + list(APPEND SRCS + src/net/bsd/brt.c + ) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") list(APPEND SRCS src/net/linux/rt.c