mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
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:
parent
74bf0fc2c8
commit
78c26e3c0d
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -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
54
.travis/cmake-freebsd-stage2
Executable 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'
|
Loading…
Reference in New Issue
Block a user