Skip to content

Commit ccaa439

Browse files
committed
CI: try to build and run tests on FreeBSD
1 parent 458299a commit ccaa439

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/freebsd.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build and tests (FreeBSD)
2+
3+
on:
4+
# Ignore changes in extra plugins (as they are not tested here)
5+
push:
6+
paths-ignore:
7+
- 'extra_plugins/**'
8+
pull_request:
9+
paths-ignore:
10+
- 'extra_plugins/**'
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
name: Build and run tests on FreeBSD
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Build on FreeBSD 14.2
19+
id: test
20+
uses: vmactions/freebsd-vm@v1
21+
with:
22+
release: "14.2"
23+
usesh: true
24+
run: |
25+
set -euox pipefail
26+
27+
# install dependencies
28+
pkg install -y \
29+
git \
30+
devel/cmake-core \
31+
devel/ninja \
32+
devel/pkgconf \
33+
textproc/py-docutils \
34+
archivers/liblz4 \
35+
archivers/zstd \
36+
textproc/libxml2 \
37+
net/librdkafka \
38+
devel/libepoll-shim
39+
40+
# clone libfds
41+
git clone --branch master https://github.com/CESNET/libfds.git libfds_build
42+
43+
# build libfds
44+
cd libfds_build
45+
mkdir build
46+
cd build
47+
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
48+
make
49+
make install
50+
cd ../..
51+
52+
# build ipfixcol2
53+
mkdir build
54+
cd build
55+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=1
56+
make
57+
make install
58+
59+
# run ipfixcol2 tests
60+
make test
61+
62+
# try to run ipfixcol2
63+
ipfixcol2 -V
64+
ipfixcol2 -h
65+
ipfixcol2 -L -v

0 commit comments

Comments
 (0)