Files
rocm-systems/.github/workflows/rocprofiler-sdk-python.yml
T
Jonathan R. Madsen 9df2c1ec68 [rocprofiler-sdk] Fix formatting, linting, and CI workflows (#345)
* [rocprofiler-sdk] Fix formatting and lint workflows

- several formatting workflows were silently failing when listing files

* format metrics_test.h

* Improve formatting job robustness

* Source formatting workflow does not use container

* Use PyPi clang-format

* Format rocpd/source/csv.cpp source

* Fix rocprofiler-sdk CI workflow

- fix invalid context access

* Update run-ci.py

- fix ctest_update

* Update run-ci.py

- handle old checkout in ROCm/rocprofiler-sdk
2025-08-14 00:02:23 -05:00

45 righe
1.2 KiB
YAML

name: rocprofiler-sdk Python Linting
on:
workflow_dispatch:
push:
branches:
- develop
paths:
- 'projects/rocprofiler-sdk/**'
pull_request:
paths:
- 'projects/rocprofiler-sdk/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linting:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.8', '3.10', '3.12']
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: projects/rocprofiler-sdk
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
working-directory: projects/rocprofiler-sdk
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
working-directory: projects/rocprofiler-sdk
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 source --count --show-source --statistics --select=E9,F63,F7,F82
# flake8 options are defined in .flake8
flake8 source --count --show-source --statistics