Issue 188 compile failed when bbmd enabled 0 (#200)

* Fix compile for BBMD=none

* Add compile for BBMD=none to pipeline

* remove appveyor. add codeql badge

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2021-10-13 10:37:01 -05:00
committed by GitHub
parent 73bfda54ed
commit 88a3921c5b
5 changed files with 69 additions and 23 deletions
-8
View File
@@ -1,8 +0,0 @@
image:
- Visual Studio 2019
- Ubuntu
- macOS
build_script:
- cmake . -DBUILD_SHARED_LIBS=ON
- cmake --build . --config Release
+52 -7
View File
@@ -9,6 +9,34 @@ on:
- '*' - '*'
jobs: jobs:
bip-apps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Create Build Environment
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
- name: Build Demo Apps
run: |
gcc --version
make clean
make all
bip-no-bbmd-apps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Create Build Environment
run: |
sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev
- name: Build Demo Apps BBMD=none
run: |
gcc --version
make clean
make BBMD=none all
gateway: gateway:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -18,7 +46,10 @@ jobs:
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev sudo apt-get install -qq libconfig-dev
- name: Build Gateway Demo - name: Build Gateway Demo
run: make clean gateway run: |
gcc --version
make clean
make gateway
router: router:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -29,7 +60,10 @@ jobs:
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev sudo apt-get install -qq libconfig-dev
- name: Build Router Demo - name: Build Router Demo
run: make clean router run: |
gcc --version
make clean
make router
router-ipv6: router-ipv6:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -40,7 +74,10 @@ jobs:
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev sudo apt-get install -qq libconfig-dev
- name: Build Router IPv6 Demo - name: Build Router IPv6 Demo
run: make clean router-ipv6 run: |
gcc --version
make clean
make router-ipv6
router-mstp: router-mstp:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -51,7 +88,10 @@ jobs:
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev sudo apt-get install -qq libconfig-dev
- name: Build Router MSTP Demo - name: Build Router MSTP Demo
run: make clean router-mstp run: |
gcc --version
make clean
make router-mstp
mstp: mstp:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -62,7 +102,10 @@ jobs:
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev sudo apt-get install -qq libconfig-dev
- name: Build MSTP Demos - name: Build MSTP Demos
run: make clean mstp run: |
gcc --version
make clean
make mstp
ethernet: ethernet:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -73,7 +116,10 @@ jobs:
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -qq libconfig-dev sudo apt-get install -qq libconfig-dev
- name: Build Ethernet Demos - name: Build Ethernet Demos
run: make clean ethernet run: |
gcc --version
make clean
make ethernet
ports-arm: ports-arm:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -123,4 +169,3 @@ jobs:
export LD=i686-w64-mingw32-ld export LD=i686-w64-mingw32-ld
i686-w64-mingw32-gcc --version i686-w64-mingw32-gcc --version
make win32 make win32
+4 -4
View File
@@ -8,9 +8,9 @@ Welcome to the wonderful world of BACnet and true device interoperability!
Continuous Integration Continuous Integration
---------------------- ----------------------
This library uses various automated continuous integration services This library uses automated continuous integration services
to assist in automated compilation, validation, linting, and unit testing to assist in automated compilation, validation, linting, security scanning,
of robust C code and BACnet functionality. and unit testing to produce robust C code and BACnet functionality.
[![Actions Status](https://github.com/bacnet-stack/bacnet-stack/workflows/CMake/badge.svg)](https://github.com/bacnet-stack/bacnet-stack/actions) GitHub Workflow [![Actions Status](https://github.com/bacnet-stack/bacnet-stack/workflows/CMake/badge.svg)](https://github.com/bacnet-stack/bacnet-stack/actions) GitHub Workflow
@@ -18,7 +18,7 @@ of robust C code and BACnet functionality.
[![Actions Status](https://github.com/bacnet-stack/bacnet-stack/workflows/Lint/badge.svg)](https://github.com/bacnet-stack/bacnet-stack/actions) GitHub Workflow [![Actions Status](https://github.com/bacnet-stack/bacnet-stack/workflows/Lint/badge.svg)](https://github.com/bacnet-stack/bacnet-stack/actions) GitHub Workflow
[![Build status](https://ci.appveyor.com/api/projects/status/5lq0d9a69g7ixskm/branch/master?svg=true)](https://ci.appveyor.com/project/skarg/bacnet-stack/branch/master) AppVeyor CI [![Actions Status](https://github.com/bacnet-stack/bacnet-stack/workflows/CodeQL/badge.svg)](https://github.com/bacnet-stack/bacnet-stack/actions) GitHub Workflow
About this Project About this Project
------------------ ------------------
+9 -2
View File
@@ -35,12 +35,16 @@ BACDL_DEFINE ?= -DBACDL_BIP=1
BBMD_DEFINE ?= -DBBMD_ENABLED=1 -DBBMD_CLIENT_ENABLED BBMD_DEFINE ?= -DBBMD_ENABLED=1 -DBBMD_CLIENT_ENABLED
endif endif
ifeq (${BBMD},none)
BBMD_DEFINE = -DBBMD_ENABLED=0
endif
ifeq (${BBMD},server) ifeq (${BBMD},server)
BBMD_DEFINE=-DBBMD_ENABLED=1 BBMD_DEFINE = -DBBMD_ENABLED=1
endif endif
ifeq (${BBMD},client) ifeq (${BBMD},client)
BBMD_DEFINE = -DBBMD_ENABLED=1 -DBBMD_CLIENT_ENABLED BBMD_DEFINE = -DBBMD_ENABLED=1 -DBBMD_CLIENT_ENABLED
endif endif
endif endif
# Define WEAK_FUNC for unsupported or specific compilers # Define WEAK_FUNC for unsupported or specific compilers
@@ -188,7 +192,10 @@ SUBDIRS = readprop writeprop readfile writefile reinit server dcc \
writepropm uptransfer getevent uevent abort error event ack-alarm writepropm uptransfer getevent uevent abort error event ack-alarm
ifeq (${BACDL_DEFINE},-DBACDL_BIP=1) ifeq (${BACDL_DEFINE},-DBACDL_BIP=1)
SUBDIRS += whoisrouter iamrouter initrouter readbdt readfdt writebdt SUBDIRS += whoisrouter iamrouter initrouter
ifneq (${BBMD},none)
SUBDIRS += readbdt readfdt writebdt
endif
endif endif
ifeq (${BACNET_PORT},linux) ifeq (${BACNET_PORT},linux)
+3 -1
View File
@@ -51,7 +51,9 @@ static uint16_t BBMD_TTL_Seconds = 60000;
static BACNET_IP_ADDRESS BBMD_Address; static BACNET_IP_ADDRESS BBMD_Address;
static bool BBMD_Address_Valid; static bool BBMD_Address_Valid;
static uint16_t BBMD_Result = 0; static uint16_t BBMD_Result = 0;
#if BBMD_ENABLED
static BACNET_IP_BROADCAST_DISTRIBUTION_TABLE_ENTRY BBMD_Table_Entry; static BACNET_IP_BROADCAST_DISTRIBUTION_TABLE_ENTRY BBMD_Table_Entry;
#endif
/* enable debugging */ /* enable debugging */
static bool BIP_DL_Debug = false; static bool BIP_DL_Debug = false;
@@ -117,7 +119,7 @@ int dlenv_bbmd_result(void)
int dlenv_register_as_foreign_device(void) int dlenv_register_as_foreign_device(void)
{ {
int retval = 0; int retval = 0;
#if defined(BACDL_BIP) #if defined(BACDL_BIP) && BBMD_ENABLED
bool bdt_entry_valid = false; bool bdt_entry_valid = false;
uint16_t bdt_entry_port = 0; uint16_t bdt_entry_port = 0;
char *pEnv = NULL; char *pEnv = NULL;