-
Notifications
You must be signed in to change notification settings - Fork 159
34 lines (32 loc) · 1 KB
/
static_checks.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
name: Static Checks
on: [push, pull_request]
jobs:
static-check-clang-format:
runs-on: "ubuntu-24.04"
name: Static checks (clang-format)
steps:
- name: checkout-gdsdecomp
uses: actions/checkout@v3
with:
# get all history
fetch-depth: 0
# If we're on another branch, make sure we have master
- run: |
git fetch --prune
echo $(git branch --all)
CURR_BRANCH=$(git branch --show-current)
if [ "$CURR_BRANCH" = "" ]; then
CURR_BRANCH=$(git rev-parse HEAD)
fi
if [ "$CURR_BRANCH" != "master" ]; then
git checkout --track origin/master
git checkout $CURR_BRANCH
fi
echo $(git branch --all)
- name: Install Linux deps
run: |
sudo apt-get update
sudo apt-get install clang-format-18
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-18 100
- name: check clang_format
run: bash ./.scripts/clang_format.sh