-
Notifications
You must be signed in to change notification settings - Fork 72
55 lines (45 loc) · 1.55 KB
/
sanity_check.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
50
51
52
53
54
55
name: Check buck targets and code format
on: [push, workflow_call, workflow_dispatch, pull_request_target]
permissions:
contents: read
jobs:
check:
name: Check TARGETS file and code format
runs-on: ubuntu-20.04
#runs-on: [self-hosted, ubuntu, asrunner]
#container:
# image: ubuntu:focal
steps:
- name: pre
run: sudo apt update && sudo apt install -y git make clang build-essential clang-format wget
- name: Checkout feature branch
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Fetch from upstream
run: |
git remote add upstream https://github.com/speedb-io/speedb.git && git fetch upstream
git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Where am I
run: |
echo git status && git status
echo "git remote -v" && git remote -v
echo git branch && git branch
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: 'x64'
- name: Install Dependencies
run: sudo python -m pip install --upgrade pip
- name: Install argparse
run: sudo pip install argparse
- name: Download clang-format-diff.py
run: |
wget https://raw.githubusercontent.com/llvm/llvm-project/release/12.x/clang/tools/clang-format/clang-format-diff.py
- name: Check format
run: VERBOSE_CHECK=1 make check-format
- name: Compare buckify output
run: make check-buck-targets
- name: Simple source code checks
run: make check-sources