do not hard-code job number for MinGW/Cygwin builds in CI (#7239) #14731
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
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners | |
name: clang-tidy | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'releases/**' | |
- '2.*' | |
tags: | |
- '2.*' | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
env: | |
QT_VERSION: 6.8.1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install missing software | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y cmake make | |
sudo apt-get install -y libpcre3-dev | |
sudo apt-get install -y libgl-dev # fixes missing dependency for Qt in CMake | |
- name: Install clang | |
run: | | |
sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14 | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 19 | |
sudo apt-get install -y clang-tidy-19 | |
- name: Install Qt ${{ env.QT_VERSION }} | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: ${{ env.QT_VERSION }} | |
modules: 'qtcharts' | |
install-deps: false | |
cache: true | |
- name: Verify clang-tidy configuration | |
run: | | |
clang-tidy-19 --verify-config | |
- name: Prepare CMake | |
run: | | |
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off -DWARNINGS_ARE_ERRORS=On | |
env: | |
CC: clang-19 | |
CXX: clang++-19 | |
- name: Prepare CMake dependencies | |
run: | | |
# make sure the auto-generated GUI sources exist | |
make -C cmake.output autogen | |
# make sure the precompiled headers exist | |
make -C cmake.output/cli cmake_pch.hxx.pch | |
make -C cmake.output/gui cmake_pch.hxx.pch | |
make -C cmake.output/lib cmake_pch.hxx.pch | |
make -C cmake.output/test cmake_pch.hxx.pch | |
- name: Clang-Tidy | |
run: | | |
cmake --build cmake.output --target run-clang-tidy 2> /dev/null |