cirrus: Run automated tests on FreeBSD via Cirrus CI
authorTobias Brunner <tobias@strongswan.org>
Tue, 27 Aug 2019 16:22:33 +0000 (18:22 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 28 Aug 2019 09:10:49 +0000 (11:10 +0200)
.cirrus.yml [new file with mode: 0644]
scripts/test.sh

diff --git a/.cirrus.yml b/.cirrus.yml
new file mode 100644 (file)
index 0000000..ad7737e
--- /dev/null
@@ -0,0 +1,13 @@
+freebsd_instance:
+  image: freebsd-12-0-release-amd64
+
+env:
+  TESTS_REDUCED_KEYLENGTHS: yes
+  LEAK_DETECTIVE: no
+  MONOLITHIC: no
+  TEST: freebsd
+  TRAVIS_OS_NAME: freebsd
+
+task:
+  install_script: ./scripts/test.sh deps
+  script: ./scripts/test.sh
index af0751a..254cf64 100755 (executable)
@@ -270,6 +270,26 @@ osx)
        export CPPFLAGS
        export LDFLAGS
        ;;
+freebsd)
+       # use the options of the FreeBSD port (including options), except smp,
+       # which requires a patch but is deprecated anyway, only using the builtin
+       # printf hooks
+       CONFIG="--enable-kernel-pfkey --enable-kernel-pfroute --disable-scripts
+                       --disable-kernel-netlink --enable-openssl --enable-eap-identity
+                       --enable-eap-md5 --enable-eap-tls --enable-eap-mschapv2
+                       --enable-eap-peap --enable-eap-ttls --enable-md4 --enable-blowfish
+                       --enable-addrblock --enable-whitelist --enable-cmd --enable-curl
+                       --enable-eap-aka --enable-eap-aka-3gpp2 --enable-eap-dynamic
+                       --enable-eap-radius --enable-eap-sim --enable-eap-sim-file
+                       --enable-gcm --enable-ipseckey --enable-kernel-libipsec
+                       --enable-load-tester --enable-ldap --enable-mediation
+                       --enable-mysql --enable-sqlite --enable-tpm     --enable-unbound
+                       --enable-unity --enable-xauth-eap --enable-xauth-pam
+                       --with-printf-hooks=builtin --enable-attr-sql --enable-sql"
+       DEPS="gmp openldap-client libxml2 mysql80-client sqlite3 unbound ldns"
+       export GPERF=/usr/local/bin/gperf
+       export LEX=/usr/local/bin/flex
+       ;;
 fuzzing)
        CFLAGS="$CFLAGS -DNO_CHECK_MEMWIPE"
        CONFIG="--enable-fuzzing --enable-static --disable-shared --disable-scripts
@@ -318,6 +338,10 @@ if test "$1" = "deps"; then
                brew uninstall --force libtool && brew install libtool && \
                brew install $DEPS
                ;;
+       freebsd)
+               pkg install -y automake autoconf libtool pkgconf && \
+               pkg install -y bison flex gperf gettext $DEPS
+               ;;
        esac
        exit $?
 fi