Skip to content

Commit

Permalink
Release v2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Mar 4, 2024
2 parents 54fce3c + bcfb9ff commit 6d2b96a
Show file tree
Hide file tree
Showing 26 changed files with 2,023 additions and 105 deletions.
30 changes: 22 additions & 8 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
image:
- Visual Studio 2022
- Visual Studio 2019
- Visual Studio 2017


init:
Expand All @@ -19,20 +18,28 @@ configuration:
- Release

environment:
COMMS_BRANCH: v5.2.1
COMMSDSL_BRANCH: v6.2.4
CC_TOOLS_QT_BRANCH: v4.2.3
COMMS_BRANCH: v5.2.2
COMMSDSL_BRANCH: v6.3
CC_TOOLS_QT_BRANCH: v5.1
matrix:
- CPP_STD: 11
QT_MAJOR: 5
EXTRA_CONFIG: -DMQTTSN_BUILD_TOOLS=OFF
- CPP_STD: 14
QT_MAJOR: 5
EXTRA_CONFIG: -DMQTTSN_BUILD_TOOLS=OFF
- CPP_STD: 17
QT_MAJOR: 5
- CPP_STD: 20
QT_MAJOR: 5
- CPP_STD: 20
QT_MAJOR: 6

matrix:
fast_finish: false
exclude:
- image: Visual Studio 2017
CPP_STD: 20
- platform: x86
QT_MAJOR: 6

install:
- call script\appveyor_install.bat
Expand All @@ -45,13 +52,20 @@ install:
- set COMMON_INSTALL_DIR=%BUILD_DIR%\install
- set COMMON_BUILD_TYPE=%CONFIGURATION%
- set COMMON_CXX_STANDARD=%CPP_STD%
- set GENERATOR="%CMAKE_GENERATOR%"
- set PLATFORM="%CMAKE_PLATFORM%"
- set CC_TOOLS_QT_MAJOR_QT_VERSION=%QT_MAJOR%
- call script\prepare_externals.bat

build_script:
- echo ------------------------- Building Project -------------------------
- cd %BUILD_DIR%
- cmake .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "NMake Makefiles" -DBOOST_ROOT="%BOOST_DIR%" -DBoost_USE_STATIC_LIBS=ON -DCMAKE_INSTALL_PREFIX="%COMMON_INSTALL_DIR%" -DCMAKE_PREFIX_PATH="%COMMON_INSTALL_DIR%" -DCMAKE_CXX_STANDARD=%CPP_STD% -DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON -DMQTTSN_GEN_TOOLS=ON
- cmake --build . --config %CONFIGURATION%
- cmake .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "%CMAKE_GENERATOR%" %PLATFORM_PARAM% ^
-DBOOST_ROOT="%BOOST_DIR%" -DBoost_USE_STATIC_LIBS=ON -DCMAKE_INSTALL_PREFIX="%COMMON_INSTALL_DIR%" ^
-DCMAKE_PREFIX_PATH="%COMMON_INSTALL_DIR%" -DCMAKE_CXX_STANDARD=%CPP_STD% ^
-DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON -DMQTTSN_GEN_TOOLS=ON -DMQTTSN_TOOLS_QT_VER=%QT_MAJOR% ^
%EXTRA_CONFIG%
- cmake --build . --config %CONFIGURATION% --parallel %NUMBER_OF_PROCESSORS%



42 changes: 27 additions & 15 deletions .github/workflows/actions_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Github Actions Build
on: [push]

env:
COMMS_BRANCH: v5.2.1
COMMSDSL_BRANCH: v6.2.4
CC_TOOLS_QT_BRANCH: v4.2.3
COMMS_BRANCH: v5.2.2
COMMSDSL_BRANCH: v6.3
CC_TOOLS_QT_BRANCH: v5.1

jobs:
build_gcc_old_ubuntu_20_04:
Expand All @@ -29,7 +29,7 @@ jobs:
run: sudo apt-get update --fix-missing

