Skip to content

Commit 599d838

Browse files
committed
[CI] Add YAML lint check
1 parent 8f268f7 commit 599d838

File tree

6 files changed

+206
-170
lines changed

6 files changed

+206
-170
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,29 @@ jobs:
1818
language:
1919
- cpp
2020
steps:
21-
- name: Checkout repository
22-
uses: actions/checkout@v4
23-
with:
24-
submodules: recursive
25-
- name: Initialize CodeQL
26-
uses: github/codeql-action/init@v3
27-
with:
28-
languages: ${{ matrix.language }}
29-
- name: Install dependencies
30-
run: |
31-
sudo apt-get install -y cmake ninja-build ccache
32-
- name: ccache
33-
uses: hendrikmuhs/[email protected]
34-
with:
35-
key: ${{ github.job }}
36-
create-symlink: true
37-
- name: Configure
38-
run: >
39-
cmake -S . -B build
40-
-GNinja
41-
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
42-
- name: Build
43-
run: |
44-
cmake --build build --parallel
45-
- name: Perform CodeQL Analysis
46-
uses: github/codeql-action/analyze@v3
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
submodules: recursive
25+
- name: Initialize CodeQL
26+
uses: github/codeql-action/init@v3
27+
with:
28+
languages: ${{ matrix.language }}
29+
- name: Install dependencies
30+
run: |
31+
sudo apt-get install -y cmake ninja-build ccache
32+
- name: ccache
33+
uses: hendrikmuhs/[email protected]
34+
with:
35+
key: ${{ github.job }}
36+
create-symlink: true
37+
- name: Configure
38+
run: >
39+
cmake -S . -B build
40+
-GNinja
41+
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
42+
- name: Build
43+
run: |
44+
cmake --build build --parallel
45+
- name: Perform CodeQL Analysis
46+
uses: github/codeql-action/analyze@v3

.github/workflows/main.yml

