Skip to content

Commit f5befc4

Browse files
committed
github: workflows: enable license check tool
1 parent 5a92cc4 commit f5befc4

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

.github/.licenserc.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#===============================================================================
2+
# Copyright 2025 Intel Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
header:
17+
license:
18+
spdx-id: Apache-2.0
19+
pattern: |
20+
(Copyright \d{4} Intel Corporation|Copyright \d{4}(?:[,\s-]+\d{4})* (Arm Ltd\. and affiliates|Codeplay Software Limited|FUJITSU LIMITED|KNS Group LLC \(YADRO\)|IBM Corporation|Alanna Tempest|YANDEX LLC))
21+
Licensed under the Apache License, Version 2\.0 \(the "License"\);
22+
you may not use this file except in compliance with the License\.
23+
You may obtain a copy of the License at
24+
25+
http:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0
26+
27+
Unless required by applicable law or agreed to in writing, software
28+
distributed under the License is distributed on an "AS IS" BASIS,
29+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
30+
See the License for the specific language governing permissions and
31+
limitations under the License\.
32+
33+
paths:
34+
- '**'
35+
36+
paths-ignore:
37+
# all documentation-like files
38+
- '**doc/**'
39+
- '**/*.md'
40+
41+
# files in the root (which are typically are doc-like files)
42+
- '*'
43+
44+
# Github automation
45+
- '**/*.github/**'
46+
- '**/*.git*'
47+
48+
# Clang tools configs
49+
- '**/*.clang-*'
50+
51+
# cmake
52+
- 'cmake/ACL.cmake'
53+
- 'cmake/FindACL.cmake'
54+
- 'cmake/FindBLAS.cmake'
55+
- 'cmake/FindOpenCL.cmake'
56+
57+
# benchdnn inputs
58+
- 'tests/benchdnn/inputs/**'
59+
60+
# Third party components
61+
- 'third_party/**'
62+
63+
# visual-studio files
64+
- '**/*.vcxproj*'
65+
66+
license-location-threshold: 111 # specifies the index threshold where the license header can be located.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check License Header
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
permissions: read-all
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}-${{ github.event.number || github.sha }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
check-license-header:
19+
name: Copyright Check
20+
runs-on: ubuntu-24.04
21+
steps:
22+
- name: "Checkout code"
23+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24+
- name: "Run check"
25+
uses: apache/skywalking-eyes/header@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1 # v0.8.0
26+
with:
27+
config: ".github/.licenserc.yaml"
28+
mode: "check"

0 commit comments

Comments
 (0)