Skip to content

Commit

Permalink
Merge pull request #26 from KDABLabs/dantti/fix_gha
Browse files Browse the repository at this point in the history
Add nightly CI
  • Loading branch information
Allen Winter authored Dec 4, 2023
2 parents 973e857 + 556d67c commit 1841f51
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 5 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
#
# 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
6 changes: 5 additions & 1 deletion cpp/propagate_const/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion qt/model_view/sortProxyModel/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
1 change: 0 additions & 1 deletion qt/notify_guard/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
6 changes: 5 additions & 1 deletion qt/qt6_natvis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion qt/ui_watchdog/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 1841f51

Please sign in to comment.