- name: Install Packages
run: sudo apt install libqt5gui5 qtbase5-dev libxml2-dev gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} gcc-8 g++-8
run: sudo apt install libqt5gui5 qtbase5-dev libboost-all-dev libxml2-dev gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} gcc-8 g++-8

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
run: sudo apt-get update --fix-missing

- name: Install Packages
run: sudo apt install libqt5gui5 qtbase5-dev libxml2-dev gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} gcc-8 g++-8
run: sudo apt install libqt5gui5 qtbase5-dev libboost-all-dev libxml2-dev gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} gcc-8 g++-8

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down Expand Up @@ -124,10 +124,11 @@ jobs:
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \
-DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON -DMQTTSN_GEN_TOOLS=ON
-DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON -DMQTTSN_GEN_TOOLS=ON -DMQTTSN_BUILD_TOOLS=${{env.BUILD_TOOLS}}
env:
CC: gcc-${{matrix.cc_ver}}
CXX: g++-${{matrix.cc_ver}}
BUILD_TOOLS: "${{ matrix.cpp >= 17 && 'ON' || 'OFF' }}"

- name: Build Target
working-directory: ${{runner.workspace}}/build
Expand All @@ -144,6 +145,7 @@ jobs:
type: [Debug, Release, MinSizeRel]
cc_ver: [9, 10, 11, 12]
cpp: [11, 14, 17, 20]
qt_ver: [5, 6]

steps:
- uses: actions/checkout@v2
Expand All @@ -153,7 +155,7 @@ jobs:

- name: Install Packages
run: |
sudo apt install libqt5gui5 qtbase5-dev libxml2-dev gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} \
sudo apt install libqt${{matrix.qt_ver}}gui${{matrix.qt_ver}} qtbase5-dev qt6-base-dev libboost-all-dev libxml2-dev gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}} \
python3 libpython3-dev swig default-jdk default-jre emscripten
- name: Create Build Environment
Expand All @@ -173,18 +175,20 @@ jobs:
COMMS_TAG: ${{env.COMMS_BRANCH}}
COMMSDSL_TAG: ${{env.COMMSDSL_BRANCH}}
CC_TOOLS_QT_TAG: ${{env.CC_TOOLS_QT_BRANCH}}
CC_TOOLS_QT_MAJOR_QT_VERSION: ${{matrix.qt_ver}}

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \
-DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON -DMQTTSN_GEN_TOOLS=ON \
-DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON -DMQTTSN_GEN_TOOLS=ON -DMQTTSN_BUILD_TOOLS=${{env.BUILD_TOOLS}} \
-DMQTTSN_GEN_SWIG=ON -DMQTTSN_GEN_EMSCRIPTEN=ON
env:
CC: gcc-${{matrix.cc_ver}}
CXX: g++-${{matrix.cc_ver}}
BUILD_TOOLS: "${{ matrix.cpp >= 17 && 'ON' || 'OFF' }}"

- name: Build Target
working-directory: ${{runner.workspace}}/build
Expand Down Expand Up @@ -218,7 +222,7 @@ jobs:
run: sudo apt-get update --fix-missing

- name: Install Packages
run: sudo apt install libqt5gui5 qtbase5-dev libxml2-dev clang-${{matrix.cc_ver}} clang-6.0
run: sudo apt install libqt5gui5 qtbase5-dev libboost-all-dev libxml2-dev clang-${{matrix.cc_ver}} clang-6.0


- name: Create Build Environment
Expand Down Expand Up @@ -247,10 +251,12 @@ jobs:
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold -DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install \
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON -DMQTTSN_GEN_TOOLS=ON
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON \
-DMQTTSN_GEN_TOOLS=ON -DMQTTSN_BUILD_TOOLS=${{env.BUILD_TOOLS}}
env:
CC: clang-${{matrix.cc_ver}}
CXX: clang++-${{matrix.cc_ver}}
BUILD_TOOLS: "${{ matrix.cpp >= 17 && 'ON' || 'OFF' }}"