Lines changed: 116 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -10,142 +10,142 @@ jobs:
1010
ubuntu-gcc-build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
14-
with:
15-
submodules: recursive
16-
- name: Install dependencies
17-
run: |
18-
sudo apt-get install -y cmake ninja-build ccache
19-
- name: ccache
20-
uses: hendrikmuhs/[email protected]
21-
with:
13+
- uses: actions/checkout@v4
14+
with:
15+
submodules: recursive
16+
- name: Install dependencies
17+
run: |
18+
sudo apt-get install -y cmake ninja-build ccache
19+
- name: ccache
20+
uses: hendrikmuhs/[email protected]
21+
with:
2222
key: ${{ github.job }}
2323
create-symlink: true
24-
- name: Configure
25-
run: >
26-
cmake -S . -B build
27-
-GNinja
28-
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
29-
- name: Build
30-
run: |
31-
cmake --build build --parallel
24+
- name: Configure
25+
run: >
26+
cmake -S . -B build
27+
-GNinja
28+
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
29+
- name: Build
30+
run: |
31+
cmake --build build --parallel
3232
ubuntu-clang-build:
3333
runs-on: ubuntu-latest
3434
steps:
35-
- uses: actions/checkout@v4
36-
with:
37-
submodules: recursive
38-
- name: Install dependencies
39-
run: |
40-
sudo apt-get install -y cmake ninja-build ccache
41-
- name: ccache
42-
uses: hendrikmuhs/[email protected]
43-
with:
35+
- uses: actions/checkout@v4
36+
with:
37+
submodules: recursive
38+
- name: Install dependencies
39+
run: |
40+
sudo apt-get install -y cmake ninja-build ccache
41+
- name: ccache
42+
uses: hendrikmuhs/[email protected]
43+
with:
4444
key: ${{ github.job }}
4545
create-symlink: true
46-
- name: Configure
47-
run: >
48-
cmake -S . -B build
49-
-GNinja
50-
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
51-
- name: Build
52-
run: |
53-
cmake --build build --parallel
46+
- name: Configure
47+
run: >
48+
cmake -S . -B build
49+
-GNinja
50+
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
51+
- name: Build
52+
run: |
53+
cmake --build build --parallel
5454
windows-msvc-build:
5555
runs-on: windows-latest
5656
defaults:
5757
run:
5858
shell: bash
5959
steps:
60-
- uses: actions/checkout@v4
61-
with:
62-
submodules: recursive
63-
- name: Setup ccache
64-
uses: Chocobo1/setup-ccache-action@v1
65-
with:
66-
windows_compile_environment: msvc
67-
- name: CMake configure
68-
shell: bash
69-
run: >
70-
cmake -S . -B build
71-
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
72-
- name: Build
73-
shell: bash
74-
run: |
75-
cmake --build build --config Release --parallel
60+
- uses: actions/checkout@v4
61+
with:
62+
submodules: recursive
63+
- name: Setup ccache
64+
uses: Chocobo1/setup-ccache-action@v1
65+
with:
66+
windows_compile_environment: msvc
67+
- name: CMake configure
68+
shell: bash
69+
run: >
70+
cmake -S . -B build
71+
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
72+
- name: Build
73+
shell: bash
74+
run: |
75+
cmake --build build --config Release --parallel
7676
macos-clang-build:
7777
runs-on: macOS-latest
7878
steps:
79-
- uses: actions/checkout@v4
80-
with:
81-
submodules: recursive
82-
- name: Install dependencies
83-
run: |
84-
brew install ninja
85-
- name: ccache
86-
uses: hendrikmuhs/[email protected]
87-
with:
79+
- uses: actions/checkout@v4
80+
with:
81+
submodules: recursive
82+
- name: Install dependencies
83+
run: |
84+
brew install ninja
85+
- name: ccache
86+
uses: hendrikmuhs/[email protected]
87+
with:
8888
key: ${{ github.job }}
8989
create-symlink: true
90-
- name: Configure
91-
run: >
92-
cmake -S . -B build
93-
-GNinja
94-
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
95-
- name: Build
96-
run: |
97-
cmake --build build --parallel
90+
- name: Configure
91+
run: >
92+
cmake -S . -B build
93+
-GNinja
94+
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
95+
- name: Build
96+
run: |
97+
cmake --build build --parallel
9898
ubuntu-gcc-build-codecov:
9999
runs-on: ubuntu-latest
100100
steps:
101-
- uses: actions/checkout@v4
102-
with:
103-
submodules: true
104-
- name: Install dependencies
105-
run: |
106-
sudo apt-get install -y cmake ninja-build ccache gcovr lcov
107-
- uses: actions/checkout@v4
108-
with:
109-
submodules: true
110-
- name: ccache
111-
uses: hendrikmuhs/[email protected]
112-
with:
101+
- uses: actions/checkout@v4
102+
with:
103+
submodules: true
104+
- name: Install dependencies
105+
run: |
106+
sudo apt-get install -y cmake ninja-build ccache gcovr lcov
107+
- uses: actions/checkout@v4
108+
with:
109+
submodules: true
110+
- name: ccache
111+
uses: hendrikmuhs/[email protected]
112+
with:
113113
key: ${{ github.job }}
114114
create-symlink: true
115-
- name: Configure
116-
run: >
117-
cmake -S . -B build
118-
-GNinja
119-
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
120-
-DCMAKE_C_FLAGS="--coverage"
121-
-DCMAKE_CXX_FLAGS="--coverage"
122-
- name: Build
123-
run: |
124-
cmake --build build --parallel
125-
- name: Test
126-
run: |
127-
build/bin/run_tests
128-
env:
129-
CTEST_OUTPUT_ON_FAILURE: 1
130-
- name: Generate lcov Coverage Data
131-
run: |
132-
cd build
133-
lcov --capture --directory . --output-file ../coverage.info
134-
lcov --remove ../coverage.info '*/3rdparty/*' '/usr/*' '*/test/*' --output-file ../coverage.info
135-
cd ..
136-
genhtml coverage.info --output-directory cov-report
137-
continue-on-error: true
138-
- name: Upload coverage report artifact
139-
uses: actions/upload-artifact@v4
140-
with:
141-
name: cov-report
142-
path: 'cov-report'
143-
- name: Generate gcovr Coverage Data
144-
run: |
145-
cd build
146-
gcovr -r ../include ../src --xml --output ../coverage.xml
147-
- name: Upload coverage reports to Codecov
148-
uses: codecov/[email protected]
149-
with:
150-
token: ${{ secrets.CODECOV_TOKEN }}
151-
files: coverage.xml
115+
- name: Configure
116+
run: >
117+
cmake -S . -B build
118+
-GNinja
119+
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
120+
-DCMAKE_C_FLAGS="--coverage"
121+
-DCMAKE_CXX_FLAGS="--coverage"
122+
- name: Build
123+
run: |
124+
cmake --build build --parallel
125+
- name: Test
126+
run: |
127+
build/bin/run_tests
128+
env:
129+
CTEST_OUTPUT_ON_FAILURE: 1
130+
- name: Generate lcov Coverage Data
131+
run: |
132+
cd build
133+
lcov --capture --directory . --output-file ../coverage.info
134+
lcov --remove ../coverage.info '*/3rdparty/*' '/usr/*' '*/test/*' --output-file ../coverage.info
135+
cd ..
136+
genhtml coverage.info --output-directory cov-report
137+
continue-on-error: true
138+
- name: Upload coverage report artifact
139+
uses: actions/upload-artifact@v4
140+
with:
141+
name: cov-report
142+
path: 'cov-report'
143+
- name: Generate gcovr Coverage Data
144+
run: |
145+
cd build
146+
gcovr -r ../include ../src --xml --output ../coverage.xml
147+
- name: Upload coverage reports to Codecov
148+
uses: codecov/[email protected]
149+
with:
150+
token: ${{ secrets.CODECOV_TOKEN }}
151+
files: coverage.xml

