CI: Enabling Navi3 and Vega20 runners & PR Jira Addition (#32)

* Enabling Navi3 and Vega20 runners

* Update continuous_integration.yml

* Update continuous_integration.yml

* Fixing Github Actions issues

* Fixing docs workflow

* Fixing docs workflow miniconda3 location

* Fixing docs workflow env setup

* Fixing docs workflow env setup

* Fixing docs workflow miniconda3 env

* Fixing docs source build workflow

* Balancing between navi3, vega20, mi300, mi200

* git sync workflow update

* Adding Jira ticket place holder in PR Description

* Fixing RHEL & SLES Builds

* Fixing RHEL & SLES Builds

* Fixing RHEL & SLES Builds

* Fixing Re-run workflow

* Update pull_request_template.md

* Update continuous_integration.yml

---------

Co-authored-by: Ammar ELWazir <aelwazir@amd.com>

[ROCm/rocprofiler-sdk commit: f16c87f594]
Этот коммит содержится в:
Elwazir, Ammar
2024-12-02 22:48:37 -06:00
коммит произвёл GitHub
родитель 8b3d9ce7cd
Коммит a50f80aaed
8 изменённых файлов: 246 добавлений и 171 удалений
+5 -3
Просмотреть файл
@@ -1,6 +1,8 @@
# PR Details
## Associated Jira Ticket Number/Link
## What type of PR is this? (check all applicable)
- [ ] Refactor
@@ -11,18 +13,18 @@
## Technical details
_Please explain the changes along with JIRA/Github link(if applies)._
<!-- Please explain the changes along with JIRA/Github link(if applies). -->
## Added/updated tests?
_We encourage you to keep the code coverage percentage at 80% and above._
<!-- We encourage you to keep the code coverage percentage at 80% and above. -->
- [ ] Yes
- [ ] No, Does not apply to this PR.
## Updated CHANGELOG?
_Needed for Release updates for a ROCm release._
<!-- Needed for Release updates for a ROCm release. -->
- [ ] Yes
- [ ] No, Does not apply to this PR.
+45 -19
Просмотреть файл
@@ -40,7 +40,7 @@ jobs:
# define this for containers
env:
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
CORE_EXT_RUNNER: mi200
CORE_EXT_RUNNER: mi300
steps:
- uses: actions/checkout@v4
@@ -277,7 +277,7 @@ jobs:
strategy:
# fail-fast: false
matrix:
runner: ['mi300-emu']
runner: ['vega20-emu']
os: ['ubuntu-22.04']
build-type: ['Release']
@@ -465,13 +465,40 @@ jobs:
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
const commentIdentifier = '<!-- unique-comment-identifier -->'; // Use this to identify your comment
const commentBody = `
${commentIdentifier}
` + process.env.COMMENT_BODY;
// Fetch existing comments
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
});
// Check for an existing comment
const existingComment = comments.find(comment => comment.body.includes(commentIdentifier));
if (existingComment) {
// Update the existing comment
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existingComment.id,
body: commentBody,
});
core.info(`Updated comment with ID: ${existingComment.id}`);
} else {
// Create a new comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: commentBody,
});
core.info('Created a new comment.');
}
- name: Archive Code Coverage Data
uses: actions/upload-artifact@v4
@@ -518,20 +545,19 @@ jobs:
strategy:
fail-fast: false
matrix:
runner: ['mi200-emu', 'mi300-emu']
runner: ['vega20-emu', 'navi3-emu', mi300-emu]
sanitizer: ['AddressSanitizer', 'ThreadSanitizer', 'LeakSanitizer', 'UndefinedBehaviorSanitizer']
os: ['ubuntu-22.04']
build-type: ['RelWithDebInfo']
exclude:
# - { runner: 'navi3-emu', sanitizer: 'ThreadSanitizer' }
# - { runner: 'navi3-emu', sanitizer: 'LeakSanitizer' }
# - { runner: 'vega20-emu', sanitizer: 'AddressSanitizer' }
# - { runner: 'vega20-emu', sanitizer: 'LeakSanitizer' }
- { runner: 'mi200-emu', sanitizer: 'LeakSanitizer' }
- { runner: 'mi200-emu', sanitizer: 'AddressSanitizer' }
# - { runner: 'mi300-emu', sanitizer: 'AddressSanitizer' }
- { runner: 'mi300-emu', sanitizer: 'ThreadSanitizer' }
- { runner: 'mi300-emu', sanitizer: 'UndefinedBehaviorSanitizer' }
- { runner: 'vega20-emu', sanitizer: 'ThreadSanitizer' }
- { runner: 'vega20-emu', sanitizer: 'AddressSanitizer' }
- { runner: 'vega20-emu', sanitizer: 'UndefinedBehaviorSanitizer' }
- { runner: 'mi300-emu', sanitizer: 'AddressSanitizer' }
- { runner: 'mi300-emu', sanitizer: 'LeakSanitizer' }
- { runner: 'navi3-emu', sanitizer: 'LeakSanitizer' }
- { runner: 'navi3-emu', sanitizer: 'ThreadSanitizer' }
- { runner: 'navi3-emu', sanitizer: 'UndefinedBehaviorSanitizer' }
if: ${{ contains(github.event_name, 'pull_request') }}
runs-on: ${{ matrix.runner }}-runner-set
+9 -11
Просмотреть файл
@@ -40,25 +40,23 @@ jobs:
with:
submodules: true
- name: Install Conda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
auto-activate-base: true
activate-environment: ""
shell: bash -el {0}
run: |
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash ./Miniconda3-latest-Linux-x86_64.sh -b
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Create Docs Directory
run:
mkdir -p docs
- name: Install Conda environment
shell: bash -el {0}
working-directory: source/docs
run: |
conda env create -n rocprofiler-docs -f environment.yml
- name: Build Docs
shell: bash -el {0}
working-directory: source/docs
run: |
source /home/runner/.bashrc
export PATH=/home/runner/miniconda3/bin:$PATH
conda init
conda env create -n rocprofiler-docs -f environment.yml
source activate
conda activate rocprofiler-docs
../scripts/update-docs.sh
@@ -84,7 +82,7 @@ jobs:
uses: actions/deploy-pages@v4
build-docs-from-source:
runs-on: gpuless-runner-set
runs-on: gpuless-emu-runner-set
steps:
- name: Checkout
uses: actions/checkout@v4
-24
Просмотреть файл
@@ -47,14 +47,6 @@ jobs:
exit 1
fi
- name: Create pull request
if: failure()
uses: googleapis/code-suggester@v4
with:
command: review
pull_number: ${{ github.event.pull_request.number }}
git_dir: '.'
source:
runs-on: ubuntu-22.04
env:
@@ -89,14 +81,6 @@ jobs:
exit 1
fi
- name: Create pull request
if: failure()
uses: googleapis/code-suggester@v4
with:
command: review
pull_number: ${{ github.event.pull_request.number }}
git_dir: '.'
python:
runs-on: ubuntu-22.04
strategy:
@@ -136,14 +120,6 @@ jobs:
exit 1
fi
- name: Create pull request
if: failure()
uses: googleapis/code-suggester@v4
with:
command: review
pull_number: ${{ github.event.pull_request.number }}
git_dir: '.'
missing-new-line:
runs-on: ubuntu-22.04
+1 -1
Просмотреть файл
@@ -32,7 +32,7 @@ on:
jobs:
generate-packages-ubuntu-22:
runs-on: rocprofiler-cluster-runner-set
runs-on: mi300-emu-runner-set
steps:
+180 -105
Просмотреть файл
@@ -40,14 +40,19 @@ jobs:
steps:
# Post a start comment to the PR.
- name: Add comment to PR
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun Started!, Please check https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}} for more details."
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun Started!, Please check https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}} for more details."
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
- uses: actions/checkout@v4
@@ -94,26 +99,36 @@ jobs:
# Post a success comment to the PR.
- name: Add comment to PR
if: ${{ success() }}
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun finished successfully!"
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun finished successfully!"
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
# Post a failure message when any of the previous steps fail.
- name: Add failure comment to PR
if: ${{ failure() }}
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun Failed!"
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun Failed!"
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
rerun-mi300:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
@@ -139,14 +154,19 @@ jobs:
steps:
# Post a start comment to the PR.
- name: Add comment to PR
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun Started!, Please check https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}} for more details."
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun Started!, Please check https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}} for more details."
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
- uses: actions/checkout@v4
@@ -193,26 +213,36 @@ jobs:
# Post a success comment to the PR.
- name: Add comment to PR
if: ${{ success() }}
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun finished successfully!"
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun finished successfully!"
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
# Post a failure message when any of the previous steps fail.
- name: Add failure comment to PR
if: ${{ failure() }}
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun Failed!"
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun Failed!"
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
rerun-vega20:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
@@ -238,14 +268,19 @@ jobs:
steps:
# Post a start comment to the PR.
- name: Add comment to PR
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun Started!, Please check https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}} for more details."
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun Started!, Please check https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}} for more details."
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
- uses: actions/checkout@v4
@@ -292,26 +327,36 @@ jobs:
# Post a success comment to the PR.
- name: Add comment to PR
if: ${{ success() }}
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun finished successfully!"
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun finished successfully!"
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
# Post a failure message when any of the previous steps fail.
- name: Add failure comment to PR
if: ${{ failure() }}
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun Failed!"
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun Failed!"
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
rerun-navi3:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
@@ -337,14 +382,19 @@ jobs:
steps:
# Post a start comment to the PR.
- name: Add comment to PR
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun Started!, Please check https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}} for more details."
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun Started!, Please check https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}} for more details."
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
- uses: actions/checkout@v4
@@ -391,26 +441,36 @@ jobs:
# Post a success comment to the PR.
- name: Add comment to PR
if: ${{ success() }}
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun finished successfully!"
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun finished successfully!"
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
# Post a failure message when any of the previous steps fail.
- name: Add failure comment to PR
if: ${{ failure() }}
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun Failed!"
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun Failed!"
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
rerun-pc-sampling:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
@@ -436,14 +496,19 @@ jobs:
steps:
# Post a start comment to the PR.
- name: Add comment to PR
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun Started!, Please check https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}} for more details."
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun Started!, Please check https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/${{github.run_id}} for more details."
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
- uses: actions/checkout@v4
@@ -490,23 +555,33 @@ jobs:
# Post a success comment to the PR.
- name: Add comment to PR
if: ${{ success() }}
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun finished successfully!"
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun finished successfully!"
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
# Post a failure message when any of the previous steps fail.
- name: Add failure comment to PR
if: ${{ failure() }}
uses: octokit/request-action@v2.x
with:
route: POST /repos/{repository}/issues/{issue_number}/comments
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
body: "Rerun Failed!"
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: "Rerun Failed!"
with:
github-token: ${{ secrets.TOKEN }}
script: |
const comment_body = process.env.COMMENT_BODY;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})
+3 -4
Просмотреть файл
@@ -9,10 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: git-sync
uses: wei/git-sync@v3
uses: AMD-ROCm-Internal/rocprofiler-github-actions@git-sync-v3
with:
source_repo: "git@github.com:ROCm/rocprofiler-sdk-internal.git"
source_repo: "https://${{ secrets.TOKEN }}@github.com/AMD-ROCm-Internal/rocprofiler-sdk-internal.git"
source_branch: "amd-mainline"
destination_repo: "git@github.com:ROCm/rocprofiler-sdk.git"
destination_repo: "https://${{ secrets.EXT_TOKEN }}@github.com/ROCm/rocprofiler-sdk.git"
destination_branch: "amd-mainline"
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
+3 -4
Просмотреть файл
@@ -9,10 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: git-sync
uses: wei/git-sync@v3
uses: AMD-ROCm-Internal/rocprofiler-github-actions@git-sync-v3
with:
source_repo: "git@github.com:ROCm/rocprofiler-sdk-internal.git"
source_repo: "https://${{ secrets.TOKEN }}@github.com/AMD-ROCm-Internal/rocprofiler-sdk-internal.git"
source_branch: "amd-staging"
destination_repo: "git@github.com:ROCm/rocprofiler-sdk.git"
destination_repo: "https://${{ secrets.EXT_TOKEN }}@github.com/ROCm/rocprofiler-sdk.git"
destination_branch: "amd-staging"
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}