Skip to content

Commit 640ee6d

Browse files
authored
Add YAML linter (#240)
1 parent 724ac33 commit 640ee6d

File tree

7 files changed

+87
-81
lines changed

7 files changed

+87
-81
lines changed

.github/.licenserc.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,25 @@ header:
3232
limitations under the License\.
3333
3434
paths:
35-
- '**'
35+
- '**'
3636

3737
paths-ignore: # `paths-ignore` are the path list that will be ignored by license-eye.
38-
- '.clang-format'
39-
- '.clang-tidy'
40-
- '.gitignore'
41-
- '.github/scripts/setup_apt_repo_linux.sh'
42-
- 'HISTORY.md'
43-
- 'NEWS.md'
44-
- 'LICENSE'
45-
- 'THIRD-PARTY-PROGRAMS'
46-
- '.github/renovate.json'
47-
- '.github/CODEOWNERS'
48-
- 'cmake/mkl_functions'
49-
- 'cmake/mkl_functions_ivf'
50-
- 'cmake/patches/tomlplusplus_v330.patch'
51-
- 'docker/x86_64/manylinux2014/oneAPI.repo'
52-
- 'docs/cpp/index/loader-compatibility.csv'
53-
- 'docs/requirements.txt'
38+
- .clang-format
39+
- .clang-tidy
40+
- .gitignore
41+
- .github/scripts/setup_apt_repo_linux.sh
42+
- HISTORY.md
43+
- NEWS.md
44+
- LICENSE
45+
- THIRD-PARTY-PROGRAMS
46+
- .github/renovate.json
47+
- .github/CODEOWNERS
48+
- cmake/mkl_functions
49+
- cmake/mkl_functions_ivf
50+
- cmake/patches/tomlplusplus_v330.patch
51+
- docker/x86_64/manylinux2014/oneAPI.repo
52+
- docs/cpp/index/loader-compatibility.csv
53+
- docs/requirements.txt
5454

5555
comment: never
5656

.github/workflows/build-linux-arm.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ name: Linux Build and Test on ARM
1717
on:
1818
push:
1919
branches:
20-
- main
20+
- main
2121
pull_request:
2222

2323
permissions:
2424
contents: read
2525

2626
# This allows a subsequently queued workflow run to interrupt previous runs
2727
concurrency:
28-
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
28+
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
2929
cancel-in-progress: true
3030

3131
jobs:
@@ -37,12 +37,12 @@ jobs:
3737
build_type: [RelWithDebugInfo]
3838
cxx: [g++-11, g++-12, clang++-15]
3939
include:
40-
- cxx: g++-11
41-
cc: gcc-11
42-
- cxx: g++-12
43-
cc: gcc-12
44-
- cxx: clang++-15
45-
cc: clang-15
40+
- cxx: g++-11
41+
cc: gcc-11
42+
- cxx: g++-12
43+
cc: gcc-12
44+
- cxx: clang++-15
45+
cc: clang-15
4646

4747
steps:
4848
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -67,6 +67,6 @@ jobs:
6767

6868
- name: Run tests
6969
env:
70-
CTEST_OUTPUT_ON_FAILURE: 1
70+
CTEST_OUTPUT_ON_FAILURE: 1
7171
working-directory: ${{ runner.temp }}/build/tests
7272
run: ctest -C ${{ matrix.build_type }}

.github/workflows/build-linux.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ name: Linux Build and Test
1717
on:
1818
push:
1919
branches:
20-
- main
20+
- main
2121
pull_request:
2222

2323
permissions:
2424
contents: read
2525

2626
# This allows a subsequently queued workflow run to interrupt previous runs
2727
concurrency:
28-
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
28+
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
2929
cancel-in-progress: true
3030

3131
jobs:
@@ -38,45 +38,45 @@ jobs:
3838
ivf: [OFF, ON]
3939
cxx: [g++-11, g++-12, clang++-15]
4040
asan: [OFF]
41-
cmake_extra_args: ["-DSVS_BUILD_BINARIES=YES -DSVS_BUILD_EXAMPLES=YES"]
42-
ctest_args: [""]
41+
cmake_extra_args: [-DSVS_BUILD_BINARIES=YES -DSVS_BUILD_EXAMPLES=YES]
42+
ctest_args: ['']
4343
include:
44-
- cxx: g++-11
45-
cc: gcc-11
46-
- cxx: g++-12
47-
cc: gcc-12
48-
- cxx: clang++-15
49-
cc: clang-15
50-
- cxx: clang++-18
51-
cc: clang-18
52-
build_type: Debug
53-
ivf: OFF
54-
asan: ON
44+
- cxx: g++-11
45+
cc: gcc-11
46+
- cxx: g++-12
47+
cc: gcc-12
48+
- cxx: clang++-15
49+
cc: clang-15
50+
- cxx: clang++-18
51+
cc: clang-18
52+
build_type: Debug
53+
ivf: OFF
54+
asan: ON
5555
# address sanitizer flags
56-
cmake_extra_args: >-
57-
-DCMAKE_CXX_FLAGS='-fsanitize=address -fno-omit-frame-pointer -g'
58-
-DCMAKE_C_FLAGS='-fsanitize=address -fno-omit-frame-pointer -g'
59-
-DCMAKE_EXE_LINKER_FLAGS='-fsanitize=address'
60-
-DCMAKE_SHARED_LINKER_FLAGS='-fsanitize=address'
61-
-DSVS_BUILD_BINARIES=NO
62-
-DSVS_BUILD_EXAMPLES=NO
63-
# skip longer-running tests
64-
ctest_args: "-LE long"
56+
cmake_extra_args: >-
57+
-DCMAKE_CXX_FLAGS='-fsanitize=address -fno-omit-frame-pointer -g'
58+
-DCMAKE_C_FLAGS='-fsanitize=address -fno-omit-frame-pointer -g'
59+
-DCMAKE_EXE_LINKER_FLAGS='-fsanitize=address'
60+
-DCMAKE_SHARED_LINKER_FLAGS='-fsanitize=address'
61+
-DSVS_BUILD_BINARIES=NO
62+
-DSVS_BUILD_EXAMPLES=NO
63+
# skip longer-running tests
64+
ctest_args: -LE long
6565
exclude:
66-
- cxx: g++-12
67-
ivf: ON
66+
- cxx: g++-12
67+
ivf: ON
6868

6969
steps:
7070
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
7171
- name: Install MKL
7272
timeout-minutes: 5
7373
run: |
74-
.github/scripts/setup_apt_repo_linux.sh
75-
sudo apt install intel-oneapi-mkl intel-oneapi-mkl-devel
76-
# Setup environment variables for building against MKL.
77-
# Persist the environment variables for use across multiple subsequent actions.
78-
source /opt/intel/oneapi/setvars.sh
79-
printenv >> $GITHUB_ENV
74+
.github/scripts/setup_apt_repo_linux.sh
75+
sudo apt install intel-oneapi-mkl intel-oneapi-mkl-devel
76+
# Setup environment variables for building against MKL.
77+
# Persist the environment variables for use across multiple subsequent actions.
78+
source /opt/intel/oneapi/setvars.sh
79+
printenv >> $GITHUB_ENV
8080
8181
- name: Install Clang 18
8282
if: matrix.cxx == 'clang++-18'

.github/workflows/build-macos.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ name: MacOS Build and Test
1717
on:
1818
push:
1919
branches:
20-
- main
20+
- main
2121
pull_request:
2222

2323
permissions:
2424
contents: read
2525

2626
# This allows a subsequently queued workflow run to interrupt previous runs
2727
concurrency:
28-
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
28+
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
2929
cancel-in-progress: true
3030

3131
jobs:
@@ -37,11 +37,11 @@ jobs:
3737
build_type: [RelWithDebugInfo]
3838
cxx: [clang++-15]
3939
include:
40-
- cxx: clang++-15
41-
package: llvm@15
42-
cc_name: clang
43-
cxx_name: clang++
44-
needs_prefix: true
40+
- cxx: clang++-15
41+
package: llvm@15
42+
cc_name: clang
43+
cxx_name: clang++
44+
needs_prefix: true
4545

4646
steps:
4747
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -80,6 +80,6 @@ jobs:
8080

8181
- name: Run tests
8282
env:
83-
CTEST_OUTPUT_ON_FAILURE: 1
83+
CTEST_OUTPUT_ON_FAILURE: 1
8484
working-directory: ${{ runner.temp }}/build/tests
8585
run: ctest -C ${{ matrix.build_type }}

.github/workflows/cibuildwheel.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ name: CIBuildWheel
1717
on:
1818
push:
1919
branches:
20-
- main
20+
- main
2121
pull_request:
2222

2323
permissions:
2424
contents: read
2525

2626
concurrency:
27-
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
27+
group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
2828
cancel-in-progress: true
2929

3030
jobs:
@@ -55,14 +55,14 @@ jobs:
5555
# Make sure to add the location of the generated wheel to the python path.
5656
- name: Run Default Tests
5757
env:
58-
PYTHONPATH: ${{ runner.temp }}/usr
59-
CTEST_OUTPUT_ON_FAILURE: 1
58+
PYTHONPATH: ${{ runner.temp }}/usr
59+
CTEST_OUTPUT_ON_FAILURE: 1
6060
working-directory: ${{ runner.temp }}
6161
run: python -m unittest discover -s ${GITHUB_WORKSPACE}/bindings/python
6262

6363
- name: Run examples
6464
env:
65-
PYTHONPATH: ${{ runner.temp }}/usr
66-
CTEST_OUTPUT_ON_FAILURE: 1
65+
PYTHONPATH: ${{ runner.temp }}/usr
66+
CTEST_OUTPUT_ON_FAILURE: 1
6767
working-directory: ${{ runner.temp }}
6868
run: python -m unittest discover -p "example*.py" -s ${GITHUB_WORKSPACE}/examples/python

.github/workflows/skywalking-eyes.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ name: Check License Header
1717
on:
1818
pull_request:
1919
branches:
20-
- main
20+
- main
2121
push:
2222
branches:
23-
- main
23+
- main
2424

2525
permissions: read-all
2626

@@ -33,10 +33,10 @@ jobs:
3333
name: Copyright Check
3434
runs-on: ubuntu-24.04
3535
steps:
36-
- name: "Checkout code"
37-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
38-
- name: "Run check"
39-
uses: apache/skywalking-eyes/header@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1 # v0.8.0
40-
with:
41-
config: ".github/.licenserc.yaml"
42-
mode: "check"
36+
- name: Checkout code
37+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
38+
- name: Run check
39+
uses: apache/skywalking-eyes/header@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1 # v0.8.0
40+
with:
41+
config: .github/.licenserc.yaml
42+
mode: check

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ repos:
2121
entry: tools/clang-format.sh
2222
args: [clang-format]
2323
additional_dependencies: ["clang-format>=15,<16"]
24+
25+
- repo: https://github.com/pre-commit/pre-commit-hooks
26+
rev: v6.0.0
27+
hooks:
28+
- id: check-yaml
29+
files: \.ya?ml$

0 commit comments

Comments
 (0)