From 2880e819fab17fccfaf8fa4dc2f9976043b72a46 Mon Sep 17 00:00:00 2001 From: Alex Huszagh Date: Sat, 7 Sep 2024 13:28:39 -0500 Subject: [PATCH] Add clang tidy for more systems. --- .github/workflows/lint.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 76f44c8..698a44f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -44,15 +44,24 @@ jobs: scripts/lint.sh lint-cpp: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install dependencies run: | - sudo apt update - sudo apt install clang-tidy -y + python -m pip install --upgrade pip + pip install clang-tidy - name: Analysing the code with clang-tidy shell: bash run: | set -eux pipefail - clang-tidy -checks=-*,clang-analyzer-*,-clang-analyzer-cplusplus* -extra-arg=-std=c++17 example/breeze_theme.hpp -- + + # Windows oddly requires C++20 support due to internal bugs. + extra_arg="-std=c++17" + if [[ "$RUNNER_OS" == "Windows" ]]; then + extra_arg="-std=c++20" + fi + clang-tidy -checks=-*,clang-analyzer-*,-clang-analyzer-cplusplus* -extra-arg="${extra_arg}" example/breeze_theme.hpp --