-
Notifications
You must be signed in to change notification settings - Fork 77
60 lines (54 loc) · 2.02 KB
/
static-analysis.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
56
57
58
59
60
# Copyright (C) 2005 - 2021 Settlers Freaks <sf-team at siedler25.org>
#
# SPDX-License-Identifier: GPL-2.0-or-later
name: Static analysis
on:
push:
pull_request:
concurrency:
group: ${{format('staticAna-{0}:{1}', github.repository, github.ref)}}
cancel-in-progress: true
env:
CC: clang-10
CXX: clang++-10
ADDITIONAL_CMAKE_FLAGS: ""
jobs:
StyleAndFormatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: git submodule update --init
- name: Validation
run: tools/ci/staticValidation.sh "$GITHUB_WORKSPACE"
- name: Formatting
uses: DoozyX/[email protected]
with:
source: "extras libs tests external/libendian external/liblobby external/libsiedler2 external/libutil external/mygettext external/s25edit external/s25update"
clangFormatVersion: 10
- name: Check include guards
run: |
find . \( -path ./build -o -path ./external/glad -o -path ./external/dev-tools -o \
-path ./external/turtle -o -path ./external/kaguya \) \
-prune -false -o \( -name '*.hpp' -or -name '*.h' \) \
-print0 | xargs -0 -n1 tools/ci/checkIncludeGuards.sh
- name: Lint markdown files
uses: avto-dev/[email protected]
with:
ignore: external data/RTTR/MAPS .
- name: Check licensing
run:
pip install --user reuse
reuse lint
Clang-Tidy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: git submodule update --init
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
clang-10 clang-tidy-10 \
libsdl2-dev libsdl2-mixer-dev libcurl4-openssl-dev libbz2-dev libminiupnpc-dev liblua5.2-dev gettext \
libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libboost-test-dev libboost-locale-dev libboost-iostreams-dev
- name: Run Clang-Tidy
run: tools/ci/runClangTidy.sh