CI jobs #22
Workflow file for this run
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
name: clang-tidy | |
on: | |
pull_request: | |
types: [ opened, synchronize, reopened, closed ] | |
jobs: | |
tidy: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
persist-credentials: false | |
- name: Install Packages | |
run: | | |
echo ${{ github.server_url }} | |
sudo apt-get -y update | |
sudo apt-get -y install ninja-build \ | |
libwayland-dev wayland-protocols libxkbcommon-dev libglib2.0-dev \ | |
mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev mesa-utils | |
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb | |
sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb | |
rm libtinfo5_6.3-2ubuntu0.1_amd64.deb | |
mkdir clang18 && cd clang18 | |
curl -L -O https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz | |
tar -xJf clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz --strip-components=1 | |
bin/clang-tidy --version | |
cmake --version | |
gcc --version | |
- name: Configure CMake | |
run: | | |
cmake -G Ninja -B ${{github.workspace}}/build \ | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ | |
-DENABLE_AGL_SHELL_CLIENT=ON \ | |
-D CMAKE_EXPORT_COMPILE_COMMANDS=ON | |
- name: Build | |
run: ninja -C ${{github.workspace}}/build | |
- name: clang-tidy | |
working-directory: ${{github.workspace}} | |
run: | | |
clang-tidy --dump-config | |
export FILE_LIST=$(find . -type d \( -name clang18 -o -name build \) -prune -false -o -name '*.cc' -o -name '*.hpp' -o -name '*.h') | |
echo $FILE_LIST | |
clang18/bin/run-clang-tidy \ | |
-p ${{github.workspace}}/build \ | |
-warnings-as-errors='*,-bugprone-macro-parentheses' \ | |
-quiet \ | |
-export-fixes=tidy-results-suggested-fixes.txt \ | |
$FILE_LIST 2> tidy-results-log.txt | |
- name: Show results | |
if: always() | |
run: | | |
cat tidy-results-log.txt | |
cat tidy-results-suggested-fixes.txt | |
- name: Publish Report | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: clang-tidy-results | |
path: tidy-results-* |