CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
96 lines
3.3 KiB
YAML
96 lines
3.3 KiB
YAML
default_stages: [pre-commit]
|
|
fail_fast: true
|
|
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v6.0.0
|
|
hooks:
|
|
- id: check-yaml
|
|
files: ^projects/rocprofiler-compute/
|
|
- id: end-of-file-fixer
|
|
files: ^projects/rocprofiler-compute/
|
|
- id: trailing-whitespace
|
|
files: ^projects/rocprofiler-compute/
|
|
|
|
# Python import sorting and formatting
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
# Ruff version. Check https://github.com/astral-sh/ruff-pre-commit#version-compatibility
|
|
# for the latest ruff version supported by the hook.
|
|
rev: v0.14.11
|
|
hooks:
|
|
- id: ruff-check
|
|
args: [--fix]
|
|
files: ^projects/rocprofiler-compute/
|
|
- id: ruff-format
|
|
files: ^projects/rocprofiler-compute/
|
|
|
|
# CMake formatting
|
|
- repo: https://github.com/BlankSpruce/gersemi
|
|
rev: 0.22.1
|
|
hooks:
|
|
- id: gersemi
|
|
files: ^projects/rocprofiler-compute/.*(CMakeLists\.txt|\.cmake)$
|
|
|
|
# C/C++ formatting (matches rocprofiler-compute-formatting.yml workflow)
|
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
|
rev: v22.1.0
|
|
hooks:
|
|
- id: clang-format
|
|
files: ^projects/rocprofiler-compute/src/.*\.(h|hpp|hh|c|cc|cpp)(\.in)?$
|
|
exclude: ^projects/rocprofiler-compute/src/(lib/external|vendored)/
|
|
|
|
# Reject committed Python bytecode
|
|
- repo: local
|
|
hooks:
|
|
- id: no-python-bytecode
|
|
name: Reject staged Python bytecode
|
|
entry: >-
|
|
bash -c 'printf "Error - Python bytecode staged for commit:\n";
|
|
printf " %s\n" "$@"; exit 1' --
|
|
language: system
|
|
files: ^projects/rocprofiler-compute/.*(__pycache__/.*|\.pyc)$
|
|
|
|
# Local hook: copyright header check
|
|
- repo: local
|
|
hooks:
|
|
- id: copyright-header-check
|
|
name: Copyright header check
|
|
entry: python projects/rocprofiler-compute/tools/copyright_header_check.py
|
|
language: python
|
|
files: ^projects/rocprofiler-compute/.*\.(py|hip|cpp)$
|
|
stages: [pre-commit]
|
|
|
|
# Local hook: sets metric ID validation
|
|
- repo: local
|
|
hooks:
|
|
- id: sets-metric-id-check
|
|
name: Sets metric ID validation
|
|
entry: bash -lc 'cd projects/rocprofiler-compute && python3 tools/validate_sets_metric_ids.py'
|
|
language: system
|
|
files: (sets/gfx.*_sets\.yaml|analysis_configs/gfx.*/\d{4}_.*\.yaml|mi_gpu_spec\.yaml)$
|
|
pass_filenames: false
|
|
stages: [pre-commit]
|
|
|
|
# Local hook: hash consistency check
|
|
- repo: local
|
|
hooks:
|
|
- id: hash-check
|
|
name: Hash consistency check
|
|
entry: python projects/rocprofiler-compute/tools/config_management/hash_checker.py
|
|
language: python
|
|
additional_dependencies: [pyyaml==6.0.3]
|
|
files: ^projects/rocprofiler-compute/
|
|
pass_filenames: false
|
|
stages: [pre-commit]
|
|
|
|
# Local hook: YAML and metric equation formatting
|
|
- repo: local
|
|
hooks:
|
|
- id: yaml-format-fix
|
|
name: YAML metric equation formatting
|
|
entry: python projects/rocprofiler-compute/tools/format_yaml.py --fix
|
|
language: python
|
|
additional_dependencies: [pyyaml==6.0.3]
|
|
files: ^projects/rocprofiler-compute/src/(rocprof_compute_soc/analysis_configs|rocprof_compute_tui/utils)/gfx.*\.yaml$
|
|
pass_filenames: true
|
|
stages: [pre-commit]
|