Skip to content

Commit 372beb9

Browse files
committed
Release v3.1.3
2 parents 4f28237 + 6079cc5 commit 372beb9

File tree

20 files changed

+1109
-44
lines changed

20 files changed

+1109
-44
lines changed
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
name: Github Actions Build
2+
3+
on: [push]
4+
5+
jobs:
6+
build_gcc_ubuntu_16_04:
7+
runs-on: ubuntu-16.04
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
type: [Debug, Release, MinSizeRel]
12+
cc_ver: [4.8, 5, 6]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Install Packages
18+
run: sudo apt install libqt5gui5 libqt5serialport5-dev libqt5network5 gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}}
19+
20+
- name: Create Build Environment
21+
run: cmake -E make_directory ${{runner.workspace}}/build
22+
23+
- name: Configure CMake
24+
shell: bash
25+
working-directory: ${{runner.workspace}}/build
26+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold
27+
env:
28+
CC: gcc-${{matrix.cc_ver}}
29+
CXX: g++-${{matrix.cc_ver}}
30+
31+
- name: Build
32+
working-directory: ${{runner.workspace}}/build
33+
shell: bash
34+
run: cmake --build . --target install
35+
env:
36+
VERBOSE: 1
37+
38+
- name: Test
39+
working-directory: ${{runner.workspace}}/build
40+
shell: bash
41+
run: ctest
42+
43+
build_gcc_ubuntu_20_04:
44+
runs-on: ubuntu-20.04
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
type: [Debug, Release, MinSizeRel]
49+
cc_ver: [7, 8, 9, 10]
50+
51+
steps:
52+
- uses: actions/checkout@v2
53+
54+
- name: Install Packages
55+
run: sudo apt install libqt5gui5 libqt5serialport5-dev libqt5network5 doxygen dia
56+
57+
- name: Create Build Environment
58+
run: cmake -E make_directory ${{runner.workspace}}/build
59+
60+
- name: Configure CMake
61+
shell: bash
62+
working-directory: ${{runner.workspace}}/build
63+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install
64+
env:
65+
CC: gcc-${{matrix.cc_ver}}
66+
CXX: g++-${{matrix.cc_ver}}
67+
68+
- name: Build
69+
working-directory: ${{runner.workspace}}/build
70+
shell: bash
71+
run: cmake --build . --target install
72+
env:
73+
VERBOSE: 1
74+
75+
- name: Test
76+
working-directory: ${{runner.workspace}}/build
77+
shell: bash
78+
run: ctest
79+
80+
- name: Documentation
81+
working-directory: ${{runner.workspace}}/build
82+
shell: bash
83+
run: make doc_comms && make doc_commschampion
84+
85+
build_clang_ubuntu_18_04:
86+
runs-on: ubuntu-18.04
87+
strategy:
88+
fail-fast: false
89+
matrix:
90+
type: [Debug, Release, MinSizeRel]
91+
cc_ver: ["4.0", "5.0", "6.0", 7, 8, 9]
92+
93+
steps:
94+
- uses: actions/checkout@v2
95+
96+
- name: Install Packages
97+
run: sudo apt install libqt5gui5 libqt5serialport5-dev libqt5network5 doxygen dia clang-${{matrix.cc_ver}}
98+
99+
- name: Create Build Environment
100+
run: cmake -E make_directory ${{runner.workspace}}/build
101+
102+
- name: Configure CMake
103+
shell: bash
104+
working-directory: ${{runner.workspace}}/build
105+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install
106+
env:
107+
CC: clang-${{matrix.cc_ver}}
108+
CXX: clang++-${{matrix.cc_ver}}
109+
110+
- name: Build
111+
working-directory: ${{runner.workspace}}/build
112+
shell: bash
113+
run: cmake --build . --target install
114+
env:
115+
VERBOSE: 1
116+
117+
- name: Test
118+
working-directory: ${{runner.workspace}}/build
119+
shell: bash
120+
run: ctest
121+
122+
- name: Documentation
123+
working-directory: ${{runner.workspace}}/build
124+
shell: bash
125+
run: make doc_comms && make doc_commschampion
126+
127+
build_clang_ubuntu_20_04:
128+
runs-on: ubuntu-20.04
129+
strategy:
130+
fail-fast: false
131+
matrix:
132+
type: [Debug, Release, MinSizeRel]
133+
cc_ver: [10]
134+
135+
steps:
136+
- uses: actions/checkout@v2
137+
138+
- name: Install Packages
139+
run: sudo apt install libqt5gui5 libqt5serialport5-dev libqt5network5 doxygen dia clang-${{matrix.cc_ver}}
140+
141+
- name: Create Build Environment
142+
run: cmake -E make_directory ${{runner.workspace}}/build
143+
144+
- name: Configure CMake
145+
shell: bash
146+
working-directory: ${{runner.workspace}}/build
147+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install
148+
env:
149+
CC: clang-${{matrix.cc_ver}}
150+
CXX: clang++-${{matrix.cc_ver}}
151+
152+
- name: Build
153+
working-directory: ${{runner.workspace}}/build
154+
shell: bash
155+
run: cmake --build . --target install
156+
env:
157+
VERBOSE: 1
158+
159+
- name: Test
160+
working-directory: ${{runner.workspace}}/build
161+
shell: bash
162+
run: ctest
163+
164+
- name: Documentation
165+
working-directory: ${{runner.workspace}}/build
166+
shell: bash
167+
run: make doc_comms && make doc_commschampion
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master, develop ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master, develop ]
20+
schedule:
21+
- cron: '28 20 * * 5'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
language: [ 'cpp' ]
32+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33+
# Learn more:
34+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v1
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
49+
50+
# ℹ️ Command-line programs to run using the OS shell.
51+
# 📚 https://git.io/JvXDl
52+
53+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
54+
# and modify them (or add more) to build your code if your project
55+
# uses a compiled language
56+
57+
- run: |
58+
cmake -E make_directory ${{runner.workspace}}/build
59+
cd ${{runner.workspace}}/build
60+
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install -DCC_COMMS_LIB_ONLY=ON
61+
cmake --build . --target install
62+
63+
- name: Perform CodeQL Analysis
64+
uses: github/codeql-action/analyze@v1

