--- /dev/null
+name: clang
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ buildtype: [ Debug, Release ]
+ env:
+ CC: clang
+ CXX: clang++
+ steps:
+ - uses: actions/checkout@v2
+ - run: sudo apt-get update
+ - name: Install build deps
+ run: >
+ sudo apt-get install -y
+ libboost-program-options-dev
+ libboost-test-dev
+ libpoppler-qt5-dev
+ qtbase5-dev
+ qttools5-dev
+ qttools5-dev-tools
+ clang
+ - name: cmake -B build/
+ run: >
+ cmake -B build/
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+ -DUsePrerenderedPDF=ON
+ -DCodeCoverage=ON
+ -DCMAKE_BUILD_TYPE=${{matrix.buildtype}}
+ .
+ - run: cmake --build build/
+ - name: run tests within xvfb
+ working-directory: build/
+ run: >
+ xvfb-run -a -s '-screen 0 1920x1080x24 -screen 1 1920x1200x24'
+ ctest --output-on-failure --timeout 60
+ - name: upload coverage
+ run: bash <(curl -s https://codecov.io/bash)
# about undefined behaviours.
# So don't set Werror for it.
-# TODO: Set this only for the automoc files
+# FIXME: Set this only for the automoc files
add_definitions(-Wno-error=undefined-reinterpret-cast)
+add_definitions(-Wno-error=redundant-parens)
+add_definitions(-Wno-error=extra-semi-stmt)
# Clang on recent XCode fails to compile the boost tests
add_definitions(-Wno-error=disabled-macro-expansion)
-#message(FATAL_ERROR "Version: ${CMAKE_CXX_COMPILER_VERSION}")
-
# clang will complain about -isystem passed but not used.
# This adds unnecessary noise
add_definitions(-Wno-unused-command-line-argument)
+# unit_test_log from boost::test will trigger this warning
+add_definitions(-Wno-error=used-but-marked-unused)
+
# qrc system generates code that triggers a lot of the
# clang warnings.
set_source_files_properties( ${EMBEDDED_QRC}