Skip to content

Commit

Permalink
Add Zserio tests with extra arguments to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mikir committed Feb 22, 2024
1 parent 967041c commit 0a3639b
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 2 deletions.
37 changes: 36 additions & 1 deletion .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
cxx-standard-version: "11"
gcc-version: "11"
clang-version: "14"
# Ubuntu 22.04, C++17, gcc 11 with gcovr, Clang 14 (needed for clang-format and clang-tidy), C++17
# Ubuntu 22.04, C++17, gcc 11 with gcovr, Clang 14 (needed for clang-format and clang-tidy)
- os: "ubuntu-22.04"
python-version: "3.8"
java-version: "8"
Expand Down Expand Up @@ -176,6 +176,41 @@ jobs:
CMAKE_EXTRA_ARGS: "-DZSERIO_ENABLE_WERROR=1 -DCMAKE_BUILD_TYPE=Debug"
SANITIZERS_ENABLED: 1

- name: Run Zserio tests with extra arguments
# -DZSERIO_ENABLE_WERROR=1 fails for gcc because of false positive warning
run: |
# -withRangeCheckCode -withValidationCode conflicts with -withoutWriterCode
export ZSERIO_EXTRA_ARGS="-withTypeInfoCode -withCodeComments"
scripts/test.sh -p -i arguments/without_writer_code java python
ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -setCppAllocator polymorphic -withReflectionCode" \
scripts/test.sh -p -i arguments/without_writer_code cpp-linux64-gcc cpp-linux32-gcc \
cpp-linux64-clang cpp-linux32-clang
export ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -withRangeCheckCode -withValidationCode"
scripts/test.sh -p -x arguments/without_writer_code java python
ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -setCppAllocator polymorphic -withReflectionCode" \
scripts/test.sh -p -x arguments/without_writer_code cpp-linux64-gcc cpp-linux32-gcc \
cpp-linux64-clang cpp-linux32-clang
export ZSERIO_EXTRA_ARGS="-setTopLevelPackage top.level"
ZSERIO_EXTRA_ARGS="-setTopLevelPackage top.level" scripts/test.sh doc xml
env:
CMAKE_EXTRA_ARGS: "-DCMAKE_BUILD_TYPE=Release"

- name: Run Zserio tests with extra arguments (Debug Build)
# -DZSERIO_ENABLE_WERROR=1 fails for gcc because of false positive warning
# clang-tidy is disabled because of 6 hours time limit
run: |
# -withRangeCheckCode -withValidationCode conflicts with -withoutWriterCode
export ZSERIO_EXTRA_ARGS="-withTypeInfoCode -withCodeComments \
-setCppAllocator polymorphic -withReflectionCode"
scripts/test.sh -p -i arguments/without_writer_code cpp-linux64-gcc cpp-linux32-gcc \
cpp-linux64-clang cpp-linux32-clang
export ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -withRangeCheckCode -withValidationCode"
scripts/test.sh -p -x arguments/without_writer_code cpp-linux64-gcc cpp-linux32-gcc \
cpp-linux64-clang cpp-linux32-clang
env:
CMAKE_EXTRA_ARGS: "-DZSERIO_ENABLE_WERROR=1 -DCMAKE_BUILD_TYPE=Debug"
SANITIZERS_ENABLED: 1

- name: Run Zserio integration tests for repeated generation
run: |
scripts/test_gen.sh all-linux64-gcc cpp-linux32-gcc cpp-linux64-clang cpp-linux32-clang
Expand Down
33 changes: 32 additions & 1 deletion .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ jobs:
choco install graphviz
choco install zip
choco install mingw --version ${{matrix.mingw-version}}
ls -l /c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64
shell: bash

- name: Install specific version of C++ static code analysis tool (cppcheck)
Expand Down Expand Up @@ -157,6 +156,38 @@ jobs:
env:
CMAKE_EXTRA_ARGS: "-DCMAKE_BUILD_TYPE=Debug"

- name: Run Zserio tests with extra arguments
# -DZSERIO_ENABLE_WERROR=1 fails for mingw because of false positive warning
run: |
# -withRangeCheckCode -withValidationCode conflicts with -withoutWriterCode
export ZSERIO_EXTRA_ARGS="-withTypeInfoCode -withCodeComments"
scripts/test.sh -p -i arguments/without_writer_code java python
ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -setCppAllocator polymorphic -withReflectionCode" \
scripts/test.sh -p -i arguments/without_writer_code cpp-windows64-mingw cpp-windows64-msvc
export ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -withRangeCheckCode -withValidationCode"
scripts/test.sh -p -x arguments/without_writer_code java python
ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -setCppAllocator polymorphic -withReflectionCode" \
scripts/test.sh -p -x arguments/without_writer_code cpp-windows64-mingw cpp-windows64-msvc
export ZSERIO_EXTRA_ARGS="-setTopLevelPackage top.level"
scripts/test.sh doc xml
shell: bash
env:
CMAKE_EXTRA_ARGS: "-DCMAKE_BUILD_TYPE=Release"

- name: Run Zserio tests with extra arguments (Debug Build)
# -DZSERIO_ENABLE_WERROR=1 fails for mingw because of false positive warning
# allocation tests do not work for MSVC Debug
run: |
# -withRangeCheckCode -withValidationCode conflicts with -withoutWriterCode
export ZSERIO_EXTRA_ARGS="-withTypeInfoCode -withCodeComments \
-setCppAllocator polymorphic -withReflectionCode"
scripts/test.sh -p -i arguments/without_writer_code cpp-windows64-mingw
export ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -withRangeCheckCode -withValidationCode"
scripts/test.sh -p -x arguments/without_writer_code cpp-windows64-mingw
shell: bash
env:
CMAKE_EXTRA_ARGS: "-DCMAKE_BUILD_TYPE=Debug"

- name: Run Zserio integration tests for repeated generation
run: scripts/test_gen.sh all-windows64-mingw cpp-windows64-msvc
shell: bash
Expand Down

0 comments on commit 0a3639b

Please sign in to comment.