Add FreeBSD to TravisCI

Implement the generation of Travis jobs for FreeBSD. The generated jobs
replicate the existing CirrusCI config.
This commit is contained in:
Alex Lapenkou
2022-01-06 19:31:09 -08:00
committed by Alexander Lapenkov
parent a93931537e
commit fdb6c10162
5 changed files with 83 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
#!/bin/tcsh
su -m root -c 'pkg install -y git'

View File

@@ -0,0 +1,10 @@
#!/bin/tcsh
autoconf
# We don't perfectly track freebsd stdlib.h definitions. This is fine when
# we count as a system header, but breaks otherwise, like during these
# tests.
./configure --with-jemalloc-prefix=ci_ ${COMPILER_FLAGS:+ CC="$CC $COMPILER_FLAGS" CXX="$CXX $COMPILER_FLAGS"} $CONFIGURE_FLAGS
JE_NCPUS=`sysctl -n kern.smp.cpus`
gmake -j${JE_NCPUS}
gmake -j${JE_NCPUS} tests

View File

@@ -0,0 +1,3 @@
#!/bin/tcsh
gmake check

View File

@@ -7,6 +7,7 @@ from enum import Enum, auto
LINUX = 'linux'
OSX = 'osx'
WINDOWS = 'windows'
FREEBSD = 'freebsd'
AMD64 = 'amd64'
@@ -140,6 +141,9 @@ all_unusuals = (compilers_unusual + feature_unusuals
def get_extra_cflags(os, compiler):
if os == FREEBSD:
return []
if os == WINDOWS:
# For non-CL compilers under Windows (for now it's only MinGW-GCC),
# -fcommon needs to be specified to correctly handle multiple
@@ -273,6 +277,19 @@ def generate_windows(arch):
return generate_jobs(os, arch, (), max_unusual_opts, unusuals)
def generate_freebsd(arch):
os = FREEBSD
max_unusual_opts = 4
unusuals = (
Option.as_configure_flag('--enable-debug'),
Option.as_configure_flag('--enable-prof --enable-prof-libunwind'),
Option.as_configure_flag('--with-lg-page=16 --with-malloc-conf=tcache:false'),
CROSS_COMPILE_32BIT,
)
return generate_jobs(os, arch, (), max_unusual_opts, unusuals)
def get_manual_jobs():
return """\
@@ -298,6 +315,8 @@ def main():
#generate_windows(AMD64),
generate_freebsd(AMD64),
get_manual_jobs()
))