Skip to content

Commit 4480598

Browse files
author
Colin Davidson
committed
Add full clang-tidy job
Added as as internal test to do a full clang-tidy run. It is not run as a PR as it takes too long (about 2 hours).
1 parent 89a5ac8 commit 4480598

3 files changed

Lines changed: 52 additions & 1 deletion

File tree

.github/actions/do_build_ock/action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ inputs:
110110
source_dir:
111111
description: 'cmake source directory'
112112
default: '.'
113-
113+
cmake_c_compiler:
114+
description: 'cmake compiler to use e.g. clang, gcc'
115+
default: 'gcc'
116+
cmake_cxx_compiler:
117+
description: 'cmake compiler to use e.g. clang++, g++'
118+
default: 'g++'
114119
runs:
115120
# We don't want a new docker just a list of steps, so mark as composite
116121
using: "composite"
@@ -133,6 +138,8 @@ runs:
133138
run:
134139
cmake -GNinja
135140
-B${{ inputs.build_dir }}
141+
-DCMAKE_C_COMPILER=${{ inputs.cmake_c_compiler }}
142+
-DCMAKE_CXX_COMPILER=${{ inputs.cmake_cxx_compiler }}
136143
-DCMAKE_C_COMPILER_LAUNCHER=ccache
137144
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
138145
-DCA_MUX_TARGETS_TO_ENABLE=${{ inputs.mux_targets_enable }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: build_pr_ubuntu_clang_tidy_x86_64
2+
description: Build pr ubuntu clang tidy x86_64
3+
4+
inputs:
5+
cache_seed:
6+
type: boolean
7+
default: false
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
- name: build host x86_64 online release
13+
uses: ./.github/actions/do_build_ock
14+
with:
15+
build_type: ReleaseAssert
16+
build_targets: check-ock-tidy
17+
cmake_c_compiler: ${{ github.workspace }}/llvm_install/bin/clang
18+
cmake_cxx_compiler: ${{ github.workspace }}/llvm_install/bin/clang++

.github/workflows/run_ock_internal_tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,3 +445,29 @@ jobs:
445445
with:
446446
setup_new_target_params: ''
447447
tutorial_point: start
448+
449+
run-ubuntu-clang-tidy-x86_64:
450+
if: ${{ !inputs.is_pull_request && contains(inputs.target_list, 'host_x86_64_linux') }}
451+
runs-on: ubuntu-22.04
452+
container:
453+
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
454+
volumes:
455+
- ${{github.workspace}}:${{github.workspace}}
456+
steps:
457+
- name: Checkout repo
458+
uses: actions/checkout@v4
459+
460+
# Install requirements
461+
- name: Install clang-tidy and parallel
462+
run: |
463+
sudo apt-get update
464+
sudo apt-get install --yes clang-tidy-19 parallel
465+
466+
- name: setup-ubuntu
467+
uses: ./.github/actions/setup_build
468+
with:
469+
llvm_version: ${{ inputs.llvm_previous }}
470+
llvm_source: ${{ inputs.llvm_source}}
471+
github_token: ${{ secrets.GITHUB_TOKEN }}
472+
- name: build ock / clang-tidy
473+
uses: ./.github/actions/do_build_pr/run_ubuntu_clang_tidy_x86_64

0 commit comments

Comments
 (0)