forked from KDAB/KDUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add clang-tidy on Windows on GitHub Actions
- Loading branch information
Showing
1 changed file
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
|
@@ -11,31 +11,44 @@ on: | |
push: | ||
|
||
env: | ||
CC: "/usr/bin/clang" | ||
CXX: "/usr/bin/clang++" | ||
CC: "clang" | ||
CXX: "clang++" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-24.04 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-24.04 | ||
- windows-2022 | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install ninja-build tool | ||
uses: aseprite/get-ninja@main | ||
uses: turtlesec-no/get-ninja@main | ||
|
||
- name: Install linux dependencies | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt update -qq | ||
sudo apt install -y libxkbcommon-dev libxcb-xkb-dev \ | ||
libxkbcommon-x11-dev wayland-scanner++ wayland-protocols \ | ||
libwayland-dev xvfb | ||
- name: Configure project | ||
- name: Configure project (Linux) | ||
if: runner.os == 'Linux' | ||
run: > | ||
cmake -S . -B ./build -G Ninja -DKDUTILS_BUILD_TESTS=True -DCMAKE_CXX_CLANG_TIDY="clang-tidy-18" \ | ||
cmake -S . -B ./build -G Ninja -DKDUTILS_BUILD_TESTS=True -DCMAKE_CXX_CLANG_TIDY="clang-tidy-18" | ||
-DCMAKE_BUILD_TYPE=Release | ||
- name: Configure project (Windows) | ||
if: runner.os == 'Windows' | ||
run: > | ||
cmake -S . -B .\build -G Ninja -DKDUTILS_BUILD_TESTS=True -DCMAKE_CXX_CLANG_TIDY="clang-tidy" | ||
-DCMAKE_BUILD_TYPE=Release | ||
- name: Build Project | ||
run: cmake --build ./build | ||
run: cmake --build ./build |