From cab0e7550316c2650711c766f35ef815b5d68b98 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Fri, 13 Jan 2023 15:56:42 -0700 Subject: [PATCH] Run clang-tidy on Windows in CI Co-authored-by: Bambo-Borris --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2480abf97..f8df38cea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -145,6 +145,7 @@ jobs: fail-fast: false matrix: platform: + - { name: Windows, os: windows-2022, flags: -GNinja } - { name: Linux, os: ubuntu-22.04 } - { name: Linux DRM, os: ubuntu-22.04, flags: -DSFML_USE_DRM=TRUE } - { name: macOS, os: macos-12 } @@ -153,6 +154,10 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 + - name: Install Windows Dependencies + if: runner.os == 'Windows' + run: curl.exe -o run-clang-tidy https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-15.0.7/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py + - name: Install Linux Dependencies if: runner.os == 'Linux' run: sudo apt-get update && sudo apt-get install libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libdrm-dev libgbm-dev @@ -164,7 +169,9 @@ jobs: echo /usr/local/opt/llvm/bin >> $GITHUB_PATH - name: Configure - run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSFML_BUILD_EXAMPLES=TRUE -DSFML_BUILD_TEST_SUITE=TRUE ${{matrix.platform.flags}} + shell: bash + run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSFML_BUILD_EXAMPLES=TRUE -DSFML_BUILD_TEST_SUITE=TRUE ${{matrix.platform.flags}} - name: Analyze Code + shell: bash run: cmake --build $GITHUB_WORKSPACE/build --target tidy