-
Notifications
You must be signed in to change notification settings - Fork 824
38 lines (36 loc) · 1.24 KB
/
github-actions-clang-tidy.yml
File metadata and controls
38 lines (36 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: clang-tidy-review
on:
pull_request:
branches:
- master
jobs:
Clang-Tidy:
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: ClangTidy Gen
uses: The-OpenROAD-Project/clang-tidy-review@master
id: review
with:
build_dir: './build'
cmake_command: cmake . -B build
config_file: '.clang-tidy'
exclude: "*/codeGenerator/templates/*,*/third-party/*"
split_workflow: true
apt_packages: libomp-15-dev,libfl-dev
- uses: The-OpenROAD-Project/clang-tidy-review/upload@master
id: upload-review
- name: Correct Build Directory Ownership
if: always()
run: |
echo "Attempting to change ownership of ${{ github.workspace }} back to runner user..."
sudo /usr/bin/chown -R $(id -u):$(id -g) ${{ github.workspace }}
echo "Ownership change attempt finished."
shell: bash
- if: steps.review.outputs.total_comments > 0
run: |
echo "Pending review comments. Please resolve all comments before merging."
exit 1