Introduce framework to run Azure Pipeline jobs (#1608)

- PR runs targeting develop will require approval from at least one person in a predefined list.
- Nightly runs are separated and will not require approval.
- Sample pytest script is provided for expanding test coverage.
Этот коммит содержится в:
Joseph Macaranas
2025-03-18 17:29:44 -04:00
коммит произвёл GitHub
родитель bd0092e8f1
Коммит 6403afff4a
3 изменённых файлов: 148 добавлений и 0 удалений
+69
Просмотреть файл
@@ -0,0 +1,69 @@
resources:
repositories:
- repository: pipelines_repo
type: github
endpoint: ROCm
name: ROCm/ROCm
variables:
- group: common
- template: /.azuredevops/variables-global.yml@pipelines_repo
- name: pytestFolder
value: '.azuredevops/tests/pytest'
parameters:
- name: pytestList
type: object
default:
- HelloWorld
trigger: none
pr: none
schedules:
- cron: "0 5 * 11-3 *" # 11 PM CST (November - March)
displayName: "Nightly Build (CST)"
branches:
include:
- develop
always: false
- cron: "0 4 * 4-10 *" # 11 PM CDT (April - October)
displayName: "Nightly Build (CDT)"
branches:
include:
- develop
always: false
jobs:
- job: rccl
timeoutInMinutes: 180
pool: rocm-ci_rccl_pool
workspace:
clean: all
steps:
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml@pipelines_repo
parameters:
submoduleBehaviour: recursive
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml@pipelines_repo
parameters:
installEnabled: false
printDiskSpace: false
extraBuildFlags: >-
-DCMAKE_BUILD_TYPE=Release
-DBUILD_TESTS=ON
-DGPU_TARGETS=gfx942
-GNinja
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml@pipelines_repo
parameters:
componentName: rccl
testDir: $(Build.SourcesDirectory)/build/test
testExecutable: './rccl-UnitTests'
testParameters: '--gtest_output=xml:./test_output.xml --gtest_color=yes'
- ${{ each pytestScript in parameters.pytestList }}:
- task: Bash@3
displayName: Test ${{ pytestScript }}
continueOnError: true
inputs:
targetType: inline
workingDirectory: $(Build.SourcesDirectory)/$(pytestFolder)
script: pytest test_${{ pytestScript }}.py
+74
Просмотреть файл
@@ -0,0 +1,74 @@
resources:
repositories:
- repository: pipelines_repo
type: github
endpoint: ROCm
name: ROCm/ROCm
variables:
- group: common
- template: /.azuredevops/variables-global.yml@pipelines_repo
- name: pytestFolder
value: '.azuredevops/tests/pytest'
parameters:
- name: pytestList
type: object
default:
- HelloWorld
trigger: none
pr:
autoCancel: true
branches:
include:
- develop
paths:
exclude:
- .github
- .jenkins
- docs
- '*.md'
- LICENSE.txt
- NOTICES.txt
drafts: false
stages:
- stage: rcclStage
displayName: 'RCCL develop PR'
jobs:
- deployment: rccl_pr_approval
displayName: "CI Run Requires Approval"
environment: rccl
- job: rccl
timeoutInMinutes: 180
pool: rocm-ci_rccl_pool
workspace:
clean: all
steps:
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/checkout.yml@pipelines_repo
parameters:
submoduleBehaviour: recursive
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/build-cmake.yml@pipelines_repo
parameters:
installEnabled: false
printDiskSpace: false
extraBuildFlags: >-
-DCMAKE_BUILD_TYPE=Release
-DBUILD_TESTS=ON
-DGPU_TARGETS=gfx942
-GNinja
- template: ${{ variables.CI_TEMPLATE_PATH }}/steps/test.yml@pipelines_repo
parameters:
componentName: rccl
testDir: $(Build.SourcesDirectory)/build/test
testExecutable: './rccl-UnitTests'
testParameters: '--gtest_output=xml:./test_output.xml --gtest_color=yes'
- ${{ each pytestScript in parameters.pytestList }}:
- task: Bash@3
displayName: Test ${{ pytestScript }}
continueOnError: true
inputs:
targetType: inline
workingDirectory: $(Build.SourcesDirectory)/$(pytestFolder)
script: pytest test_${{ pytestScript }}.py
+5
Просмотреть файл
@@ -0,0 +1,5 @@
import pytest
def TestHelloWorld():
greeting = "Hello, World!"
assert greeting == "Hello, World!"