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 21, 2024
1 parent dab9299 commit 48baa63
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 1 deletion.
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-14 is omitted because of 6-hours 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
30 changes: 30 additions & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,36 @@ 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
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
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 48baa63

Please sign in to comment.