- name: Build Target
working-directory: ${{runner.workspace}}/build
Expand Down Expand Up @@ -280,7 +286,7 @@ jobs:
run: sudo apt-get update --fix-missing

- name: Install Packages
run: sudo apt install libqt5gui5 qtbase5-dev libxml2-dev clang-${{matrix.cc_ver}}
run: sudo apt install libqt5gui5 qtbase5-dev libboost-all-dev libxml2-dev clang-${{matrix.cc_ver}}

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand All @@ -299,17 +305,19 @@ jobs:
COMMS_TAG: ${{env.COMMS_BRANCH}}
COMMSDSL_TAG: ${{env.COMMSDSL_BRANCH}}
CC_TOOLS_QT_TAG: ${{env.CC_TOOLS_QT_BRANCH}}
CC_TOOLS_QT_SKIP: "${{ matrix.cpp < 17 && '1' || '0' }}"

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \
-DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON -DMQTTSN_GEN_TOOLS=ON
-DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON -DMQTTSN_GEN_TOOLS=ON -DMQTTSN_BUILD_TOOLS=${{env.BUILD_TOOLS}}
env:
CC: clang-${{matrix.cc_ver}}
CXX: clang++-${{matrix.cc_ver}}
BUILD_TOOLS: "${{ matrix.cpp == 17 && 'ON' || 'OFF' }}"

- name: Build Target
working-directory: ${{runner.workspace}}/build
Expand All @@ -324,8 +332,9 @@ jobs:
fail-fast: false
matrix:
type: [Debug, Release, MinSizeRel]
cc_ver: [12, 13, 14]
cc_ver: [12, 13, 14, 15]
cpp: [11, 14, 17, 20]
qt_ver: [5, 6]

steps:
- uses: actions/checkout@v2
Expand All @@ -335,7 +344,7 @@ jobs:

- name: Install Packages
run: |
sudo apt install libqt5gui5 qtbase5-dev libxml2-dev clang-${{matrix.cc_ver}} \
sudo apt install libqt${{matrix.qt_ver}}gui${{matrix.qt_ver}} qtbase5-dev qt6-base-dev libboost-all-dev libxml2-dev clang-${{matrix.cc_ver}} \
python3 libpython3-dev swig default-jdk default-jre emscripten
- name: Create Build Environment
Expand All @@ -355,18 +364,21 @@ jobs:
COMMS_TAG: ${{env.COMMS_BRANCH}}
COMMSDSL_TAG: ${{env.COMMSDSL_BRANCH}}
CC_TOOLS_QT_TAG: ${{env.CC_TOOLS_QT_BRANCH}}
CC_TOOLS_QT_MAJOR_QT_VERSION: ${{matrix.qt_ver}}
CC_TOOLS_QT_SKIP: "${{ (matrix.cpp < 17 || (matrix.cpp == 20 && matrix.cc_ver < 15)) && '1' || '0' }}"

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_PREFIX_PATH=${{runner.workspace}}/build/install -DCMAKE_CXX_STANDARD=${{matrix.cpp}} \
-DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON -DMQTTSN_GEN_TOOLS=ON \
-DMQTTSN_GEN_PROTOCOL=ON -DMQTTSN_GEN_TEST=ON -DMQTTSN_GEN_TOOLS=ON -DMQTTSN_BUILD_TOOLS=${{env.BUILD_TOOLS}} \
-DMQTTSN_GEN_SWIG=ON -DMQTTSN_GEN_EMSCRIPTEN=ON
env:
CC: clang-${{matrix.cc_ver}}
CXX: clang++-${{matrix.cc_ver}}
BUILD_TOOLS: "${{ (matrix.cpp < 17 || (matrix.cpp == 20 && matrix.cc_ver < 15)) && 'OFF' || 'ON' }}"

