chore: Move cmake-freebsd-stage2 back into the toxcore repo.

This is more likely to change with the code so should live here, not in
dockerfiles.
This commit is contained in:
iphydf 2021-12-21 10:43:02 +00:00
parent 74bf0fc2c8
commit 78c26e3c0d
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
2 changed files with 55 additions and 3 deletions

View File

@ -45,6 +45,4 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build on FreeBSD
run:
cd .. && mv c-toxcore / && mkdir c-toxcore &&
cd /work && ./cmake-freebsd-stage2
run: .travis/cmake-freebsd-stage2

54
.travis/cmake-freebsd-stage2 Executable file
View File

@ -0,0 +1,54 @@
#!/bin/bash
# Copyright (C) 2018-2021 nurupo
# Toxcore building
set -eux
cd ..
mv c-toxcore /
mkdir c-toxcore
pushd /work
. cmake-freebsd-env.sh
popd
# === Get VM ready to build the code ===
start_vm
# Copy over toxcore code from Travis to qemu
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -P "$SSH_PORT" -r /c-toxcore root@localhost:~
RUN ls -lh
cd /c-toxcore
CACHEDIR=/opt/cache
mkdir "$CACHEDIR"
. ".travis/flags-clang.sh"
add_ld_flag -Wl,-z,defs
# Make compilation error on a warning
add_flag -Werror
RUN 'cmake -B_build -Hc-toxcore \
-DCMAKE_C_FLAGS="$C_FLAGS" \
-DCMAKE_CXX_FLAGS="$CXX_FLAGS" \
-DCMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \
-DCMAKE_SHARED_LINKER_FLAGS="$LD_FLAGS" \
-DCMAKE_INSTALL_PREFIX:PATH="_install" \
-DMIN_LOGGER_LEVEL=TRACE \
-DMUST_BUILD_TOXAV=ON \
-DNON_HERMETIC_TESTS=ON \
-DSTRICT_ABI=ON \
-DTEST_TIMEOUT_SECONDS=300 \
-DUSE_IPV6=OFF \
-DAUTOTEST=ON'
# We created the VM with the same number of cores as the host, so the host-ran `nproc` here is fine
RUN 'gmake "-j$NPROC" -k install -C_build'
RUN 'gmake "-j$NPROC" test ARGS="-j50" -C_build || \
gmake -j50 -C_build test ARGS="-j50 --rerun-failed" || \
gmake -j1 -C_build test ARGS="-j1 --rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || \
true'