diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..4bc593c --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company +# +# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only + +name: CI Nightly + +on: + schedule: + - cron: '0 3 * * *' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: + - ubuntu-latest + + config: + - name: clang-tidy + cmake_arg: '-DCMAKE_CXX_CLANG_TIDY=clang-tidy' + qt_version: "5.15" + + - name: clazy + cmake_arg: '-DCMAKE_CXX_COMPILER=clazy' + qt_version: "6.6.0" + apt_pgks: + - clazy + + steps: + - name: Install Qt ${{ matrix.config.qt_version }} with options and default aqtversion + uses: jurplel/install-qt-action@v3 + with: + version: ${{ matrix.config.qt_version }} + cache: true + + - name: Install ninja-build tool (must be after Qt due PATH changes) + uses: turtlesec-no/get-ninja@main + + - name: Install dependencies on Ubuntu (${{ join(matrix.config.apt_pgks, ' ') }}) + if: ${{ runner.os == 'Linux' && matrix.config.apt_pgks }} + run: | + sudo apt update -qq + echo ${{ join(matrix.config.apt_pgks, ' ') }} | xargs sudo apt install -y + + - uses: actions/checkout@v4 + + - name: Fetch Git submodule + run: git submodule update --init --recursive + + - name: Configure project + run: > + cmake -S . -B ./build -G Ninja ${{ matrix.config.cmake_arg }} + -DCMAKE_BUILD_TYPE=Debug + + - name: Build Project + run: cmake --build ./build diff --git a/cpp/propagate_const/test/CMakeLists.txt b/cpp/propagate_const/test/CMakeLists.txt index f85c19b..1938ee7 100644 --- a/cpp/propagate_const/test/CMakeLists.txt +++ b/cpp/propagate_const/test/CMakeLists.txt @@ -6,7 +6,11 @@ # find_package(Qt${QT_VERSION_MAJOR} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core Test) -set(CMAKE_CXX_STANDARD 20) +if(MSVC) + set(CMAKE_CXX_STANDARD 20) +else() + set(CMAKE_CXX_STANDARD 17) +endif() set(CMAKE_CXX_STANDARD_REQUIRED ON) set(tst_propagate_const_SOURCES tst_propagate_const.cpp) diff --git a/qt/model_view/sortProxyModel/test/CMakeLists.txt b/qt/model_view/sortProxyModel/test/CMakeLists.txt index 58ae54f..5694301 100644 --- a/qt/model_view/sortProxyModel/test/CMakeLists.txt +++ b/qt/model_view/sortProxyModel/test/CMakeLists.txt @@ -15,7 +15,6 @@ find_package( ) add_definitions(-DQT_DEPRECATED_WARNINGS) -message(STATUS "console was found. Need to port to cmake") set(tst_sortproxymodeltest_SOURCES ../sortproxymodel.cpp ../sortproxymodel.h tst_sortproxymodeltest.cpp vectormodel.h) add_executable(tst_sortproxymodeltest ${tst_sortproxymodeltest_SOURCES}) diff --git a/qt/notify_guard/test/CMakeLists.txt b/qt/notify_guard/test/CMakeLists.txt index 5e2c663..be03bb5 100644 --- a/qt/notify_guard/test/CMakeLists.txt +++ b/qt/notify_guard/test/CMakeLists.txt @@ -17,7 +17,6 @@ find_package( add_definitions(-Wall) include_directories(../src/) -message(STATUS "console was found. Need to port to cmake") set(test_tmp_1_SOURCES ../src/notifyguard.cpp ../src/notifyguard.h tst_notifyguard.cpp) add_executable(test_tmp_1 ${test_tmp_1_SOURCES}) diff --git a/qt/qt6_natvis/CMakeLists.txt b/qt/qt6_natvis/CMakeLists.txt index 80fd351..b9090a3 100644 --- a/qt/qt6_natvis/CMakeLists.txt +++ b/qt/qt6_natvis/CMakeLists.txt @@ -12,7 +12,11 @@ set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) -set(CMAKE_CXX_STANDARD 20) +if(MSVC) + set(CMAKE_CXX_STANDARD 20) +else() + set(CMAKE_CXX_STANDARD 17) +endif() set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/qt/ui_watchdog/example/CMakeLists.txt b/qt/ui_watchdog/example/CMakeLists.txt index 5034931..42f7777 100644 --- a/qt/ui_watchdog/example/CMakeLists.txt +++ b/qt/ui_watchdog/example/CMakeLists.txt @@ -16,7 +16,6 @@ find_package( include_directories(..) -message(STATUS "console was found. Need to port to cmake") set(ui_watchdog_example_SOURCES ../uiwatchdog.h main.cpp) add_executable(ui_watchdog_example ${ui_watchdog_example_SOURCES})