Update formatting.yml for Rocprofiler-sdk (#7)
* Update formatting.yml Changed runners to ubuntu-latest instead of AMD-ROCm-Internal-dev1 * Updated rocprofiler-sdk formatting workflow * Added Sparse Checkouts * Run in folder * Check the WD * List all files * Added Rocprofiler-register * Removed working dirs and rocprofiler-register --------- Co-authored-by: Sivasuntharampillai, Haresh <Haresh.Sivasuntharampillai+amdeng@amd.com>
This commit is contained in:
committad av
GitHub
förälder
27db3621df
incheckning
61299d7598
+21
-11
@@ -1,15 +1,16 @@
|
||||
|
||||
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 }}
|
||||
@@ -17,12 +18,14 @@ concurrency:
|
||||
|
||||
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
|
||||
@@ -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: |
|
||||
@@ -86,7 +91,7 @@ jobs:
|
||||
fi
|
||||
|
||||
python:
|
||||
runs-on: AMD-ROCm-Internal-dev1
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.10']
|
||||
@@ -95,6 +100,8 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: projects/rocprofiler-sdk
|
||||
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
@@ -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"
|
||||
@@ -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
|
||||
Referens i nytt ärende
Block a user