-
Notifications
You must be signed in to change notification settings - Fork 158
36 lines (34 loc) · 1.18 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
35
36
name: Static Checks
on: [push, pull_request]
jobs:
static-check-clang-format:
runs-on: "ubuntu-20.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: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main"
sudo apt-get update
sudo apt-get install clang-format-13
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-13 100
- name: check clang_format
run: bash ./.scripts/clang_format.sh