- name: Build Target
working-directory: ${{runner.workspace}}/build
Expand Down
33 changes: 17 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ option (MQTTSN_BUILD_EMSCRIPTEN "Build and install project generated by the comm
# MQTTSN_PROT_OUTPUT_DIR - Path to protocol output directory. If not provided <build_dir>/output one is used.
# MQTTSN_TEST_OUTPUT_DIR - Path to test output directory. If not provided <build_dir>/output_tools one is used.
# MQTTSN_TOOLS_OUTPUT_DIR - Path to tools output directory. If not provided <build_dir>/output_tools one is used.
# MQTTSN_TOOLS_QT_VER - Major Qt version to be used when building tools output. Defaults to 5
# MQTTSN_SWIG_OUTPUT_DIR - Path to swig output directory. If not provided <build_dir>/output_swig one is used.
# MQTTSN_SWIG_SRC_DIR - Path to the commsdsl2swig sources. If not provided local "swig_src" dir is used.
# MQTTSN_SWIG_SRC_DIR - Path to the commsdsl2swig sources. If not provided local "src/swig" dir is used.
# MQTTSN_SWIG_LANGUAGES - Languages list to support by swig. If not provided "python java csharp" are chosen
# MQTTSN_EMSCRIPTEN_OUTPUT_DIR - Path to emscripten output directory. If not provided <build_dir>/output_emscripten one is used.
# COMMSDSL2COMMS_EXTRA_ARGS - Extra arguments to pass to "commsdsl2comms"
Expand All @@ -30,8 +31,8 @@ option (MQTTSN_BUILD_EMSCRIPTEN "Build and install project generated by the comm
# COMMSDSL2SWIG_EXTRA_ARGS - Extra arguments to pass to "commsdsl2swig"
# COMMSDSL2EMSCRIPTEN_EXTRA_ARGS - Extra arguments to pass to "commsdsl2emscripten"

set (MQTTSN_VERSION "2.5")
set (MQTTSN_MIN_COMMSDSL_VERSION "6.2.4")
set (MQTTSN_VERSION "2.6")
set (MQTTSN_MIN_COMMSDSL_VERSION "6.3")

set (EXTERNALS_DIR "${PROJECT_SOURCE_DIR}/externals")

Expand All @@ -56,7 +57,7 @@ if ("${MQTTSN_SWIG_OUTPUT_DIR}" STREQUAL "")
endif ()

if ("${MQTTSN_SWIG_SRC_DIR}" STREQUAL "")
set (MQTTSN_SWIG_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/swig_src)
set (MQTTSN_SWIG_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/swig)
endif ()

if ("${MQTTSN_SWIG_LANGUAGES}" STREQUAL "")
Expand All @@ -67,6 +68,10 @@ if ("${MQTTSN_EMSCRIPTEN_OUTPUT_DIR}" STREQUAL "")
set (MQTTSN_EMSCRIPTEN_OUTPUT_DIR "${CMAKE_BINARY_DIR}/output_emscripten")
endif ()

if ("${MQTTSN_TOOLS_QT_VER}" STREQUAL "")
set (MQTTSN_TOOLS_QT_VER 5)
endif ()

set (warn_as_error "--warn-as-err")
if (NOT MQTTSN_WARN_AS_ERR)
set (warn_as_error)
Expand All @@ -86,16 +91,11 @@ if (MQTTSN_GEN_PROTOCOL)
COMMAND ${CMAKE_COMMAND} -E remove_directory ${prot_tmp_dir}
)

set (code_input_param)
if (EXISTS ${PROJECT_SOURCE_DIR}/src)
set (code_input_param -c ${PROJECT_SOURCE_DIR}/src)
endif ()

add_custom_command(
OUTPUT ${prot_tmp_dir}
DEPENDS ${schema_file} ${src_files} rm_prot_tmp_tgt
COMMAND ${COMMSDSL2COMMS} ${warn_as_error} -V ${MQTTSN_VERSION} ${code_input_param}
-o ${prot_tmp_dir}
-o ${prot_tmp_dir} -c ${PROJECT_SOURCE_DIR}/src/protocol
${COMMSDSL2COMMS_EXTRA_ARGS} ${schema_file}
)

Expand All @@ -110,7 +110,7 @@ if (MQTTSN_GEN_PROTOCOL)
COMMAND ${CMAKE_COMMAND}
-DGENERATED="${prot_tmp_dir}" -DOUTPUT="${MQTTSN_PROT_OUTPUT_DIR}"
-P "${CMAKE_CURRENT_LIST_DIR}/CopyGenerated.cmake"
DEPENDS ${prot_tmp_dir} ${readme_file} "${CMAKE_CURRENT_LIST_DIR}/CopyGenerated.cmake" ${schema_file})
DEPENDS ${prot_tmp_dir} "${CMAKE_CURRENT_LIST_DIR}/CopyGenerated.cmake" ${schema_file})

