Skip to content

Commit

Permalink
Merge pull request #592 from coldav/colin/add_clang_tidy_19
Browse files Browse the repository at this point in the history
Install clang-tidy-19 rather than use pip install
  • Loading branch information
coldav authored Nov 19, 2024
2 parents a18e62d + e9ad791 commit 87354cb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
17 changes: 15 additions & 2 deletions .github/actions/setup_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ inputs:
description: 'Cross compilation architecture from: x86, arm, aarch64, riscv64. Default: "" (no cross compile)'
default: ""
# Note: runner architectures from: x86_64 (aka runner.arch: X64), aarch64 (aka runner.arch: ARM64)

clang_tidy:
description: 'Enable installing of clang-tidy (currently 19)'
type: boolean
default: false

runs:
# We don't want a new docker just a list of steps, so mark as composite
using: "composite"
Expand All @@ -38,8 +42,17 @@ runs:
if [ "${{ inputs.ubuntu_version }}" = "20.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.243-focal.list https://packages.lunarg.com/vulkan/1.3.243/lunarg-vulkan-1.3.243-focal.list; fi
if [ "${{ inputs.ubuntu_version }}" = "22.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.243-jammy.list https://packages.lunarg.com/vulkan/1.3.243/lunarg-vulkan-1.3.243-jammy.list; fi
if [ "${{ inputs.ubuntu_version }}" = "24.04" ]; then sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list https://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list; fi
if [ "${{ inputs.clang_tidy}}" = "true"]; then
wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor - | sudo tee /usr/share/keyrings/llvm-archive-keyring.gpg >/dev/null
if [ "${{ inputs.ubuntu_version }}" = "20.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/focal/ llvm-toolchain-focal-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
if [ "${{ inputs.ubuntu_version }}" = "22.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
if [ "${{ inputs.ubuntu_version }}" = "24.04" ]; then echo 'deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main' | sudo tee /etc/apt/sources.list.d/llvm.list >/dev/null; fi
fi
sudo apt-get update
pip install lit clang-format==19.1.0 clang-tidy==19.1.0 virtualenv
if [ "${{ inputs.clang_tidy}}" = "true"]; then sudo apt-get install --yes clang-tidy-19; fi
pip install lit clang-format==19.1.0 virtualenv
sudo apt-get install --yes doxygen
sudo apt-get install --yes vulkan-sdk
if [ "${{ inputs.cross_arch }}" = "x86" ]; then \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run_pr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ jobs:
with:
llvm_version: 19
llvm_build_type: RelAssert
clang_tidy: true

- name: build initial config files
uses: ./.github/actions/do_build_ock
Expand Down Expand Up @@ -162,7 +163,7 @@ jobs:
HEAD..origin/${{ github.base_ref }} | \
grep -P '\.(c|cc|cxx|cpp|h|hh|hpp|hxx)$'` | \
tee /dev/stderr | \
parallel --verbose -- clang-tidy --quiet -p "$PWD/build/" "{}"
parallel --verbose -- clang-tidy-19 --quiet -p "$PWD/build/" "{}"
# run clang-format-diff on the repo
run_clang_format:
Expand Down

0 comments on commit 87354cb

Please sign in to comment.