Skip to content

Commit 0bcfdca

Browse files
authored
Use NVIDIA-gha runners to collect test results (NVIDIA#2830)
Signed-off-by: Tyler Burt <[email protected]>
1 parent d2b7b64 commit 0bcfdca

File tree

1 file changed

+33
-16
lines changed

1 file changed

+33
-16
lines changed

.github/workflows/blossom-ci.yml

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ on:
2020
types: [created]
2121
workflow_dispatch:
2222
inputs:
23-
platform:
24-
description: 'runs-on argument'
25-
required: false
26-
args:
27-
description: 'argument'
23+
sha:
24+
description: 'commit sha'
25+
required: true
26+
test_result:
27+
description: 'test result'
2828
required: false
29+
test_results_url:
30+
description: 'test results url'
31+
required: true
2932
jobs:
3033
Authorization:
3134
name: Authorization
@@ -35,7 +38,7 @@ jobs:
3538

3639
# This job only runs for pull request comments
3740
if: |
38-
github.event.comment.body == '/build' && (github.actor == 'niukuo' || github.actor == 'niukuo')
41+
startsWith( github.event.comment.body, '/bot' ) && contains('["niukuo", "tburt-nv"]', github.actor)
3942
steps:
4043
- name: Check if comment is issued by authorized person
4144
run: blossom-ci
@@ -78,14 +81,28 @@ jobs:
7881
CI_SERVER: ${{ secrets.CI_SERVER }}
7982
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8083

81-
Upload-Log:
82-
name: Upload log
83-
runs-on: blossom
84-
if : github.event_name == 'workflow_dispatch'
84+
Upload-Test:
85+
name: Upload test results
86+
runs-on: linux-amd64-cpu4
87+
if: github.event_name == 'workflow_dispatch'
8588
steps:
86-
- name: Jenkins log for pull request ${{ fromJson(github.event.inputs.args).pr }} (click here)
87-
run: blossom-ci
88-
env:
89-
OPERATION: 'POST-PROCESSING'
90-
CI_SERVER: ${{ secrets.CI_SERVER }}
91-
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89+
- name: Collect test result
90+
run: rm -rf results && mkdir results && cd results && curl --user svc_tensorrt:${{ secrets.ARTIFACTORY_TOKEN }} -L ${{ github.event.inputs.test_results_url }} | tar -xz
91+
- name: Create test summary
92+
id: test_summary
93+
uses: test-summary/action@dist
94+
with:
95+
paths: results/**/results*.xml
96+
- name: Update commit status
97+
uses: actions/github-script@v6
98+
with:
99+
script: |
100+
github.rest.repos.createCommitStatus({
101+
owner: context.repo.owner,
102+
repo: context.repo.repo,
103+
context: 'blossom-ci',
104+
sha: '${{ github.event.inputs.sha }}',
105+
target_url: 'https://github.com/NVIDIA/TensorRT-LLM/actions/runs/' + context.runId,
106+
state: '${{ steps.test_summary.outputs.failed > 0 && 'failure' || github.event.inputs.test_result || 'success' }}',
107+
description: '${{ steps.test_summary.outputs.passed }} passed, ${{ steps.test_summary.outputs.failed }} failed, ${{ steps.test_summary.outputs.skipped }} skipped',
108+
})

0 commit comments

Comments
 (0)