mirror of
https://github.com/espressif/openthread.git
synced 2026-08-22 02:19:52 +00:00
[continuous-integration] enable most features on build check (#4946)
This commit is contained in:
@@ -57,7 +57,20 @@ jobs:
|
||||
script/make-pretty check
|
||||
|
||||
package:
|
||||
name: package-${{ matrix.compiler }}
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- compiler: gcc
|
||||
compiler_c: gcc
|
||||
compiler_cpp: g++
|
||||
- compiler: clang
|
||||
compiler_c: clang
|
||||
compiler_cpp: clang++
|
||||
env:
|
||||
CC: ${{ matrix.compiler_c }}
|
||||
CXX: ${{ matrix.compiler_cpp }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Bootstrap
|
||||
|
||||
@@ -249,6 +249,14 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define OT_APPLE_IGNORE_GNU_FOLDING_CONSTANT(...) \
|
||||
_Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wgnu-folding-constant\"") \
|
||||
__VA_ARGS__ _Pragma("GCC diagnostic pop")
|
||||
#else
|
||||
#define OT_APPLE_IGNORE_GNU_FOLDING_CONSTANT(...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*
|
||||
|
||||
@@ -45,6 +45,36 @@ build()
|
||||
options+=(
|
||||
"-DOT_COMPILE_WARNING_AS_ERROR=on"
|
||||
"-DOT_PLATFORM=posix"
|
||||
"-DOT_BORDER_AGENT=on"
|
||||
"-DOT_BORDER_ROUTER=on"
|
||||
"-DOT_CHANNEL_MANAGER=on"
|
||||
"-DOT_CHANNEL_MONITOR=on"
|
||||
"-DOT_CHILD_SUPERVISION=on"
|
||||
"-DOT_COAP=on"
|
||||
"-DOT_COAPS=on"
|
||||
"-DOT_COMMISSIONER=on"
|
||||
"-DOT_DHCP6_CLIENT=on"
|
||||
"-DOT_DHCP6_SERVER=on"
|
||||
"-DOT_DIAGNOSTIC=on"
|
||||
"-DOT_DNS_CLIENT=on"
|
||||
"-DOT_ECDSA=on"
|
||||
"-DOT_EXTERNAL_HEAP=on"
|
||||
"-DOT_IP6_FRAGM=on"
|
||||
"-DOT_JAM_DETECTION=on"
|
||||
"-DOT_JOINER=on"
|
||||
"-DOT_LEGACY=on"
|
||||
"-DOT_LINK_RAW=on"
|
||||
"-DOT_LOG_LEVEL_DYNAMIC=on"
|
||||
"-DOT_MAC_FILTER=on"
|
||||
"-DOT_MTD_NETDIAG=on"
|
||||
"-DOT_PLATFORM_NETIF=on"
|
||||
"-DOT_PLATFORM_UDP=on"
|
||||
"-DOT_REFERENCE_DEVICE=on"
|
||||
"-DOT_SERVICE=on"
|
||||
"-DOT_SETTINGS_RAM=on"
|
||||
"-DOT_SLAAC=on"
|
||||
"-DOT_SNTP_CLIENT=on"
|
||||
"-DOT_FULL_LOGS=on"
|
||||
)
|
||||
|
||||
mkdir -p $OT_BUILDDIR
|
||||
|
||||
@@ -963,7 +963,7 @@ static void processNetifEvent(otInstance *aInstance)
|
||||
VerifyOrExit(length > 0, OT_NOOP);
|
||||
|
||||
#if defined(__linux__)
|
||||
for (struct nlmsghdr *msg = reinterpret_cast<struct nlmsghdr *>(buffer); NLMSG_OK(msg, length);
|
||||
for (struct nlmsghdr *msg = reinterpret_cast<struct nlmsghdr *>(buffer); NLMSG_OK(msg, static_cast<size_t>(length));
|
||||
msg = NLMSG_NEXT(msg, length))
|
||||
{
|
||||
#else
|
||||
@@ -1363,7 +1363,7 @@ void platformNetifInit(otInstance *aInstance, const char *aInterfaceName)
|
||||
otIcmp6SetEchoMode(aInstance, OT_ICMP6_ECHO_HANDLER_DISABLED);
|
||||
otIp6SetReceiveCallback(aInstance, processReceive, aInstance);
|
||||
otIp6SetAddressCallback(aInstance, processAddressChange, aInstance);
|
||||
otSetStateChangedCallback(aInstance, processStateChange, aInstance);
|
||||
SuccessOrDie(otSetStateChangedCallback(aInstance, processStateChange, aInstance));
|
||||
#if OPENTHREAD_POSIX_MULTICAST_PROMISCUOUS_REQUIRED
|
||||
otIp6SetMulticastPromiscuousEnabled(aInstance, true);
|
||||
#endif
|
||||
|
||||
@@ -82,12 +82,13 @@ static bool IsMulticast(const struct in6_addr &aAddress)
|
||||
static otError transmitPacket(int aFd, uint8_t *aPayload, uint16_t aLength, const otMessageInfo &aMessageInfo)
|
||||
{
|
||||
struct sockaddr_in6 peerAddr;
|
||||
uint8_t control[CMSG_SPACE(sizeof(struct in6_pktinfo)) + CMSG_SPACE(sizeof(int))];
|
||||
size_t controlLength = 0;
|
||||
struct iovec iov;
|
||||
struct msghdr msg;
|
||||
struct cmsghdr * cmsg;
|
||||
ssize_t rval;
|
||||
uint8_t
|
||||
control[OT_APPLE_IGNORE_GNU_FOLDING_CONSTANT(CMSG_SPACE(sizeof(struct in6_pktinfo)) + CMSG_SPACE(sizeof(int)))];
|
||||
size_t controlLength = 0;
|
||||
struct iovec iov;
|
||||
struct msghdr msg;
|
||||
struct cmsghdr *cmsg;
|
||||
ssize_t rval;
|
||||
|
||||
memset(&peerAddr, 0, sizeof(peerAddr));
|
||||
peerAddr.sin6_port = htons(aMessageInfo.mPeerPort);
|
||||
|
||||
Reference in New Issue
Block a user