.github/workflows/static-analysis-pr.yml

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,33 @@ jobs:
66
clang-tidy:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
10-
with:
11-
submodules: recursive
12-
- name: ccache
13-
uses: hendrikmuhs/[email protected]
14-
with:
9+
- uses: actions/checkout@v4
10+
with:
11+
submodules: recursive
12+
- name: ccache
13+
uses: hendrikmuhs/[email protected]
14+
with:
1515
key: ${{ github.job }}
16-
- uses: ZedThree/[email protected]
17-
id: review
18-
name: Run clang-tidy
19-
with:
20-
build_dir: build
21-
apt_packages: ninja-build
22-
cmake_command: cmake -S . -B build -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
23-
config_file: .clang-tidy
24-
exclude: 3rdparty
25-
split_workflow: true
26-
lgtm_comment_body: ""
27-
env:
28-
CC: clang-16
29-
CXX: clang++-16
30-
- if: steps.review.outputs.total_comments > 0
31-
run: |
32-
echo "clang-tidy run has failed. See 'Run clang-tidy' stage logs"
33-
exit 1
16+
- uses: ZedThree/[email protected]
17+
id: review
18+
name: Run clang-tidy
19+
with:
20+
build_dir: build
21+
apt_packages: ninja-build
22+
cmake_command: >
23+
cmake -S . -B build
24+
-DCMAKE_C_COMPILER_LAUNCHER=ccache
25+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
26+
-DCMAKE_BUILD_TYPE=Release
27+
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
28+
config_file: .clang-tidy
29+
exclude: 3rdparty
30+
split_workflow: true
31+
lgtm_comment_body: ""
32+
env:
33+
CC: clang-16
34+
CXX: clang++-16
35+
- if: steps.review.outputs.total_comments > 0
36+
run: |
37+
echo "clang-tidy run has failed. See 'Run clang-tidy' stage logs"
38+
exit 1

.github/workflows/static-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ jobs:
66
clang-format:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: DoozyX/[email protected]
11-
with:
12-
source: '.'
9+
- uses: actions/checkout@v4
10+
- uses: DoozyX/[email protected]
11+
with:
12+
source: '.'
1313
python-lint:
1414
runs-on: ubuntu-latest
1515
steps:

0 commit comments

Comments
 (0)