Skip to content

Commit ea16918

Browse files
committed
Add Zserio tests with extra arguments to GitHub actions
1 parent edec8e4 commit ea16918

File tree

2 files changed

+74
-2
lines changed

2 files changed

+74
-2
lines changed

.github/workflows/build_linux.yml

+41-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
cxx-standard-version: "11"
4141
gcc-version: "11"
4242
clang-version: "14"
43-
# Ubuntu 22.04, C++17, gcc 11 with gcovr, Clang 14 (needed for clang-format and clang-tidy), C++17
43+
# Ubuntu 22.04, C++17, gcc 11 with gcovr, Clang 14 (needed for clang-format and clang-tidy)
4444
- os: "ubuntu-22.04"
4545
python-version: "3.8"
4646
java-version: "8"
@@ -91,6 +91,7 @@ jobs:
9191

9292
- name: Install gcc-${{matrix.gcc-version}} compiler
9393
run: |
94+
sudo apt-get update
9495
sudo apt-get install gcc-${{matrix.gcc-version}}
9596
sudo apt-get install g++-${{matrix.gcc-version}} g++-${{matrix.gcc-version}}-multilib
9697
@@ -176,6 +177,45 @@ jobs:
176177
CMAKE_EXTRA_ARGS: "-DZSERIO_ENABLE_WERROR=1 -DCMAKE_BUILD_TYPE=Debug"
177178
SANITIZERS_ENABLED: 1
178179

180+
- name: Run Zserio tests with extra arguments
181+
# -DZSERIO_ENABLE_WERROR=1 fails for gcc because of false positive warning
182+
run: |
183+
# -withRangeCheckCode -withValidationCode conflicts with -withoutWriterCode
184+
export ZSERIO_EXTRA_ARGS="-withTypeInfoCode -withCodeComments"
185+
scripts/test.sh -p -i arguments/without_writer_code java python
186+
ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -setCppAllocator polymorphic -withReflectionCode" \
187+
scripts/test.sh -p -i arguments/without_writer_code cpp-linux64-gcc cpp-linux32-gcc \
188+
cpp-linux64-clang cpp-linux32-clang
189+
export ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -withRangeCheckCode -withValidationCode"
190+
scripts/test.sh -p -x arguments/without_writer_code java python
191+
ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -setCppAllocator polymorphic -withReflectionCode" \
192+
scripts/test.sh -p -x arguments/without_writer_code cpp-linux64-gcc cpp-linux32-gcc \
193+
cpp-linux64-clang cpp-linux32-clang
194+
export ZSERIO_EXTRA_ARGS="-setTopLevelPackage top.level"
195+
ZSERIO_EXTRA_ARGS="-setTopLevelPackage top.level" scripts/test.sh doc xml
196+
env:
197+
CMAKE_EXTRA_ARGS: "-DCMAKE_BUILD_TYPE=Release"
198+
199+
- name: Run Zserio tests with extra arguments (Debug Build)
200+
# sanitizers do not work on cpp-linux32-clang when cross-compiling
201+
# -DZSERIO_ENABLE_WERROR=1 fails for gcc because of false positive warning
202+
run: |
203+
if [ -f "`which clang-tidy-14`" ] ; then
204+
export CLANG_TIDY_BIN=clang-tidy-14
205+
fi
206+
# -withRangeCheckCode -withValidationCode conflicts with -withoutWriterCode
207+
export ZSERIO_EXTRA_ARGS="-withTypeInfoCode -withCodeComments \
208+
-setCppAllocator polymorphic -withReflectionCode"
209+
scripts/test.sh -p -i arguments/without_writer_code cpp-linux64-gcc cpp-linux32-gcc \
210+
cpp-linux64-clang
211+
# disabled because of 6 hours time limit
212+
# export ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -withRangeCheckCode -withValidationCode"
213+
# scripts/test.sh -p -x arguments/without_writer_code cpp-linux64-gcc cpp-linux32-gcc \
214+
# cpp-linux64-clang
215+
env:
216+
CMAKE_EXTRA_ARGS: "-DZSERIO_ENABLE_WERROR=1 -DCMAKE_BUILD_TYPE=Debug"
217+
SANITIZERS_ENABLED: 1
218+
179219
- name: Run Zserio integration tests for repeated generation
180220
run: |
181221
scripts/test_gen.sh all-linux64-gcc cpp-linux32-gcc cpp-linux64-clang cpp-linux32-clang

.github/workflows/build_windows.yml

+33-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ jobs:
104104
choco install graphviz
105105
choco install zip
106106
choco install mingw --version ${{matrix.mingw-version}}
107-
ls -l /c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64
108107
shell: bash
109108

110109
- name: Install specific version of C++ static code analysis tool (cppcheck)
@@ -157,6 +156,39 @@ jobs:
157156
env:
158157
CMAKE_EXTRA_ARGS: "-DCMAKE_BUILD_TYPE=Debug"
159158

159+
- name: Run Zserio tests with extra arguments
160+
# -DZSERIO_ENABLE_WERROR=1 fails for mingw because of false positive warning
161+
run: |
162+
# -withRangeCheckCode -withValidationCode conflicts with -withoutWriterCode
163+
export ZSERIO_EXTRA_ARGS="-withTypeInfoCode -withCodeComments"
164+
scripts/test.sh -p -i arguments/without_writer_code java python
165+
ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -setCppAllocator polymorphic -withReflectionCode" \
166+
scripts/test.sh -p -i arguments/without_writer_code cpp-windows64-mingw cpp-windows64-msvc
167+
export ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -withRangeCheckCode -withValidationCode"
168+
scripts/test.sh -p -x arguments/without_writer_code java python
169+
ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -setCppAllocator polymorphic -withReflectionCode" \
170+
scripts/test.sh -p -x arguments/without_writer_code cpp-windows64-mingw cpp-windows64-msvc
171+
export ZSERIO_EXTRA_ARGS="-setTopLevelPackage top.level"
172+
scripts/test.sh doc xml
173+
shell: bash
174+
env:
175+
CMAKE_EXTRA_ARGS: "-DCMAKE_BUILD_TYPE=Release"
176+
177+
- name: Run Zserio tests with extra arguments (Debug Build)
178+
# -DZSERIO_ENABLE_WERROR=1 fails for mingw because of false positive warning
179+
# allocation tests do not work for MSVC Debug
180+
run: |
181+
# -withRangeCheckCode -withValidationCode conflicts with -withoutWriterCode
182+
export ZSERIO_EXTRA_ARGS="-withTypeInfoCode -withCodeComments \
183+
-setCppAllocator polymorphic -withReflectionCode"
184+
scripts/test.sh -p -i arguments/without_writer_code cpp-windows64-mingw
185+
# disabled because of 6 hours time limit
186+
# export ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -withRangeCheckCode -withValidationCode"
187+
# scripts/test.sh -p -x arguments/without_writer_code cpp-windows64-mingw
188+
shell: bash
189+
env:
190+
CMAKE_EXTRA_ARGS: "-DCMAKE_BUILD_TYPE=Debug"
191+
160192
- name: Run Zserio integration tests for repeated generation
161193
run: scripts/test_gen.sh all-windows64-mingw cpp-windows64-msvc
162194
shell: bash

0 commit comments

Comments
 (0)