-
Notifications
You must be signed in to change notification settings - Fork 98
53 lines (47 loc) · 1.89 KB
/
Copy pathclang-tidy.yml
File metadata and controls
53 lines (47 loc) · 1.89 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: clang-tidy
on:
pull_request:
branches:
- main
paths:
- 'packages/react-native-executorch/cpp/**'
- 'packages/react-native-executorch/.clang-tidy'
- 'packages/react-native-executorch/compile_flags.txt'
- 'packages/react-native-executorch/scripts/clang-tidy.sh'
- '.github/workflows/clang-tidy.yml'
workflow_dispatch:
jobs:
clang-tidy:
runs-on: ubuntu-latest
# Dormant until the on-demand header artifact is published (#1283): clang-tidy
# must parse the sources, which needs the ExecuTorch/torch headers that are not
# committed. Enable by setting the repo variable ENABLE_CLANG_TIDY=true once a
# release carrying headers.tar.gz exists for the package version.
if: ${{ vars.ENABLE_CLANG_TIDY == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
# The phonemis submodule carries headers that cpp/extensions/speech
# includes; without it those sources fail to parse and clang-tidy
# reports misleading findings on the broken AST.
submodules: true
- name: Setup
uses: ./.github/actions/setup
- name: Install clang-tidy
run: |
sudo apt-get update
sudo apt-get install -y clang-tidy
clang-tidy --version
- name: Provision ExecuTorch headers
# Reuse the on-demand download flow (#1283). clang-tidy only needs headers
# (it syntax-checks, no linking), so RNET_HEADERS_ONLY fetches just
# headers.tar.gz; RNET_TARGET avoids host platform auto-detection.
working-directory: packages/react-native-executorch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RNET_HEADERS_ONLY: '1'
RNET_TARGET: android-arm64-v8a
run: node scripts/download-libs.js
- name: Run clang-tidy
run: yarn workspace react-native-executorch lint:cpp