if (MQTTSN_BUILD_PROTOCOL)
execute_process(
Expand Down Expand Up @@ -171,7 +171,7 @@ if (MQTTSN_GEN_TEST)
OUTPUT ${test_tmp_dir}
DEPENDS ${schema_file} ${src_files} rm_test_tmp_tgt
COMMAND ${COMMSDSL2TEST} ${warn_as_error} ${COMMSDSL2TEST_EXTRA_ARGS}
-o ${test_tmp_dir} ${schema_file}
-o ${test_tmp_dir} -c ${PROJECT_SOURCE_DIR}/src/test ${schema_file}
)

add_custom_target("test_output_tgt" ALL
Expand Down Expand Up @@ -229,7 +229,8 @@ if (MQTTSN_GEN_TOOLS)
OUTPUT ${tools_tmp_dir}
DEPENDS ${schema_file} ${src_files} rm_tools_tmp_tgt
COMMAND ${COMMSDSL2TOOLS_QT} ${warn_as_error} ${COMMSDSL2TOOLS_QT_EXTRA_ARGS}
-o ${tools_tmp_dir} ${schema_file}
--protocol "::CC MQTT-SN:MQTT-SN protocol.:cc.MqttSnProtocolPlugin"
-o ${tools_tmp_dir} -c ${PROJECT_SOURCE_DIR}/src/tools ${schema_file}
)

add_custom_target("tools_output_tgt" ALL
Expand Down Expand Up @@ -264,8 +265,8 @@ if (MQTTSN_GEN_TOOLS)
-DCMAKE_GENERATOR=${CMAKE_GENERATOR} -DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
-DCMAKE_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_PREFIX_PATH=${combined_prefix_path_str}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_PREFIX_PATH=${combined_prefix_path_str}
-DOPT_QT_MAJOR_VERSION=${MQTTSN_TOOLS_QT_VER}
)
endif ()
endif ()
Expand Down Expand Up @@ -351,7 +352,7 @@ if (MQTTSN_GEN_EMSCRIPTEN)
OUTPUT ${emscripten_tmp_dir}
DEPENDS ${schema_file} ${src_files} rm_emscripten_tmp_tgt
COMMAND ${COMMSDSL2EMSCRIPTEN} ${warn_as_error} ${COMMSDSL2EMSCRIPTEN_EXTRA_ARGS}
-o ${emscripten_tmp_dir} ${schema_file}
-o ${emscripten_tmp_dir} -c ${PROJECT_SOURCE_DIR}/src/emscripten ${schema_file}
)

add_custom_target("emscripten_output_tgt" ALL
Expand Down
14 changes: 0 additions & 14 deletions readme.generated

This file was deleted.

Loading

0 comments on commit 6d2b96a

Please sign in to comment.