Skip to content

Commit

Permalink
CI: Add nightly and fix current to use master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
dantti committed Nov 12, 2023
1 parent b805f06 commit 709a06a
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ name: CI
on:
push:
branches:
- 2.0
- master
pull_request:
branches:
- 2.0
- master

jobs:
build:
Expand All @@ -19,12 +19,9 @@ jobs:
fail-fast: true
matrix:
os:
- ubuntu-22.04
- ubuntu-20.04
- windows-2022
- windows-2019
- macos-13
- macos-12
- ubuntu-latest
- windows-latest
- macos-latest

config:
- qt_version: "5.15"
Expand All @@ -44,6 +41,9 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4

- name: Fetch Git submodule
run: git submodule update --init --recursive

- name: Make sure MSVC is found when Ninja generator is in use
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 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 * * *'

push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-22.04

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: "5.15"
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
#with:
#ref: '2.0' # schedule.cron do not allow branch setting

- name: Fetch Git submodule
run: git submodule update --init --recursive

- name: Configure project
run: >
cmake -S . -B ./build -G Ninja ${{ matrix.config.cmake_arg }}
--warn-uninitialized -Werror=dev
-DCMAKE_BUILD_TYPE=Debug
- name: Build Project
id: ctest
run: cmake --build ./build
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ project(KDToolBox LANGUAGES CXX)

option(KDTOOLBOX_CXX20 "Enabling C++20 tests" OFF)

include(GNUInstallDirs)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand Down

0 comments on commit 709a06a

Please sign in to comment.