[Ex CI] create component trigger files (#29)
This commit is contained in:
@@ -0,0 +1,45 @@
|
|||||||
|
variables:
|
||||||
|
- group: common
|
||||||
|
- template: /.azuredevops/variables-global.yml@pipelines_repo
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: pipelinesRepoRef
|
||||||
|
type: string
|
||||||
|
default: refs/heads/develop
|
||||||
|
- name: triggerDownstreamJobs
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: pipelines_repo
|
||||||
|
type: github
|
||||||
|
endpoint: ROCm
|
||||||
|
name: ROCm/ROCm
|
||||||
|
ref: ${{ parameters.pipelinesRepoRef }}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- projects/rdc
|
||||||
|
exclude:
|
||||||
|
- projects/rdc/.github
|
||||||
|
- projects/rdc/docs
|
||||||
|
- projects/rdc/.*.y*ml
|
||||||
|
- projects/rdc/*.md
|
||||||
|
- projects/rdc/LICENSE
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: rdc
|
||||||
|
jobs:
|
||||||
|
- template: ${{ variables.CI_COMPONENT_PATH }}/rdc.yml@pipelines_repo
|
||||||
|
parameters:
|
||||||
|
sparseCheckoutDir: projects/rdc
|
||||||
|
triggerDownstreamJobs: ${{ parameters.triggerDownstreamJobs }}
|
||||||
|
- template: templates/report-summary-check-wrapper.yml
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
variables:
|
||||||
|
- group: common
|
||||||
|
- template: /.azuredevops/variables-global.yml@pipelines_repo
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: pipelinesRepoRef
|
||||||
|
type: string
|
||||||
|
default: refs/heads/develop
|
||||||
|
- name: triggerDownstreamJobs
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: pipelines_repo
|
||||||
|
type: github
|
||||||
|
endpoint: ROCm
|
||||||
|
name: ROCm/ROCm
|
||||||
|
ref: ${{ parameters.pipelinesRepoRef }}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- projects/rocm-core
|
||||||
|
exclude:
|
||||||
|
- projects/rocm-core/CHANGELOG.md
|
||||||
|
- projects/rocm-core/CODEOWNERS
|
||||||
|
- projects/rocm-core/copyright
|
||||||
|
- projects/rocm-core/README.txt
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: rocm_core
|
||||||
|
jobs:
|
||||||
|
- template: ${{ variables.CI_COMPONENT_PATH }}/rocm-core.yml@pipelines_repo
|
||||||
|
parameters:
|
||||||
|
sparseCheckoutDir: projects/rocm-core
|
||||||
|
triggerDownstreamJobs: ${{ parameters.triggerDownstreamJobs }}
|
||||||
|
- template: templates/report-summary-check-wrapper.yml
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
variables:
|
||||||
|
- group: common
|
||||||
|
- template: /.azuredevops/variables-global.yml@pipelines_repo
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: pipelinesRepoRef
|
||||||
|
type: string
|
||||||
|
default: refs/heads/develop
|
||||||
|
- name: triggerDownstreamJobs
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: pipelines_repo
|
||||||
|
type: github
|
||||||
|
endpoint: ROCm
|
||||||
|
name: ROCm/ROCm
|
||||||
|
ref: ${{ parameters.pipelinesRepoRef }}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- projects/rocm-smi-lib
|
||||||
|
exclude:
|
||||||
|
- projects/rocm-smi-lib/.github
|
||||||
|
- projects/rocm-smi-lib/docs
|
||||||
|
- projects/rocm-smi-lib/.*.y*ml
|
||||||
|
- projects/rocm-smi-lib/*.md
|
||||||
|
- projects/rocm-smi-lib/License.txt
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: rocm_smi_lib
|
||||||
|
jobs:
|
||||||
|
- template: ${{ variables.CI_COMPONENT_PATH }}/rocm_smi_lib.yml@pipelines_repo
|
||||||
|
parameters:
|
||||||
|
sparseCheckoutDir: projects/rocm-smi-lib
|
||||||
|
triggerDownstreamJobs: ${{ parameters.triggerDownstreamJobs }}
|
||||||
|
- template: templates/report-summary-check-wrapper.yml
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
variables:
|
||||||
|
- group: common
|
||||||
|
- template: /.azuredevops/variables-global.yml@pipelines_repo
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: pipelinesRepoRef
|
||||||
|
type: string
|
||||||
|
default: refs/heads/develop
|
||||||
|
- name: triggerDownstreamJobs
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: pipelines_repo
|
||||||
|
type: github
|
||||||
|
endpoint: ROCm
|
||||||
|
name: ROCm/ROCm
|
||||||
|
ref: ${{ parameters.pipelinesRepoRef }}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- projects/rocminfo
|
||||||
|
exclude:
|
||||||
|
- projects/rocminfo/.github
|
||||||
|
- projects/rocminfo/License.txt
|
||||||
|
- projects/rocminfo/README.md
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: rocminfo
|
||||||
|
jobs:
|
||||||
|
- template: ${{ variables.CI_COMPONENT_PATH }}/rocminfo.yml@pipelines_repo
|
||||||
|
parameters:
|
||||||
|
sparseCheckoutDir: projects/rocminfo
|
||||||
|
triggerDownstreamJobs: ${{ parameters.triggerDownstreamJobs }}
|
||||||
|
- template: templates/report-summary-check-wrapper.yml
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
variables:
|
||||||
|
- group: common
|
||||||
|
- template: /.azuredevops/variables-global.yml@pipelines_repo
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: pipelinesRepoRef
|
||||||
|
type: string
|
||||||
|
default: refs/heads/develop
|
||||||
|
- name: triggerDownstreamJobs
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: pipelines_repo
|
||||||
|
type: github
|
||||||
|
endpoint: ROCm
|
||||||
|
name: ROCm/ROCm
|
||||||
|
ref: ${{ parameters.pipelinesRepoRef }}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- projects/rocprofiler-compute
|
||||||
|
exclude:
|
||||||
|
- projects/rocprofiler-compute/.github
|
||||||
|
- projects/rocprofiler-compute/docs
|
||||||
|
- projects/rocprofiler-compute/.*.y*ml
|
||||||
|
- projects/rocprofiler-compute/*.md
|
||||||
|
- projects/rocprofiler-compute/AUTHORS
|
||||||
|
- projects/rocprofiler-compute/LICENSE
|
||||||
|
- projects/rocprofiler-compute/VERSION
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: rocprofiler_compute
|
||||||
|
jobs:
|
||||||
|
- template: ${{ variables.CI_COMPONENT_PATH }}/rocprofiler-compute.yml@pipelines_repo
|
||||||
|
parameters:
|
||||||
|
sparseCheckoutDir: projects/rocprofiler-compute
|
||||||
|
triggerDownstreamJobs: ${{ parameters.triggerDownstreamJobs }}
|
||||||
|
- template: templates/report-summary-check-wrapper.yml
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
variables:
|
||||||
|
- group: common
|
||||||
|
- template: /.azuredevops/variables-global.yml@pipelines_repo
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: pipelinesRepoRef
|
||||||
|
type: string
|
||||||
|
default: refs/heads/develop
|
||||||
|
- name: triggerDownstreamJobs
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: pipelines_repo
|
||||||
|
type: github
|
||||||
|
endpoint: ROCm
|
||||||
|
name: ROCm/ROCm
|
||||||
|
ref: ${{ parameters.pipelinesRepoRef }}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- projects/rocprofiler-register
|
||||||
|
exclude:
|
||||||
|
- projects/rocprofiler-register/.github
|
||||||
|
- projects/rocprofiler-register/LICENSE
|
||||||
|
- projects/rocprofiler-register/README.md
|
||||||
|
- projects/rocprofiler-register/VERSION
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: rocprofiler_register
|
||||||
|
jobs:
|
||||||
|
- template: ${{ variables.CI_COMPONENT_PATH }}/rocprofiler-register.yml@pipelines_repo
|
||||||
|
parameters:
|
||||||
|
sparseCheckoutDir: projects/rocprofiler-register
|
||||||
|
triggerDownstreamJobs: ${{ parameters.triggerDownstreamJobs }}
|
||||||
|
- template: templates/report-summary-check-wrapper.yml
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
variables:
|
||||||
|
- group: common
|
||||||
|
- template: /.azuredevops/variables-global.yml@pipelines_repo
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: pipelinesRepoRef
|
||||||
|
type: string
|
||||||
|
default: refs/heads/develop
|
||||||
|
- name: triggerDownstreamJobs
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: pipelines_repo
|
||||||
|
type: github
|
||||||
|
endpoint: ROCm
|
||||||
|
name: ROCm/ROCm
|
||||||
|
ref: ${{ parameters.pipelinesRepoRef }}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- projects/rocprofiler-sdk
|
||||||
|
exclude:
|
||||||
|
- projects/rocprofiler-sdk/.github
|
||||||
|
- projects/rocprofiler-sdk/ISSUE_TEMPLATE
|
||||||
|
- projects/rocprofiler-sdk/*.md
|
||||||
|
- projects/rocprofiler-sdk/CODEOWNERS
|
||||||
|
- projects/rocprofiler-sdk/LICENSE
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: rocprofiler_sdk
|
||||||
|
jobs:
|
||||||
|
- template: ${{ variables.CI_COMPONENT_PATH }}/rocprofiler-sdk.yml@pipelines_repo
|
||||||
|
parameters:
|
||||||
|
sparseCheckoutDir: projects/rocprofiler-sdk
|
||||||
|
triggerDownstreamJobs: ${{ parameters.triggerDownstreamJobs }}
|
||||||
|
- template: templates/report-summary-check-wrapper.yml
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
variables:
|
||||||
|
- group: common
|
||||||
|
- template: /.azuredevops/variables-global.yml@pipelines_repo
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: pipelinesRepoRef
|
||||||
|
type: string
|
||||||
|
default: refs/heads/develop
|
||||||
|
- name: triggerDownstreamJobs
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: pipelines_repo
|
||||||
|
type: github
|
||||||
|
endpoint: ROCm
|
||||||
|
name: ROCm/ROCm
|
||||||
|
ref: ${{ parameters.pipelinesRepoRef }}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- projects/rocprofiler-systems
|
||||||
|
exclude:
|
||||||
|
- projects/rocprofiler-systems/.github
|
||||||
|
- projects/rocprofiler-systems/docs
|
||||||
|
- projects/rocprofiler-systems/.*.y*ml
|
||||||
|
- projects/rocprofiler-systems/*.md
|
||||||
|
- projects/rocprofiler-systems/LICENSE
|
||||||
|
- projects/rocprofiler-systems/VERSION
|
||||||
|
- projects/rocprofiler-systems/.wordlist.txt
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: rocprofiler_systems
|
||||||
|
jobs:
|
||||||
|
- template: ${{ variables.CI_COMPONENT_PATH }}/rocprofiler-systems.yml@pipelines_repo
|
||||||
|
parameters:
|
||||||
|
sparseCheckoutDir: projects/rocprofiler-systems
|
||||||
|
triggerDownstreamJobs: ${{ parameters.triggerDownstreamJobs }}
|
||||||
|
- template: templates/report-summary-check-wrapper.yml
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
variables:
|
||||||
|
- group: common
|
||||||
|
- template: /.azuredevops/variables-global.yml@pipelines_repo
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: pipelinesRepoRef
|
||||||
|
type: string
|
||||||
|
default: refs/heads/develop
|
||||||
|
- name: triggerDownstreamJobs
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: pipelines_repo
|
||||||
|
type: github
|
||||||
|
endpoint: ROCm
|
||||||
|
name: ROCm/ROCm
|
||||||
|
ref: ${{ parameters.pipelinesRepoRef }}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- projects/rocprofiler
|
||||||
|
exclude:
|
||||||
|
- projects/rocprofiler/.github
|
||||||
|
- projects/rocprofiler/doc
|
||||||
|
- projects/rocprofiler/LICENSE
|
||||||
|
- projects/rocprofiler/*.md
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: rocprofiler
|
||||||
|
jobs:
|
||||||
|
- template: ${{ variables.CI_COMPONENT_PATH }}/rocprofiler.yml@pipelines_repo
|
||||||
|
parameters:
|
||||||
|
sparseCheckoutDir: projects/rocprofiler
|
||||||
|
triggerDownstreamJobs: ${{ parameters.triggerDownstreamJobs }}
|
||||||
|
- template: templates/report-summary-check-wrapper.yml
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
variables:
|
||||||
|
- group: common
|
||||||
|
- template: /.azuredevops/variables-global.yml@pipelines_repo
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: pipelinesRepoRef
|
||||||
|
type: string
|
||||||
|
default: refs/heads/develop
|
||||||
|
- name: triggerDownstreamJobs
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: pipelines_repo
|
||||||
|
type: github
|
||||||
|
endpoint: ROCm
|
||||||
|
name: ROCm/ROCm
|
||||||
|
ref: ${{ parameters.pipelinesRepoRef }}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- projects/rocr-runtime
|
||||||
|
exclude:
|
||||||
|
- projects/rocr-runtime/.github
|
||||||
|
- projects/rocr-runtime/LICENSE.txt
|
||||||
|
- projects/rocr-runtime/*.md
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: rocr_runtime
|
||||||
|
jobs:
|
||||||
|
- template: ${{ variables.CI_COMPONENT_PATH }}/ROCR-Runtime.yml@pipelines_repo
|
||||||
|
parameters:
|
||||||
|
sparseCheckoutDir: projects/rocr-runtime
|
||||||
|
triggerDownstreamJobs: ${{ parameters.triggerDownstreamJobs }}
|
||||||
|
- template: templates/report-summary-check-wrapper.yml
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
variables:
|
||||||
|
- group: common
|
||||||
|
- template: /.azuredevops/variables-global.yml@pipelines_repo
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- name: pipelinesRepoRef
|
||||||
|
type: string
|
||||||
|
default: refs/heads/develop
|
||||||
|
- name: triggerDownstreamJobs
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
repositories:
|
||||||
|
- repository: pipelines_repo
|
||||||
|
type: github
|
||||||
|
endpoint: ROCm
|
||||||
|
name: ROCm/ROCm
|
||||||
|
ref: ${{ parameters.pipelinesRepoRef }}
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- projects/roctracer
|
||||||
|
exclude:
|
||||||
|
- projects/roctracer/.github
|
||||||
|
- projects/roctracer/doc
|
||||||
|
- projects/roctracer/LICENSE
|
||||||
|
- projects/roctracer/README.md
|
||||||
|
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: roctracer
|
||||||
|
jobs:
|
||||||
|
- template: ${{ variables.CI_COMPONENT_PATH }}/roctracer.yml@pipelines_repo
|
||||||
|
parameters:
|
||||||
|
sparseCheckoutDir: projects/roctracer
|
||||||
|
triggerDownstreamJobs: ${{ parameters.triggerDownstreamJobs }}
|
||||||
|
- template: templates/report-summary-check-wrapper.yml
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
stages:
|
||||||
|
- stage: report_successful
|
||||||
|
condition: succeeded()
|
||||||
|
jobs:
|
||||||
|
- template: report-summary-check.yml
|
||||||
|
parameters:
|
||||||
|
checkConclusion: success
|
||||||
|
- stage: report_failed
|
||||||
|
condition: failed()
|
||||||
|
jobs:
|
||||||
|
- template: report-summary-check.yml
|
||||||
|
parameters:
|
||||||
|
checkConclusion: failure
|
||||||
|
- stage: report_cancelled
|
||||||
|
condition: canceled() # note: only 1 L in canceled()
|
||||||
|
jobs:
|
||||||
|
- template: report-summary-check.yml
|
||||||
|
parameters:
|
||||||
|
checkConclusion: cancelled
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
parameters:
|
||||||
|
- name: checkConclusion
|
||||||
|
type: string
|
||||||
|
default: success
|
||||||
|
values:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
- cancelled
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: report_summary_check
|
||||||
|
displayName: 'Report check status: ${{ parameters.checkConclusion }}'
|
||||||
|
variables:
|
||||||
|
- group: systems-assistant
|
||||||
|
pool:
|
||||||
|
vmImage: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- checkout: none
|
||||||
|
- task: Bash@3
|
||||||
|
displayName: Install GitHub CLI
|
||||||
|
condition: always()
|
||||||
|
inputs:
|
||||||
|
targetType: 'inline'
|
||||||
|
script: |
|
||||||
|
(type -p wget >/dev/null || (sudo apt update && sudo apt install wget -y)) \
|
||||||
|
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
|
||||||
|
&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
|
||||||
|
&& cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
|
||||||
|
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
|
||||||
|
&& sudo mkdir -p -m 755 /etc/apt/sources.list.d \
|
||||||
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
|
||||||
|
&& sudo apt update \
|
||||||
|
&& sudo apt install gh jq -y
|
||||||
|
- task: Bash@3
|
||||||
|
displayName: Report CI status to GitHub PR Summary Check
|
||||||
|
condition: always()
|
||||||
|
env:
|
||||||
|
APP_ID: $(APP_ID)
|
||||||
|
APP_INSTALLATION_ID: $(APP_INSTALLATION_ID)
|
||||||
|
APP_PRIVATE_KEY: $(APP_PRIVATE_KEY)
|
||||||
|
inputs:
|
||||||
|
targetType: 'inline'
|
||||||
|
script: |
|
||||||
|
if [[ ! "$(Build.SourceBranch)" =~ ^refs/pull/ ]]; then
|
||||||
|
echo "This is not a PR build. Exiting."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# APP_PRIVATE_KEY is generated with `base64 app_private_key.pem | tr -d '\n'`
|
||||||
|
echo "$APP_PRIVATE_KEY" | base64 -d > app_private_key.pem
|
||||||
|
chmod 600 app_private_key.pem
|
||||||
|
create_jwt() {
|
||||||
|
local header=$(echo -n '{"alg":"RS256","typ":"JWT"}' | openssl base64 -e | tr -d '=' | tr '/+' '_-' | tr -d '\n')
|
||||||
|
local payload=$(echo -n "{\"iat\":$(date +%s),\"exp\":$(($(date +%s) + 600)),\"iss\":\"$APP_ID\"}" | openssl base64 -e | tr -d '=' | tr '/+' '_-' | tr -d '\n')
|
||||||
|
local unsigned_token="${header}.${payload}"
|
||||||
|
local signature=$(echo -n "$unsigned_token" | openssl dgst -sha256 -sign "app_private_key.pem" | openssl base64 -e | tr -d '=' | tr '/+' '_-' | tr -d '\n')
|
||||||
|
echo "${unsigned_token}.${signature}"
|
||||||
|
}
|
||||||
|
JWT=$(create_jwt)
|
||||||
|
export GH_TOKEN=$(curl -sSX POST \
|
||||||
|
-H "Authorization: Bearer $JWT" \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
"https://api.github.com/app/installations/$APP_INSTALLATION_ID/access_tokens" | jq -r .token)
|
||||||
|
|
||||||
|
PR_NUMBER=$(echo "$(Build.SourceBranch)" | sed 's|refs/pull/\([0-9]*\)/.*|\1|')
|
||||||
|
PR_HEAD_SHA=$(curl -s "https://api.github.com/repos/ROCm/rocm-systems/pulls/$PR_NUMBER" | jq -r '.head.sha')
|
||||||
|
CHECK=$(curl -s "https://api.github.com/repos/ROCm/rocm-systems/commits/$PR_HEAD_SHA/check-runs" | jq -r '.check_runs[] | select(.name == "Azure CI Summary")')
|
||||||
|
CHECK_ID=$(echo "$CHECK" | jq -r '.id')
|
||||||
|
CHECK_SUMMARY=$(echo "$CHECK" | jq -r '.output.summary')
|
||||||
|
CHECK_TEXT=$(echo "$CHECK" | jq -r '.output.text')
|
||||||
|
|
||||||
|
if [[ -z "$CHECK_ID" ]]; then
|
||||||
|
echo "No Azure CI Summary check found for commit $PR_HEAD_SHA"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if [[ "$CHECK_SUMMARY" == *"$(Build.BuildId)"* ]]; then
|
||||||
|
CHECK_SUMMARY=$(echo "$CHECK_SUMMARY" | sed "s/buildId=$(Build.BuildId)[^|]*|[^|]*|/buildId=$(Build.BuildId)) | ${{ parameters.checkConclusion }} |/")
|
||||||
|
fi
|
||||||
|
if [[ "$CHECK_TEXT" == *"$(Build.BuildId)="* ]]; then
|
||||||
|
CHECK_TEXT=$(echo "$CHECK_TEXT" | sed "s/$(Build.BuildId)=[^;]*;/$(Build.BuildId)=${{ parameters.checkConclusion }};/")
|
||||||
|
fi
|
||||||
|
|
||||||
|
CHECK_STATUS=$(echo "$CHECK_TEXT" | grep -q "pending" && echo "in_progress" || echo "completed")
|
||||||
|
CHECK_CONCLUSION=$(echo "$CHECK_TEXT" | grep -q -e "cancelled" -e "failure" && echo "failure" || echo "success")
|
||||||
|
|
||||||
|
if [[ "$CHECK_STATUS" == "completed" ]]; then
|
||||||
|
gh_output=$(gh api repos/ROCm/rocm-systems/check-runs/$CHECK_ID \
|
||||||
|
-X PATCH \
|
||||||
|
-f "name=Azure CI Summary" \
|
||||||
|
-f "head_sha=$PR_HEAD_SHA" \
|
||||||
|
-f "status=$CHECK_STATUS" \
|
||||||
|
-f "conclusion=$CHECK_CONCLUSION" \
|
||||||
|
-f "output[title]=Azure CI Summary" \
|
||||||
|
-f "output[summary]=$CHECK_SUMMARY" \
|
||||||
|
-f "output[text]=$CHECK_TEXT")
|
||||||
|
else
|
||||||
|
gh_output=$(gh api repos/ROCm/rocm-systems/check-runs/$CHECK_ID \
|
||||||
|
-X PATCH \
|
||||||
|
-f "name=Azure CI Summary" \
|
||||||
|
-f "head_sha=$PR_HEAD_SHA" \
|
||||||
|
-f "output[title]=Azure CI Summary" \
|
||||||
|
-f "output[summary]=$CHECK_SUMMARY" \
|
||||||
|
-f "output[text]=$CHECK_TEXT")
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Reported status '${{ parameters.checkConclusion }}' to summary check: $(echo "$gh_output" | jq -r '.id')"
|
||||||
|
if [[ "$CHECK_STATUS" == "completed" ]]; then
|
||||||
|
echo "All checks completed with overall conclusion: $CHECK_CONCLUSION"
|
||||||
|
else
|
||||||
|
echo "Some checks are still in progress: $CHECK_STATUS"
|
||||||
|
fi
|
||||||
|
echo "Summary check URL: $(echo "$gh_output" | jq -r '.html_url')"
|
||||||
@@ -66,47 +66,17 @@ def resolve_dependencies(projects, dependencies):
|
|||||||
|
|
||||||
def main(argv=None) -> None:
|
def main(argv=None) -> None:
|
||||||
"""Main function to process the projects and output those to be run."""
|
"""Main function to process the projects and output those to be run."""
|
||||||
# Mathlib build+test dependency tree as defined in Azure CI and TheRock
|
# Systems build+test dependency tree as defined in Azure CI and TheRock
|
||||||
math_dependencies = {
|
systems_dependencies = {
|
||||||
"shared/tensile": {},
|
|
||||||
"projects/rocrand": {},
|
|
||||||
"projects/hiprand": {"projects/rocrand"},
|
|
||||||
"projects/rocfft": {"projects/hiprand"},
|
|
||||||
"projects/hipfft": {"projects/rocfft"},
|
|
||||||
"projects/rocprim": {},
|
|
||||||
"projects/hipcub": {"projects/rocprim"},
|
|
||||||
"projects/rocthrust": {"projects/rocprim"},
|
|
||||||
"projects/hipblas-common": {},
|
|
||||||
"projects/hipblaslt": {"projects/hipblas-common"},
|
|
||||||
"projects/rocblas": {"projects/hipblaslt"},
|
|
||||||
"projects/rocsolver": {"projects/rocprim", "projects/rocblas"},
|
|
||||||
"projects/rocsparse": {"projects/rocprim", "projects/rocblas"},
|
|
||||||
"projects/hipblas": {"projects/rocsolver"},
|
|
||||||
"projects/hipsolver": {"projects/rocsolver", "projects/rocsparse"},
|
|
||||||
"projects/hipsparse": {"projects/rocsparse"},
|
|
||||||
"projects/hipsparselt": {"projects/hipsparse"},
|
|
||||||
"projects/miopen": {"projects/rocrand", "projects/hipblas"}
|
|
||||||
}
|
}
|
||||||
# Azure pipeline IDs for each project, to be populated as projects are enabled
|
# Azure pipeline IDs for each project, to be populated as projects are enabled
|
||||||
definition_ids = {
|
definition_ids = {
|
||||||
"shared/tensile": 305,
|
"projects/rocprofiler-register": 327,
|
||||||
"projects/rocrand": 274,
|
|
||||||
"projects/hiprand": 275,
|
|
||||||
"projects/rocfft": 282,
|
|
||||||
"projects/hipfft": 283,
|
|
||||||
"projects/rocprim": 273,
|
|
||||||
"projects/hipcub": 277,
|
|
||||||
"projects/rocthrust": 276,
|
|
||||||
"projects/hipblas-common": 300,
|
|
||||||
"projects/hipblaslt": 301,
|
|
||||||
"projects/hipsparselt": 309,
|
|
||||||
"projects/rocblas": 302,
|
|
||||||
"projects/rocsolver": 303,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
args = parse_arguments(argv)
|
args = parse_arguments(argv)
|
||||||
projects = read_file_into_set(args.subtree_file)
|
projects = read_file_into_set(args.subtree_file)
|
||||||
projects_to_run = resolve_dependencies(projects, math_dependencies)
|
projects_to_run = resolve_dependencies(projects, systems_dependencies)
|
||||||
|
|
||||||
for project in projects_to_run:
|
for project in projects_to_run:
|
||||||
if project in definition_ids:
|
if project in definition_ids:
|
||||||
|
|||||||
Reference in New Issue
Block a user