-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (131 loc) · 3.78 KB
/
test_format.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
name: Check code style
on:
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
cpp: ${{ steps.filter.outputs.cpp }}
python: ${{ steps.filter.outputs.python }}
md: ${{ steps.filter.outputs.md }}
yaml: ${{ steps.filter.outputs.yaml }}
toml: ${{ steps.filter.outputs.toml }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: .version-python
- name: Detect changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
build_files: &build_files
- '.github/workflows/test_format.yml'
- 'build'
- 'build.bat'
- 'build_system/main.py'
- 'build_system/core/**'
- 'build_system/util/**'
- 'build_system/targets/*.py'
- 'build_system/targets/code_style/*'
cpp:
- *build_files
- 'build_system/targets/code_style/cpp/*'
- '.cpplint.cfg'
- '**/*.hpp'
- '**/*.cpp'
python:
- *build_files
- 'build_system/targets/code_style/python/*'
- '**/*.py'
md:
- *build_files
- 'build_system/targets/code_style/markdown/*'
- '**/*.md'
yaml:
- *build_files
- 'build_system/targets/code_style/yaml/*'
- '**/*.y*ml'
toml:
- *build_files
- 'build_system/targets/code_style/toml/*'
- '**/*.toml'
test_format_cpp:
needs: changes
if: ${{ needs.changes.outputs.cpp == 'true' }}
name: Check C++ source files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: .version-python
- name: Check C++ source files
run: ./build test_format_cpp
test_format_python:
needs: changes
if: ${{ needs.changes.outputs.python == 'true' }}
name: Check Python source files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: .version-python
- name: Check Python source files
run: ./build test_format_python
test_format_md:
needs: changes
if: ${{ needs.changes.outputs.md == 'true' }}
name: Check Markdown files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: .version-python
- name: Check Markdown files
run: ./build test_format_md
test_format_yaml:
needs: changes
if: ${{ needs.changes.outputs.yaml == 'true' }}
name: Check YAML files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: .version-python
- name: Check YAML files
run: ./build test_format_yaml
test_format_toml:
needs: changes
if: ${{ needs.changes.outputs.toml == 'true' }}
name: Check TOML files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: .version-python
- name: Check TOML files
run: ./build test_format_toml