#===============================================================================
# Copyright 2024-2025 Intel Corporation
# Copyright 2025 Arm Ltd. and affiliates
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================

# This is configuration file for Labeler workflow. See documenation for syntax
# reference: https://github.com/marketplace/actions/labeler

# Labels based on area of responsibility
# Process definition and code owners
governance:
- changed-files:
  - any-glob-to-any-file:
    - '.github/CODEOWNERS'
    - 'SECURITY.md'
    - 'MAINTAINERS.md'
    - 'CONTRIBUTING.md'
    - 'CODING_STANDARDS.md'
    - 'CODE_OF_CONDUCT.md'

# Github automation
devops:
- all:
  - changed-files:
    - any-glob-to-any-file: '.github/**'
    - all-globs-to-all-files: '!.github/CODEOWNERS'

# Documentation
documentation:
- changed-files:
  - any-glob-to-any-file: ['**/*.md', 'doc/**']

# Common code
component:build:
- changed-files:
  - any-glob-to-any-file:
    - 'cmake/**'
    - 'CMakeLists.txt'

component:examples:
- changed-files:
  - any-glob-to-any-file: 'examples/**'

component:tests:
- changed-files:
  - any-glob-to-any-file: 'tests/**'

component:api:
- changed-files:
  - any-glob-to-any-file: 'include/**'

component:common:
- changed-files:
  - any-glob-to-any-file:
    - 'src/common/**'
    - 'src/cpu/*'
    - 'src/gpu/*'
    - 'src/xpu/**'

component:graph-api:
- changed-files:
  - any-glob-to-any-file:
    - 'src/graph/**'
    - 'tests/benchdnn/graph/**'
    - 'tests/gtests/graph/**'
    - 'doc/graph/**'

third_party:
- changed-files:
  - any-glob-to-any-file:
    - 'third_party/**'

# CPU Engine
platform:cpu-aarch64:
- any:
  - changed-files:
    - any-glob-to-any-file: 'src/cpu/aarch64/**'
    - any-glob-to-any-file: '.github/automation/aarch64/**'
    - any-glob-to-any-file: '.github/automation/performance/**'
    - any-glob-to-any-file: '.github/automation/workflows/*aarch64*'
  

platform:cpu-ppc64:
- changed-files:
  - any-glob-to-any-file: 'src/cpu/ppc64/**'

platform:cpu-rv64:
- changed-files:
  - any-glob-to-any-file: 'src/cpu/rv64/**'

platform:cpu-s390x:
- changed-files:
  - any-glob-to-any-file: 'src/cpu/s390x/**'

platform:cpu-x64:
- changed-files:
  - any-glob-to-any-file: ['src/cpu/x64/**', 'src/cpu/rnn/**']

# GPU Engine
platform:gpu-amd:
- changed-files:
  - any-glob-to-any-file: 'src/gpu/amd/**'

platform:gpu-intel:
- changed-files:
  - any-glob-to-any-file: 'src/gpu/intel/**'

platform:gpu-nvidia:
- changed-files:
  - any-glob-to-any-file: 'src/gpu/nvidia/**'

platform:gpu-generic:
- changed-files:
  - any-glob-to-any-file: 'src/gpu/generic/**'

# Labels based on target branch
# Backport
backport:
- base-branch: 'rls-*'
