forked from GPUOpen-Drivers/llpc
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (51 loc) · 2.17 KB
/
upload-coverage-report.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Upload Coverage Report
on:
workflow_run:
workflows:
- LLPC Docker CI
types:
- completed
jobs:
retrieve-and-upload:
if: github.repository == 'GPUOpen-Drivers/llpc' && github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
name: "Configuration: ${{ matrix.config_tag }}"
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
config_tag: ["release_clang_coverage", "release_clang_shadercache_coverage_assertions"]
steps:
- name: Download code coverage artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: check-amdllpc-docker.yml
run_id: ${{ github.event.workflow_run.id }}
name: cov_report_${{ matrix.config_tag }}
path: "coverage_report/"
- name: Download PR number artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: check-amdllpc-docker.yml
run_id: ${{ github.event.workflow_run.id }}
name: pr_num
path: "pr_num/"
- name: Read originating PR number from artifact
run: |
NUM=$(cat pr_num/pr_num.txt)
echo "PR_NUM=$NUM" | tee -a $GITHUB_ENV
- name: Authenticate with Google Cloud
id: 'auth'
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCR_KEY }}'
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Upload code coverage report to Google Cloud bucket
run: gsutil -m cp -r "coverage_report/*" "gs://amdvlk-llpc-github-ci-artifacts-public/coverage_${{ matrix.config_tag }}_${{ github.event.workflow_run.id }}/"
- name: Add comment with code coverage report link on originating PR
uses: peter-evans/[email protected]
with:
issue-number: ${{ env.PR_NUM }}
body: |
The LLPC code coverage report is available at https://storage.googleapis.com/amdvlk-llpc-github-ci-artifacts-public/coverage_${{ matrix.config_tag }}_${{ github.event.workflow_run.id }}/index.html.
Configuration: ${{ matrix.config_tag }}.