Jakub Sujak | 6e56bf3 | 2023-08-23 14:42:26 +0100 | [diff] [blame] | 1 | # Copyright (c) 2023 Arm Limited. |
| 2 | # |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
| 6 | # of this software and associated documentation files (the "Software"), to |
| 7 | # deal in the Software without restriction, including without limitation the |
| 8 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 9 | # sell copies of the Software, and to permit persons to whom the Software is |
| 10 | # furnished to do so, subject to the following conditions: |
| 11 | # |
| 12 | # The above copyright notice and this permission notice shall be included in all |
| 13 | # copies or substantial portions of the Software. |
| 14 | # |
| 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 21 | # SOFTWARE. |
Georgios Pinitas | a717110 | 2021-08-17 12:54:59 +0100 | [diff] [blame] | 22 | fail_fast: false |
| 23 | |
Gunes Bayir | 66b4a6a | 2023-07-01 22:55:42 +0100 | [diff] [blame] | 24 | exclude: | |
| 25 | (?x)^( |
| 26 | data/.*| |
| 27 | include/.*| |
| 28 | src/CMakeLists.txt| |
| 29 | src/Bazel.build| |
Jakub Sujak | 6e56bf3 | 2023-08-23 14:42:26 +0100 | [diff] [blame] | 30 | Android.bp| |
| 31 | src/core/NEON/kernels/convolution/.*| |
| 32 | src/core/NEON/kernels/arm_gemm/.*| |
| 33 | src/core/NEON/kernels/arm_conv/.*| |
| 34 | compute_kernel_writer/validation/.* |
Gunes Bayir | 66b4a6a | 2023-07-01 22:55:42 +0100 | [diff] [blame] | 35 | )$ |
| 36 | |
Georgios Pinitas | a717110 | 2021-08-17 12:54:59 +0100 | [diff] [blame] | 37 | repos: |
Gunes Bayir | 66b4a6a | 2023-07-01 22:55:42 +0100 | [diff] [blame] | 38 | - repo: local |
Georgios Pinitas | a717110 | 2021-08-17 12:54:59 +0100 | [diff] [blame] | 39 | hooks: |
Gunes Bayir | 66b4a6a | 2023-07-01 22:55:42 +0100 | [diff] [blame] | 40 | - id: format-code |
| 41 | name: ACL Format Code Script |
Georgios Pinitas | a717110 | 2021-08-17 12:54:59 +0100 | [diff] [blame] | 42 | stages: [commit] |
Gunes Bayir | 66b4a6a | 2023-07-01 22:55:42 +0100 | [diff] [blame] | 43 | language: python |
| 44 | entry: python ./scripts/format_code.py --files=git-diff |
| 45 | pass_filenames: false |
| 46 | additional_dependencies: ['psutil==5.8.0', 'Jinja2==3.0.1'] |
| 47 | - id: prepare-cmake-build-files |
| 48 | name: Prepare CMake build files |
Georgios Pinitas | a717110 | 2021-08-17 12:54:59 +0100 | [diff] [blame] | 49 | stages: [commit] |
Gunes Bayir | 66b4a6a | 2023-07-01 22:55:42 +0100 | [diff] [blame] | 50 | language: python |
| 51 | entry: python ./scripts/generate_build_files.py --cmake |
| 52 | pass_filenames: false |
| 53 | - id: prepare-bazel-build-files |
| 54 | name: Prepare Bazel build files |
| 55 | stages: [commit] |
| 56 | language: python |
| 57 | entry: python ./scripts/generate_build_files.py --bazel |
| 58 | pass_filenames: false |
Gunes Bayir | ead57c2 | 2023-08-11 21:46:23 +0100 | [diff] [blame] | 59 | - id: fix-header-guards-ckw |
| 60 | name: Fix header guards in CKW |
| 61 | stages: [commit] |
| 62 | language: python |
Jakub Sujak | 6e56bf3 | 2023-08-23 14:42:26 +0100 | [diff] [blame] | 63 | entry: python ./scripts/check_header_guards.py --extensions=h,hh,hpp,inl --comment_style=double_slash --prefix=CKW --include=compute_kernel_writer/ --add_extension --drop_outermost_subdir |
Gunes Bayir | ead57c2 | 2023-08-11 21:46:23 +0100 | [diff] [blame] | 64 | pass_filenames: true |
| 65 | - id: fix-header-guards-acl |
| 66 | name: Fix header guards in ACL |
| 67 | stages: [commit] |
| 68 | language: python |
Jakub Sujak | 6e56bf3 | 2023-08-23 14:42:26 +0100 | [diff] [blame] | 69 | entry: python ./scripts/check_header_guards.py --extensions=h,hh,hpp,inl --comment_style=double_slash --prefix=ACL --exclude=compute_kernel_writer/,src/core/NEON/kernels/convolution/,src/core/NEON/kernels/arm_gemm/,src/core/NEON/kernels/arm_conv/,include/ --add_extension |
Gunes Bayir | ead57c2 | 2023-08-11 21:46:23 +0100 | [diff] [blame] | 70 | pass_filenames: true |
Jakub Sujak | 6e56bf3 | 2023-08-23 14:42:26 +0100 | [diff] [blame] | 71 | - repo: https://github.com/pre-commit/mirrors-clang-format |
| 72 | rev: v14.0.6 |
| 73 | hooks: |
| 74 | - id: clang-format |
| 75 | files: .*\.(cpp|h|hpp|hh|cc|inl|c)$ |
| 76 | exclude: | |
| 77 | (?x)^( |
| 78 | tests/.* |
| 79 | )$ |
Gunes Bayir | 66b4a6a | 2023-07-01 22:55:42 +0100 | [diff] [blame] | 80 | - repo: https://github.com/pre-commit/pre-commit-hooks |
| 81 | rev: v4.4.0 |
| 82 | hooks: |
Georgios Pinitas | a717110 | 2021-08-17 12:54:59 +0100 | [diff] [blame] | 83 | - id: end-of-file-fixer |
| 84 | stages: [commit] |
Georgios Pinitas | a717110 | 2021-08-17 12:54:59 +0100 | [diff] [blame] | 85 | - id: trailing-whitespace |
| 86 | stages: [commit] |
| 87 | - id: mixed-line-ending |
| 88 | args: ['--fix=lf'] |
| 89 | description: Forces to replace line ending by the UNIX 'lf' character. |
Georgios Pinitas | a717110 | 2021-08-17 12:54:59 +0100 | [diff] [blame] | 90 | - id: check-added-large-files |
| 91 | args: ['--maxkb=100'] |
| 92 | stages: [commit] |