Run pre-commit's whitespace related hooks on .github and .azuredevops (#2129)

In order for pre-commit to be useful, everything needs to meet a common
baseline.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Tento commit je obsažen v:
Mario Limonciello
2025-12-08 14:39:42 -06:00
odevzdal GitHub
rodič 354cc98d55
revize 6a899b5f6d
11 změnil soubory, kde provedl 59 přidání a 59 odebrání
+1 -1
Zobrazit soubor
@@ -1,7 +1,7 @@
"project: amdsmi":
- changed-files:
- any-glob-to-any-file: 'projects/amdsmi/**/*'
"project: aqlprofile":
- changed-files:
- any-glob-to-any-file: 'projects/aqlprofile/**/*'
+13 -13
Zobrazit soubor
@@ -12,60 +12,60 @@ class ConfigureCITest(unittest.TestCase):
"is_pull_request": True,
"input_subtrees": "projects/rocprim\nprojects/hipcub"
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertEqual(len(project_to_run), 1)
def test_pull_request_empty(self):
args = {
"is_pull_request": True,
"input_subtrees": ""
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertEqual(len(project_to_run), 0)
def test_workflow_dispatch(self):
args = {
"is_workflow_dispatch": True,
"input_projects": "projects/rocprim projects/hipcub"
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertEqual(len(project_to_run), 1)
def test_workflow_dispatch_bad_input(self):
args = {
"is_workflow_dispatch": True,
"input_projects": "projects/rocprim$$projects/hipcub"
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertEqual(len(project_to_run), 0)
def test_workflow_dispatch_all(self):
args = {
"is_workflow_dispatch": True,
"input_projects": "all"
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertGreaterEqual(len(project_to_run), 1)
def test_workflow_dispatch_empty(self):
args = {
"is_workflow_dispatch": True,
"input_projects": ""
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertEqual(len(project_to_run), 0)
def test_is_push(self):
args = {
"is_push": True,
}
project_to_run = therock_configure_ci.retrieve_projects(args)
self.assertGreaterEqual(len(project_to_run), 1)
+2 -2
Zobrazit soubor
@@ -30,7 +30,7 @@ def set_github_output(d: Mapping[str, str]):
return
with open(step_output_file, "a") as f:
f.writelines(f"{k}={v}" + "\n" for k, v in d.items())
def retry(max_attempts, delay_seconds, exceptions):
def decorator(func):
def newfn(*args, **kwargs):
@@ -111,7 +111,7 @@ def retrieve_projects(args):
# retrieve the subtrees to checkout, cmake options to build, and projects to test
project_to_run = []
# Currently as we have no tests, we just build all packages available if an applicable change is made.
# Currently as we have no tests, we just build all packages available if an applicable change is made.
# As we start to get an idea of test times, we can divide test jobs.
if projects:
for project in ["all"]:
+15 -15
Zobrazit soubor
@@ -2,21 +2,21 @@
This dictionary is used to map specific file directory changes to the corresponding build flag and tests
"""
subtree_to_project_map = {
'projects/aqlprofile': 'profiler',
'projects/clr': 'core',
'projects/hip': 'core',
'projects/hip-tests': 'core',
'projects/hipother': 'core',
'projects/rdc': 'rdc',
'projects/rocm-core': 'core',
'projects/rocm-smi-lib': 'core',
'projects/rocminfo': 'core',
'projects/rocprofiler-compute': 'profiler',
'projects/rocprofiler-register': 'profiler',
'projects/rocprofiler-sdk': 'profiler',
'projects/rocprofiler-systems': 'profiler',
'projects/rocprofiler': 'profiler',
'projects/rocr-runtime': 'core',
'projects/aqlprofile': 'profiler',
'projects/clr': 'core',
'projects/hip': 'core',
'projects/hip-tests': 'core',
'projects/hipother': 'core',
'projects/rdc': 'rdc',
'projects/rocm-core': 'core',
'projects/rocm-smi-lib': 'core',
'projects/rocminfo': 'core',
'projects/rocprofiler-compute': 'profiler',
'projects/rocprofiler-register': 'profiler',
'projects/rocprofiler-sdk': 'profiler',
'projects/rocprofiler-systems': 'profiler',
'projects/rocprofiler': 'profiler',
'projects/rocr-runtime': 'core',
'projects/roctracer': 'profiler'
}
+3 -3
Zobrazit soubor
@@ -52,7 +52,7 @@ jobs:
strategy:
fail-fast: false
matrix:
system:
system: |
- { gpu: 'navi4', runner: 'rocprofiler-navi4-dind', os: 'ubuntu-22.04', build-type: 'RelWithDebInfo', gpu-target: 'gfx120X' }
- { gpu: 'navi3', runner: 'rocprofiler-navi3-dind', os: 'ubuntu-22.04', build-type: 'RelWithDebInfo', gpu-target: 'gfx110X' }
- { gpu: 'mi325', runner: 'linux-mi325-1gpu-ossci-rocm', os: 'ubuntu-22.04', build-type: 'RelWithDebInfo', gpu-target: 'gfx94X' }
@@ -132,7 +132,7 @@ jobs:
strategy:
fail-fast: false
matrix:
system:
system:
- { gpu: 'mi325', runner: 'linux-mi325-1gpu-ossci-rocm', os: 'rhel-8.8', build-type: 'RelWithDebInfo', gpu-target: 'gfx94X' }
- { gpu: 'mi325', runner: 'linux-mi325-1gpu-ossci-rocm', os: 'rhel-9.5', build-type: 'RelWithDebInfo', gpu-target: 'gfx94X' }
- { gpu: 'mi325', runner: 'linux-mi325-1gpu-ossci-rocm', os: 'sles-15.6', build-type: 'RelWithDebInfo', gpu-target: 'gfx94X' }
@@ -200,7 +200,7 @@ jobs:
PATH=~/.local/bin:${{ env.ROCM_PATH }}/bin:${PATH}
LD_LIBRARY_PATH=$(pwd)/build:${{ env.ROCM_PATH }}/lib:$LD_LIBRARY_PATH
ctest --output-on-failure -DCTEST_SOURCE_DIRECTORY="$(pwd)"
-DCTEST_BINARY_DIRECTORY="$(pwd)/build" -DAQLPROFILE_BUILD_NUM_JOBS="16"
-DCTEST_BINARY_DIRECTORY="$(pwd)/build" -DAQLPROFILE_BUILD_NUM_JOBS="16"
-DCTEST_SITE=${{ matrix.system.runner }}
-DCTEST_BUILD_NAME=PR_${{ github.ref_name }}_${{ github.repository }}-${{ matrix.system.os }}-${{ matrix.system.gpu }}-core
-DCMAKE_CTEST_ARGUMENTS=""
+3 -3
Zobrazit soubor
@@ -45,17 +45,17 @@ jobs:
.github/scripts/import_subrepo_prs.py
${{ github.event.inputs.subrepo-prefix }}
sparse-checkout-cone-mode: true
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install PyGithub GitPython
- name: Import Subrepo PRs
env:
GITHUB_TOKEN: ${{ steps.gen_token.outputs.token }}
+5 -5
Zobrazit soubor
@@ -26,11 +26,11 @@ jobs:
id: generate_matrix
run: |
MATRIX='[{"os-release":"22.04","gpu":"mi355","arch":"gfx950","runner":"linux-mi355-1gpu-ossci-rocm","code-name":"jammy"},{"os-release":"24.04","gpu":"mi355","arch":"gfx950","runner":"linux-mi355-1gpu-ossci-rocm","code-name":"noble"},{"os-release":"22.04","gpu":"mi325","arch":"gfx94X","runner":"linux-mi325-1gpu-ossci-rocm","code-name":"jammy"},{"os-release":"24.04","gpu":"mi325","arch":"gfx94X","runner":"linux-mi325-1gpu-ossci-rocm","code-name":"noble"}]'
if [ -n "${{ github.event.inputs.runner_matrix }}" ]; then
MATRIX='${{ github.event.inputs.runner_matrix }}'
fi
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
coverage:
@@ -49,14 +49,14 @@ jobs:
packages: read
container:
image: ghcr.io/rocm/rocprofiler-ubuntu:${{ matrix.system.os-release }}-systems-ci-${{ matrix.system.arch }}
options:
--privileged
options:
--privileged
--ipc host
--group-add video
--device /dev/kfd
--device /dev/dri
--cap-add CAP_SYS_ADMIN
steps:
- uses: actions/checkout@v5
with:
+1 -1
Zobrazit soubor
@@ -71,7 +71,7 @@ jobs:
# Older ROCm versions don't provide these packages.
apt install -y rccl-dev rccl-unittests || true
apt install -y rocjpeg-dev rocjpeg-test rocdecode-dev rocdecode-test || true
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 20 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
python3 -m pip install -U --user -r requirements.txt
+2 -2
Zobrazit soubor
@@ -79,7 +79,7 @@ jobs:
DOCKER_FILE=Dockerfile.${{ matrix.system.distro }}.ci
fi
echo "docker_file=${DOCKER_FILE}" >> $GITHUB_OUTPUT
- name: Get the latest build of The Rock tarball
id: therock
run: |
@@ -95,7 +95,7 @@ jobs:
KEY=${KEY//\"/}
test -n "$KEY" || { echo "No ${{ matrix.gpu }} tarball found"; exit 1; }
echo "tarball=${KEY}" >> $GITHUB_OUTPUT
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.7.9
+1 -1
Zobrazit soubor
@@ -54,7 +54,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install pydantic requests
- name: Detect changed subtrees
id: detect
if: github.event_name == 'pull_request'