Skip to content

Commit

Permalink
CI: Add static checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dantti authored and LeonMatthesKDAB committed Jan 17, 2024
1 parent 12d987b commit bb66ec5
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
#
# SPDX-License-Identifier: MIT

name: CI Static Checks

on:
push:
branches:
- main
pull_request:
branches:
- main

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

config:
- name: clang-tidy
cmake_arg: '-DCMAKE_CXX_CLANG_TIDY=clang-tidy'

- name: clazy
cmake_arg: '-DCMAKE_CXX_COMPILER=clazy'
apt_pgks:
- clazy

steps:
- name: Install ninja-build tool
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 submodules
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
-DKDBindings_TESTS=True
- name: Build Project
id: ctest
run: cmake --build ./build

0 comments on commit bb66ec5

Please sign in to comment.