Skip to content

README.md update with results #41

README.md update with results

README.md update with results #41

name: clang-tidy-review
on:
pull_request:
paths:
- '**.h'
- '**.cxx'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
review:
runs-on: ubuntu-24.04
steps:
- name: Checkout PR branch
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install LLVM and Clang
uses: KyleMayes/[email protected]
with:
version: '20.1.4'
- name: Install lit
run: pip install --disable-pip-version-check --no-input lit
- name: Install ROOT
run: |
ROOT_URL="https://root.cern/download/root_v6.34.06.Linux-ubuntu24.04-x86_64-gcc13.3.tar.gz"
wget -O root.tar.gz "$ROOT_URL"
sudo tar -xzf root.tar.gz -C /opt/
echo "/opt/root/bin" >> "$GITHUB_PATH"
- name: Run clang-tidy
uses: ZedThree/[email protected]
id: review
with:
build_dir: build
apt_packages: cmake,libxml2,libxml2-dev,libtinfo-dev,zlib1g-dev,libzstd-dev,libvdt-dev,libtbb-dev
split_workflow: true
config_file: .clang-tidy
cmake_command: >
bash -x -c '
source /opt/root/bin/thisroot.sh &&
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER="$GITHUB_WORKSPACE/llvm/bin/clang"
-DCMAKE_CXX_COMPILER="$GITHUB_WORKSPACE/llvm/bin/clang++"
-DLLVM_DIR="$GITHUB_WORKSPACE/llvm"
-DBUILD_SHARED_LIBS=ON
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DRAMTOOLS_BUILD_TESTS=ON
-DRAMTOOLS_BUILD_TOOLS=ON
-DRAMTOOLS_BUILD_BENCHMARKS=ON &&
cd build &&
cmake --build . --target googletest --parallel $(nproc --all) || true'
- name: Upload artifacts
if: always()
uses: ZedThree/clang-tidy-review/[email protected]