-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.52 KB
/
lint-cpp-objc.yaml
File metadata and controls
61 lines (53 loc) · 1.52 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
54
55
56
57
58
59
60
61
name: Lint cpp and objc
on:
pull_request:
branches: [main]
paths:
- ".github/workflows/lint-cpp-objc.yaml"
- "apple/**"
- "cpp/**"
- "encoding-core/**"
- "native-tests/**"
- "scripts/lint-cpp.sh"
- "scripts/lint-objc.sh"
- ".clang-format"
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
lint-cpp-objc:
name: Lint cpp and objc
runs-on: ubuntu-24.04
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 20
- name: Install dependencies
run: yarn install --immutable
shell: bash
# https://dev.to/mayankpareek/introducing-ci-pipeline-for-clang-format-checks-in-faker-cxx-35go
# - name: Cache clang-format dependencies
# uses: actions/cache@v4
# with:
# path: /tmp/apt-cache
# key: clang-format-${{ runner.os }}-${{ hashFiles('**/apt-packages.txt') }}
# restore-keys: |
# clang-format-${{ runner.os }}-
# - name: Install clang-format
# run: |
# if [ ! -f /tmp/apt-cache/clang-format-16 ]; then
# sudo apt-get update
# sudo apt-get install -y clang-format-16
# touch /tmp/apt-cache/clang-format-16
# fi
- name: Run clang-format
run: |
yarn lint:cpp
yarn lint:objc