diff --git a/.azure_pipelines/job_templates/pytorch-template-unix.yml b/.azure_pipelines/job_templates/pytorch-template-unix.yml index d52dd27faa7..2d0fc18b529 100644 --- a/.azure_pipelines/job_templates/pytorch-template-unix.yml +++ b/.azure_pipelines/job_templates/pytorch-template-unix.yml @@ -48,4 +48,14 @@ jobs: _TS_CLONE_P: $(TS_CLONE_PASSWORD) _TS_P: $(TS_PAT) _TS_SM_P: $(TS_SM_PAT) + _AZUREML_CLONE_PASSWORD: $(AZUREML_CLONE_PASSWORD) + _SPPASSWORD: $(SPPASSWORD) displayName: Run PyTorch Unit Tests + + # Tests results are available outside the docker container since + # the current directory is mounted as a volume of the container. + - task: PublishTestResults@2 + condition: always() + inputs: + testResultsFiles: '**/test-*.xml' + testRunTitle: 'Publish test results for Python' diff --git a/.azure_pipelines/job_templates/pytorch-template-win.yml b/.azure_pipelines/job_templates/pytorch-template-win.yml index 76027d83633..5d370431301 100644 --- a/.azure_pipelines/job_templates/pytorch-template-win.yml +++ b/.azure_pipelines/job_templates/pytorch-template-win.yml @@ -47,3 +47,11 @@ jobs: _TS_P: $(TS_PAT) _TS_SM_P: $(TS_SM_PAT) displayName: Run PyTorch Unit Tests + + # Tests results are available outside the docker container since + # the current directory is mounted as a volume of the container. + - task: PublishTestResults@2 + condition: always() + inputs: + testResultsFiles: '**\test-*.xml' + testRunTitle: 'Publish test results for Python' diff --git a/.azure_pipelines/job_templates/wheel-wait-job-template.yml b/.azure_pipelines/job_templates/wheel-wait-job-template.yml index c01f8c4201f..7d5ffe7b4d1 100644 --- a/.azure_pipelines/job_templates/wheel-wait-job-template.yml +++ b/.azure_pipelines/job_templates/wheel-wait-job-template.yml @@ -8,7 +8,7 @@ steps: connectionType: 'connectedServiceName' serviceConnection: circleciconn method: 'POST' - headers: '{"Content-Type":"application/json", "BranchName":"$(TARGET_BRANCH_TO_CHECK_PR)", "JobName":"$(TARGET_CIRCLECI_PR)", "PlanUrl":"$(System.CollectionUri)", "ProjectId":"$(System.TeamProjectId)", "HubName":"$(System.HostType)", "PlanId":"$(System.PlanId)", "JobId":"$(System.JobId)", "TimelineId":"$(System.TimelineId)", "TaskInstanceId":"$(System.TaskInstanceId)", "AuthToken":"$(System.AccessToken)"}' + headers: '{"Content-Type":"application/json", "BranchName":"$(_TARGET_BRANCH_TO_CHECK)", "JobName":"$(TARGET_CIRCLECI_BUILD_PR)", "PlanUrl":"$(System.CollectionUri)", "ProjectId":"$(System.TeamProjectId)", "HubName":"$(System.HostType)", "PlanId":"$(System.PlanId)", "JobId":"$(System.JobId)", "TimelineId":"$(System.TimelineId)", "TaskInstanceId":"$(System.TaskInstanceId)", "AuthToken":"$(System.AccessToken)"}' body: '' urlSuffix: 'api/JobStatus' waitForCompletion: true diff --git a/.azure_pipelines/job_templates/wheel-wait-template.yml b/.azure_pipelines/job_templates/wheel-wait-template.yml index 6f04f504dab..3b8d321b02a 100644 --- a/.azure_pipelines/job_templates/wheel-wait-template.yml +++ b/.azure_pipelines/job_templates/wheel-wait-template.yml @@ -1,14 +1,23 @@ # Initiate 5 agentless-server waiting jobs to check on the # status of PR artifact builds, for a maximum wait time of -# 5 * 60 min =300 minutes. These jobs will pass immediately +# 8*60 min=480 mins. These jobs will pass immediately # once targeted CircleCI build is ready. jobs: +# Ensure that ample time is afforded to the PR CircleCI builds to start +# building artifacts. +- job: Delay5MinForCircleCI + pool: server + steps: + - task: Delay@1 + inputs: + delayForMinutes: '5' + - job: checkjob1 pool: server timeoutInMinutes: 60 + dependsOn: Delay5MinForCircleCI continueOnError: true - steps: - template: wheel-wait-job-template.yml @@ -17,7 +26,6 @@ jobs: timeoutInMinutes: 60 dependsOn: checkjob1 continueOnError: true - steps: - template: wheel-wait-job-template.yml @@ -26,7 +34,6 @@ jobs: timeoutInMinutes: 60 dependsOn: checkjob2 continueOnError: true - steps: - template: wheel-wait-job-template.yml @@ -35,7 +42,6 @@ jobs: timeoutInMinutes: 60 dependsOn: checkjob3 continueOnError: true - steps: - template: wheel-wait-job-template.yml @@ -44,6 +50,29 @@ jobs: timeoutInMinutes: 60 dependsOn: checkjob4 continueOnError: true - + steps: + - template: wheel-wait-job-template.yml + +- job: checkjob6 + pool: server + timeoutInMinutes: 60 + dependsOn: checkjob5 + continueOnError: true + steps: + - template: wheel-wait-job-template.yml + +- job: checkjob7 + pool: server + timeoutInMinutes: 60 + dependsOn: checkjob6 + continueOnError: true + steps: + - template: wheel-wait-job-template.yml + +- job: checkjob8 + pool: server + timeoutInMinutes: 60 + dependsOn: checkjob7 + continueOnError: true steps: - template: wheel-wait-job-template.yml diff --git a/.azure_pipelines/pytorch-tests-pipeline.yml b/.azure_pipelines/pytorch-tests-pipeline.yml index 4b6ac825549..8246c2a1e24 100644 --- a/.azure_pipelines/pytorch-tests-pipeline.yml +++ b/.azure_pipelines/pytorch-tests-pipeline.yml @@ -7,14 +7,26 @@ # 2) runs custom PyTorch unit-tests on PyTorch # wheels generated during PR builds. +resources: + webhooks: + - webhook: GitHubPyTorchPRTrigger + connection: GitHubPyTorchPRTriggerConnection + filters: + - path: repositoryName + value: pytorch_tests + stages: - stage: 'EnsureArtifactsReady' displayName: 'Ensure PyTorch PR Artifacts are ready' jobs: - template: job_templates/wheel-wait-template.yml + variables: + _TARGET_BRANCH_TO_CHECK: ${{ parameters.GitHubPyTorchPRTrigger.TARGET_BRANCH_TO_CHECK_AZ_DEVOPS_PR}} - stage: 'PRCustomTests' displayName: 'Run custom unit tests on PyTorch wheels' + dependsOn: EnsureArtifactsReady + condition: succeeded() jobs: - template: job_templates/pytorch-template-unix.yml parameters: @@ -24,7 +36,7 @@ stages: PR_Custom_Tests: _PYTHON_VERSION: $(PYTHON_VERSION_PR) _CUDA_BUILD_VERSION: $(CUDA_BUILD_VERSION_PR) - _TARGET_CIRCLECI_BUILD: $(TARGET_CIRCLECI_PR) - _TARGET_BRANCH_TO_CHECK: $(TARGET_BRANCH_TO_CHECK_PR) + _TARGET_CIRCLECI_BUILD: $(TARGET_CIRCLECI_BUILD_PR) + _TARGET_BRANCH_TO_CHECK: ${{ parameters.GitHubPyTorchPRTrigger.TARGET_BRANCH_TO_CHECK_AZ_DEVOPS_PR}} _DOCKER_IMAGE: $(DOCKER_IMAGE_PR) _RUN_TESTS: $(RUN_TESTS_PR)