From 9208e7d7975320fe6aebd80436d7b237e6ff100a Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 26 Mar 2023 00:14:50 +0100 Subject: [PATCH 1/5] ci: add FreeBSD test --- .github/workflows/freebsd.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/freebsd.yml diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml new file mode 100644 index 000000000..6bd2a9492 --- /dev/null +++ b/.github/workflows/freebsd.yml @@ -0,0 +1,33 @@ +name: FreeBSD + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: macos-12 + + env: + CC: ${{ matrix.compiler }} + 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 + + run: | + freebsd-version + cmake -B build && cmake --build build -t retest + ./build/test/retest -r -v From 15bf4c2f804924dec8ae7a65e4a330b6a5210697 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 26 Mar 2023 00:16:00 +0100 Subject: [PATCH 2/5] remove CC --- .github/workflows/freebsd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 6bd2a9492..2c5d0effb 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -13,7 +13,6 @@ jobs: runs-on: macos-12 env: - CC: ${{ matrix.compiler }} CMAKE_GENERATOR: Ninja steps: From d8a11c1a5dc3fa2483fd6ee37634d2a5833fe41e Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 26 Mar 2023 00:22:35 +0100 Subject: [PATCH 3/5] add cmake --- .github/workflows/freebsd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 2c5d0effb..e75862bd6 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -24,7 +24,7 @@ jobs: with: usesh: true prepare: | - pkg install -y ninja + pkg install -y ninja cmake run: | freebsd-version From a357052c9592da6bfdbc9e4560c9472b814f0515 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 26 Mar 2023 00:25:27 +0100 Subject: [PATCH 4/5] add openssl-devel --- .github/workflows/freebsd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index e75862bd6..60b987420 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -24,7 +24,7 @@ jobs: with: usesh: true prepare: | - pkg install -y ninja cmake + pkg install -y ninja cmake openssl-devel run: | freebsd-version From 6909860f4d1cc09448c2ae8e7089698f59869e5b Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 26 Mar 2023 00:34:09 +0100 Subject: [PATCH 5/5] cmake: fix FreeBSD net/bsd/brt.c --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) 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