Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@

name: Formatting
name: RocProfiler-SDK Formatting

on:
workflow_dispatch:
pull_request:
paths-ignore:
- '.github/workflows/pull_*.yml'
- '.github/workflows/linting.yml'
- '.github/workflows/markdown_lint.yml'
- '*.md'
- '**/README.md'
paths:
- 'projects/rocprofiler-sdk/**'
- '!projects/rocprofiler-sdk/.github/workflows/pull_*.yml'
- '!projects/rocprofiler-sdk/.github/workflows/linting.yml'
- '!projects/rocprofiler-sdk/.github/workflows/markdown_lint.yml'
- '!projects/rocprofiler-sdk/*.md'
- '!projects/rocprofiler-sdk/**/README.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
cmake:
runs-on: AMD-ROCm-Internal-dev1
runs-on: ubuntu-latest
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4
with:
sparse-checkout: projects/rocprofiler-sdk

- name: Extract branch name
shell: bash
Expand Down Expand Up @@ -50,13 +53,15 @@ jobs:
fi

source:
runs-on: AMD-ROCm-Internal-dev1
runs-on: ubuntu-latest
container: rocm/dev-ubuntu-22.04:latest
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4
with:
sparse-checkout: projects/rocprofiler-sdk

- name: Install dependencies
run: |
Expand Down Expand Up @@ -86,7 +91,7 @@ jobs:
fi

python:
runs-on: AMD-ROCm-Internal-dev1
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
Expand All @@ -95,6 +100,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
sparse-checkout: projects/rocprofiler-sdk

- name: Extract branch name
shell: bash
Expand All @@ -114,6 +121,7 @@ jobs:

- name: black format
run: |
cd projects/rocprofiler-sdk
black .
if [ $(git diff | wc -l) -ne 0 ]; then
echo -e "\nError! Python code not formatted. Run black...\n"
Expand All @@ -125,10 +133,12 @@ jobs:
fi

missing-new-line:
runs-on: AMD-ROCm-Internal-dev1
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
sparse-checkout: projects/rocprofiler-sdk

- name: Find missing new line
shell: bash
Expand Down
Loading