-
Notifications
You must be signed in to change notification settings - Fork 303
49 lines (46 loc) · 1.43 KB
/
lint.yml
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
name: Lint
on:
pull_request:
push:
branches:
- main
concurrency:
# Cancel existing builds for the same PR.
# Otherwise, all other builds will be allowed to run through.
group: lint.yml-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Setup Linux
run: |
export DEBIAN_FRONTEND=noninteractive
wget https://apt.llvm.org/llvm.sh
sed -i '/apt-get install/d' llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
sudo apt-get install -y --no-install-recommends clang-format-18
# buildifier won't install properly if specifying a particular version
go install github.com/bazelbuild/buildtools/buildifier@latest
echo "BUILDIFIER=$HOME/go/bin/buildifier" >> $GITHUB_ENV
- name: Install pnpm
uses: pnpm/action-setup@v4
# The pnpm version will be determined by the `packageManager` field in `.npmrc`
- name: Install project deps with pnpm
run: |
pnpm i
- name: Install Ruff
run: |
pip install ruff
- name: Lint
run: |
python3 ./tools/cross/format.py --check
env:
CLANG_FORMAT: clang-format-18