summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Lapenkou <lapenkov@fb.com>2022-01-06 19:31:09 -0800
committerAlexander Lapenkov <lapenkov.a@yandex.ru>2022-03-29 11:58:27 -0700
commitfdb6c101625060236732a6003116a129edda3687 (patch)
tree82d712b5197219ae49dab1f084f1c0f54f553eb9
parenta93931537e3845c8baca6965aded9a9683fa1481 (diff)
downloadjemalloc-fdb6c101625060236732a6003116a129edda3687.tar.gz
Add FreeBSD to TravisCI
Implement the generation of Travis jobs for FreeBSD. The generated jobs replicate the existing CirrusCI config.
-rw-r--r--.travis.yml48
-rw-r--r--scripts/freebsd/before_install.sh3
-rw-r--r--scripts/freebsd/before_script.sh10
-rw-r--r--scripts/freebsd/script.sh3
-rwxr-xr-xscripts/gen_travis.py19
5 files changed, 83 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index c54cc454..f2b107ba 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -304,6 +304,54 @@ jobs:
- os: osx
arch: amd64
env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof --enable-prof-libunwind"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-lg-page=16 --with-malloc-conf=tcache:false"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --enable-prof --enable-prof-libunwind"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --with-lg-page=16 --with-malloc-conf=tcache:false"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes CONFIGURE_FLAGS="--enable-debug"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof --enable-prof-libunwind --with-lg-page=16 --with-malloc-conf=tcache:false"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes CONFIGURE_FLAGS="--enable-prof --enable-prof-libunwind"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes CONFIGURE_FLAGS="--with-lg-page=16 --with-malloc-conf=tcache:false"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --enable-prof --enable-prof-libunwind --with-lg-page=16 --with-malloc-conf=tcache:false"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes CONFIGURE_FLAGS="--enable-debug --enable-prof --enable-prof-libunwind"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes CONFIGURE_FLAGS="--enable-debug --with-lg-page=16 --with-malloc-conf=tcache:false"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes CONFIGURE_FLAGS="--enable-prof --enable-prof-libunwind --with-lg-page=16 --with-malloc-conf=tcache:false"
+ - os: freebsd
+ arch: amd64
+ env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes CONFIGURE_FLAGS="--enable-debug --enable-prof --enable-prof-libunwind --with-lg-page=16 --with-malloc-conf=tcache:false"
# Development build
- os: linux
env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --disable-cache-oblivious --enable-stats --enable-log --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
diff --git a/scripts/freebsd/before_install.sh b/scripts/freebsd/before_install.sh
new file mode 100644
index 00000000..f2bee321
--- /dev/null
+++ b/scripts/freebsd/before_install.sh
@@ -0,0 +1,3 @@
+#!/bin/tcsh
+
+su -m root -c 'pkg install -y git'
diff --git a/scripts/freebsd/before_script.sh b/scripts/freebsd/before_script.sh
new file mode 100644
index 00000000..29406f6f
--- /dev/null
+++ b/scripts/freebsd/before_script.sh
@@ -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
diff --git a/scripts/freebsd/script.sh b/scripts/freebsd/script.sh
new file mode 100644
index 00000000..d9c53a20
--- /dev/null
+++ b/scripts/freebsd/script.sh
@@ -0,0 +1,3 @@
+#!/bin/tcsh
+
+gmake check
diff --git a/scripts/gen_travis.py b/scripts/gen_travis.py
index 685bad59..40b0be1b 100755
--- a/scripts/gen_travis.py
+++ b/scripts/gen_travis.py
@@ -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()
))