From 86a9515219550987aa169dfd31f2a3c03eae6aa9 Mon Sep 17 00:00:00 2001 From: Daniel Nicoletti Date: Sun, 12 Nov 2023 14:04:23 -0300 Subject: [PATCH] CI: Nightly for clazy and clang-tidy --- .github/workflows/nightly.yml | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/nightly.yml diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 00000000..5e83cd7a --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,59 @@ +# 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-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: Configure project + run: > + cmake -S . -B ./build -G Ninja ${{ matrix.config.cmake_arg }} + --warn-uninitialized -Werror=dev + -DCMAKE_BUILD_TYPE=Debug + -DKDChart_TESTS=ON + + - name: Build Project + id: ctest + run: cmake --build ./build