Skip to content

Commit 92578af

Browse files
committed
test: Add FreeBSD VM action on GitHub.
1 parent 52ece0f commit 92578af

File tree

4 files changed

+65
-10
lines changed

4 files changed

+65
-10
lines changed

.cirrus.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ bazel-dbg_task:
2727
- cd /src/workspace && bazel test -k
2828
--build_tag_filters=-haskell
2929
--test_tag_filters=-haskell
30+
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
3031
--
3132
//c-toxcore/...
3233
-//c-toxcore/auto_tests:tcp_relay_test # TODO(robinlinden): Why does this pass locally but not in Cirrus?
@@ -47,13 +48,30 @@ cimple_task:
4748
//c-toxcore/...
4849

4950
freebsd_task:
50-
container:
51-
image: toxchat/freebsd:latest
52-
cpu: 2
53-
memory: 4G
54-
kvm: true
51+
freebsd_instance:
52+
image_family: freebsd-14-0
5553
configure_script:
54+
- PAGER=cat ASSUME_ALWAYS_YES=YES pkg install
55+
cmake
56+
git
57+
gmake
58+
googletest
59+
libconfig
60+
libsodium
61+
libvpx
62+
opus
63+
pkgconf
5664
- git submodule update --init --recursive
57-
- cd .. && mv cirrus-ci-build /work/c-toxcore && mkdir cirrus-ci-build
5865
test_all_script:
59-
- cd /work/c-toxcore && .github/scripts/cmake-freebsd
66+
- |
67+
# TODO(iphydf): Investigate FreeBSD failures on these tests.
68+
sed -Ei -e '/\(dht_getnodes_api\)/s/^/#/' auto_tests/CMakeLists.txt
69+
cmake . \
70+
-DMIN_LOGGER_LEVEL=TRACE \
71+
-DMUST_BUILD_TOXAV=ON \
72+
-DNON_HERMETIC_TESTS=ON \
73+
-DTEST_TIMEOUT_SECONDS=50 \
74+
-DUSE_IPV6=OFF \
75+
-DAUTOTEST=ON
76+
cmake --build . --target install
77+
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6

.github/workflows/ci.yml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
tool: [autotools, clang-tidy, compcert, cppcheck, doxygen, goblint, infer, misra, modules, rpm, slimcc, sparse, tcc, tokstyle]
20+
tool: [autotools, clang-tidy, compcert, cppcheck, doxygen, goblint, infer, freebsd, misra, modules, rpm, slimcc, sparse, tcc, tokstyle]
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Set up Docker Buildx
@@ -146,7 +146,7 @@ jobs:
146146

147147
run: |
148148
# TODO(iphydf): Investigate NetBSD failures on these tests.
149-
sed -Ei -e '/(TCP|dht_getnodes_api)/s/^/#/' auto_tests/CMakeLists.txt
149+
sed -Ei -e '/\((TCP|dht_getnodes_api)\)/s/^/#/' auto_tests/CMakeLists.txt
150150
cmake . \
151151
-DMIN_LOGGER_LEVEL=TRACE \
152152
-DMUST_BUILD_TOXAV=ON \
@@ -157,6 +157,43 @@ jobs:
157157
cmake --build . --target install
158158
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6
159159
160+
build-freebsd:
161+
runs-on: ubuntu-latest
162+
steps:
163+
- uses: actions/checkout@v4
164+
with:
165+
submodules: recursive
166+
- name: Test in FreeBSD
167+
id: test
168+
uses: vmactions/freebsd-vm@v1
169+
with:
170+
usesh: true
171+
copyback: false
172+
prepare:
173+
PAGER=cat ASSUME_ALWAYS_YES=YES pkg install
174+
cmake
175+
git
176+
gmake
177+
googletest
178+
libconfig
179+
libsodium
180+
libvpx
181+
opus
182+
pkgconf
183+
184+
run: |
185+
# TODO(iphydf): Investigate FreeBSD failures on these tests.
186+
sed -Ei -e '/\(dht_getnodes_api\)/s/^/#/' auto_tests/CMakeLists.txt
187+
cmake . \
188+
-DMIN_LOGGER_LEVEL=TRACE \
189+
-DMUST_BUILD_TOXAV=ON \
190+
-DNON_HERMETIC_TESTS=ON \
191+
-DTEST_TIMEOUT_SECONDS=50 \
192+
-DUSE_IPV6=OFF \
193+
-DAUTOTEST=ON
194+
cmake --build . --target install
195+
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6
196+
160197
mypy:
161198
runs-on: ubuntu-latest
162199
steps:
File renamed without changes.

other/docker/freebsd/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
set -eux
44
BUILD=freebsd
5-
docker build -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/Dockerfile" .
5+
docker build -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/$BUILD.Dockerfile" .

0 commit comments

Comments
 (0)