-
Notifications
You must be signed in to change notification settings - Fork 65
74 lines (62 loc) · 1.66 KB
/
code_style.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Code Layout
on:
push:
paths:
- 'app/**'
- 'core/**'
- 'gallery/**'
- 'scripts/**'
- 'test/**'
- 'cmake/**'
- 'cmake_templates/**'
- 'CMakeLists.txt'
- '.github/workflows/code_style.yml'
release:
types:
- published
env:
QT_VERSION: '6.5.2'
CACHE_VERSION: 0
jobs:
code_style_cpp:
name: C++ code convention check
if: ( github.repository == 'MerginMaps/input' ) && (!contains(github.event.head_commit.message, 'Translate '))
runs-on: macos-latest
steps:
- name: Install astyle
run: |
brew install astyle
- name: Checkout input
uses: actions/checkout@v3
with:
path: input
- name: Run astyle check
run: |
./input/scripts/format_cpp.bash
code_style_cmake:
name: CMake code convention check
if: ( github.repository == 'MerginMaps/input' ) && (!contains(github.event.head_commit.message, 'Translate '))
runs-on: ubuntu-latest
steps:
- name: Install cmake-format
run: |
sudo pip3 install cmakelang
- name: Checkout input
uses: actions/checkout@v3
with:
path: input
- name: Run cmake-format check
run: |
./input/scripts/format_cmake.bash
cppcheck:
name: Cppcheck
if: ( github.repository == 'MerginMaps/input' ) && (!contains(github.event.head_commit.message, 'Translate '))
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Requirements
run: |
brew install cppcheck
- name: Run cppcheck test
run: ./scripts/cppcheck.bash