comms/doc/doxygen.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2145,7 +2145,13 @@ INCLUDE_FILE_PATTERNS =
21452145
# recursively expanded use the := operator instead of the = operator.
21462146
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
21472147

2148-
PREDEFINED = FOR_DOXYGEN_DOC_ONLY COMMS_MSVC_WARNING_PUSH= COMMS_MSVC_WARNING_POP= COMMS_MSVC_WARNING_DISABLE(x)=
2148+
PREDEFINED = FOR_DOXYGEN_DOC_ONLY \
2149+
COMMS_MSVC_WARNING_PUSH= \
2150+
COMMS_MSVC_WARNING_POP= \
2151+
COMMS_MSVC_WARNING_DISABLE(x)= \
2152+
COMMS_GNU_WARNING_PUSH= \
2153+
COMMS_GNU_WARNING_POP= \
2154+
COMMS_GNU_WARNING_DISABLE(x)=
21492155

21502156
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
21512157
# tag can be used to specify a list of macro names that should be expanded. The

comms/include/comms/CompileControl.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,17 @@
2525

2626
#define CC_ENABLE_WARNINGS() GCC_DIAG_PRAGMA(pop)
2727

28+
#define COMMS_GNU_WARNING_PUSH GCC_DIAG_PRAGMA(push)
29+
#define COMMS_GNU_WARNING_DISABLE(x_) GCC_DIAG_PRAGMA(ignored x_)
30+
#define COMMS_GNU_WARNING_POP GCC_DIAG_PRAGMA(pop)
31+
2832
#else
2933

3034
#define CC_DISABLE_WARNINGS()
3135
#define CC_ENABLE_WARNINGS()
36+
#define COMMS_GNU_WARNING_PUSH
37+
#define COMMS_GNU_WARNING_DISABLE(x_)
38+
#define COMMS_GNU_WARNING_POP
3239

3340
#endif
3441

@@ -62,6 +69,7 @@
6269
#define COMMS_IS_GCC_47_OR_BELOW (COMMS_IS_GCC && (__GNUC__ == 4) && (__GNUC_MINOR__ < 8))
6370
#define COMMS_IS_GCC_9 (COMMS_IS_GCC && (__GNUC__ == 9))
6471
#define COMMS_IS_GCC_9_OR_BELOW (COMMS_IS_GCC_9 && (__GNUC__ <= 9))
72+
#define COMMS_IS_GCC_10 (COMMS_IS_GCC && (__GNUC__ == 10))
6573
#define COMMS_IS_GCC_10_OR_ABOVE (COMMS_IS_GCC && (__GNUC__ >= 10))
6674
#define COMMS_IS_CLANG_7_OR_ABOVE (COMMS_IS_CLANG && (__clang_major__ >= 7))
6775
#define COMMS_IS_CLANG_8 (COMMS_IS_CLANG && (__clang_major__ == 8))
@@ -147,3 +155,6 @@
147155

148156
#endif // #if COMMS_IS_MSVC
149157

158+
159+
160+

comms/include/comms/cast.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ details::ValueAssignWrapper<T> cast_assign(T& value)
3838
/// @code
3939
/// SomeFieldType someField = comms::field_cast<SomeFieldType>(someOtherField);
4040
/// @endcode
41+
/// The function will perform some compile time analysis and will do a simple
42+
/// static_cast between the contained values if they are convertible. Otherwise
43+
/// the write + read operations will be performed, i.e. the source field will
44+
/// be written into a temporary buffer, and the target field will perform a
45+
/// read operation from that buffer.
4146
/// @tparam TFieldTo Type to cast to.
4247
/// @tparam TFieldFrom Type to cast from.
4348
/// @param[in] field Original field

comms/include/comms/details/FieldCastHelper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class FieldCastHelper
7979
template <typename TFieldTo, typename TFieldFrom, typename... TParams>
8080
static TFieldTo castInternal(const TFieldFrom& field, WriteReadTag<TParams...>)
8181
{
82-
static_assert(TFieldFrom::minLength() == TFieldTo::maxLength(), "Casting between different fields of variable sizes is not supported.");
82+
static_assert(TFieldFrom::minLength() <= TFieldTo::maxLength(), "Casting between specified fields will fail .");
8383

8484
static const auto MaxBufSize = TFieldFrom::maxLength();
8585
std::uint8_t buf[MaxBufSize] = {0};

0 commit comments

Comments
 (0)