Skip to content

Commit

Permalink
test: Add FreeBSD VM action on GitHub.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Feb 19, 2024
1 parent 52ece0f commit 558558f
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 8 deletions.
32 changes: 25 additions & 7 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ bazel-dbg_task:
- cd /src/workspace && bazel test -k
--build_tag_filters=-haskell
--test_tag_filters=-haskell
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
--
//c-toxcore/...
-//c-toxcore/auto_tests:tcp_relay_test # TODO(robinlinden): Why does this pass locally but not in Cirrus?
Expand All @@ -47,13 +48,30 @@ cimple_task:
//c-toxcore/...

freebsd_task:
container:
image: toxchat/freebsd:latest
cpu: 2
memory: 4G
kvm: true
freebsd_instance:
image_family: freebsd-14-0
configure_script:
- pkg install
cmake
git
gmake
googletest
libconfig
libsodium
libvpx
opus
pkgconf
- git submodule update --init --recursive
- cd .. && mv cirrus-ci-build /work/c-toxcore && mkdir cirrus-ci-build
test_all_script:
- cd /work/c-toxcore && .github/scripts/cmake-freebsd
- |
# TODO(iphydf): Investigate FreeBSD failures on these tests.
sed -Ei -e '/\(dht_getnodes_api\)/s/^/#/' auto_tests/CMakeLists.txt
cmake . \
-DMIN_LOGGER_LEVEL=TRACE \
-DMUST_BUILD_TOXAV=ON \
-DNON_HERMETIC_TESTS=ON \
-DTEST_TIMEOUT_SECONDS=50 \
-DUSE_IPV6=OFF \
-DAUTOTEST=ON
cmake --build . --target install
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6
39 changes: 38 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:

run: |
# TODO(iphydf): Investigate NetBSD failures on these tests.
sed -Ei -e '/(TCP|dht_getnodes_api)/s/^/#/' auto_tests/CMakeLists.txt
sed -Ei -e '/\((TCP|dht_getnodes_api)\)/s/^/#/' auto_tests/CMakeLists.txt
cmake . \
-DMIN_LOGGER_LEVEL=TRACE \
-DMUST_BUILD_TOXAV=ON \
Expand All @@ -157,6 +157,43 @@ jobs:
cmake --build . --target install
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6
build-freebsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Test in FreeBSD
id: test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
copyback: false
prepare:
PAGER=cat ASSUME_ALWAYS_YES=YES pkg install
cmake
git
gmake
googletest
libconfig
libsodium
libvpx
opus
pkgconf

run: |
# TODO(iphydf): Investigate FreeBSD failures on these tests.
sed -Ei -e '/\(dht_getnodes_api\)/s/^/#/' auto_tests/CMakeLists.txt
cmake . \
-DMIN_LOGGER_LEVEL=TRACE \
-DMUST_BUILD_TOXAV=ON \
-DNON_HERMETIC_TESTS=ON \
-DTEST_TIMEOUT_SECONDS=50 \
-DUSE_IPV6=OFF \
-DAUTOTEST=ON
cmake --build . --target install
ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:6
mypy:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 558558f

Please sign in to comment.