--- /dev/null
+name: CI FreeBSD
+
+on:
+ push:
+ branches:
+ - packaging_test
+ schedule:
+ - cron: '0 20 * * *'
+
+jobs:
+ freebsd-build:
+
+ runs-on: macos-latest
+
+ name: "FreeBSD build"
+
+ steps:
+
+ - uses: actions/checkout@v2
+ with:
+ path: freeradius
+
+ - name: Test using a FreeBSD VirtualBox VM
+ uses: vmactions/freebsd-vm@v0.0.9
+ with:
+ usesh: true
+ prepare: pkg install -y gmake talloc git
+ run: |
+ freebsd-version
+ cd freeradius
+ ./configure
+ gmake -j `sysctl -n hw.ncpu`
+ gmake test.eap
#include "log.h"
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
#include <link.h>
#endif
-#!/bin/bash
+#! /bin/sh
#
# This program is is free software; you can redistribute it and/or modify
: ${HOSTAPD_GIT_TAG:="hostap_2_8"}
: ${WPA_SUPPLICANT_DIR:="${HOSTAPD_DIR}/wpa_supplicant"}
+: ${MAKE:=make}
: ${BUILD_CONF_DIR:="$(dirname $0)/eapol_test"}
: ${EAPOL_TEST_PATH:="${BUILD_CONF_DIR}/eapol_test"}
fi
fi
-case "$OSTYPE" in
-linux-gnu)
+OS="$(uname)"
+
+case "$OS" in
+linux-gnu|Linux)
BUILD_CONF_FILE="${BUILD_CONF_DIR}/config_linux"
;;
-darwin*)
+darwin*|Darwin*)
BUILD_CONF_FILE="${BUILD_CONF_DIR}/config_osx"
;;
-freebsd*)
+freebsd*|FreeBSD*)
BUILD_CONF_FILE="${BUILD_CONF_DIR}/config_freebsd"
+ MAKE=gmake
;;
*)
- echo "Don't have specific eapol_test build config for OS $OSTYPE. Using linux build config"
+ echo "Don't have specific eapol_test build config for OS $OS. Using linux build config"
BUILD_CONF_FILE="${BUILD_CONF_DIR}/linux"
;;
esac
if [ ! -e "${BUILD_CONF_FILE}" ]; then
- echo "Missing build config file \"${BUILD_CONF_FILE}\" for OS $OSTYPE, please contribute one" 1>&2
+ echo "Missing build config file \"${BUILD_CONF_FILE}\" for OS $OS, please contribute one" 1>&2
exit 1
fi
cp "$BUILD_CONF_FILE" "$WPA_SUPPLICANT_DIR/.config"
-if ! make -C "${WPA_SUPPLICANT_DIR}" -j8 eapol_test 1>&2 || [ ! -e "${WPA_SUPPLICANT_DIR}/eapol_test" ]; then
+if ! ${MAKE} -C "${WPA_SUPPLICANT_DIR}" -j8 eapol_test 1>&2 || [ ! -e "${WPA_SUPPLICANT_DIR}/eapol_test" ]; then
echo "Build error" 1>&2
if [ -z "${BUILD_DIR}" ]; then rm -rf "$TMP_BUILD_DIR"; fi
exit 1
# replacement for WEXT and its use allows wpa_supplicant to properly control
# the driver to improve existing functionality like roaming and to support new
# functionality.
-CONFIG_DRIVER_WEXT=n
+CONFIG_DRIVER_WEXT=
# Driver interface for Linux drivers using the nl80211 kernel interface
-CONFIG_DRIVER_NL80211=n
+CONFIG_DRIVER_NL80211=
# QCA vendor extensions to nl80211
-CONFIG_DRIVER_NL80211_QCA=n
+CONFIG_DRIVER_NL80211_QCA=
# driver_nl80211.c requires libnl. If you are compiling it yourself
# you may need to point hostapd to your version of libnl.
CONFIG_EAP_OTP=y
# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used)
-#CONFIG_EAP_SIM=y
+CONFIG_EAP_SIM=y
# EAP-PSK (experimental; this is _not_ needed for WPA-PSK)
CONFIG_EAP_PSK=y
CONFIG_EAP_PAX=y
# LEAP
-CONFIG_EAP_LEAP=n
+CONFIG_EAP_LEAP=
# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used)
CONFIG_EAP_AKA=y
# replacement for WEXT and its use allows wpa_supplicant to properly control
# the driver to improve existing functionality like roaming and to support new
# functionality.
-CONFIG_DRIVER_WEXT=n
+CONFIG_DRIVER_WEXT=
# Driver interface for Linux drivers using the nl80211 kernel interface
-CONFIG_DRIVER_NL80211=n
+CONFIG_DRIVER_NL80211=
# QCA vendor extensions to nl80211
-CONFIG_DRIVER_NL80211_QCA=n
+CONFIG_DRIVER_NL80211_QCA=
# driver_nl80211.c requires libnl. If you are compiling it yourself
# you may need to point hostapd to your version of libnl.
CONFIG_EAP_PAX=y
# LEAP
-CONFIG_EAP_LEAP=n
+CONFIG_EAP_LEAP=
# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used)
CONFIG_EAP_AKA=y
# replacement for WEXT and its use allows wpa_supplicant to properly control
# the driver to improve existing functionality like roaming and to support new
# functionality.
-CONFIG_DRIVER_WEXT=n
+CONFIG_DRIVER_WEXT=
# Driver interface for Linux drivers using the nl80211 kernel interface
-CONFIG_DRIVER_NL80211=n
+CONFIG_DRIVER_NL80211=
# QCA vendor extensions to nl80211
-CONFIG_DRIVER_NL80211_QCA=n
+CONFIG_DRIVER_NL80211_QCA=
# driver_nl80211.c requires libnl. If you are compiling it yourself
# you may need to point hostapd to your version of libnl.
CONFIG_EAP_PAX=y
# LEAP
-CONFIG_EAP_LEAP=n
+CONFIG_EAP_LEAP=
# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used)
CONFIG_EAP_AKA=y
#include "tmpl_priv.h"
#include <signal.h>
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
#include <sys/wait.h>
#endif