forked from openvinotoolkit/nncf
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (80 loc) · 3.53 KB
/
post_pr_merge.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# With the squash-and-merge strategy that we are employing, the final commit that ends up in the develop branch
# after the PR merge has a brand-new commit SHA that is not equal to the SHA of the last commit in the PR.
# This means that the coverage reports uploaded to Codecov in the course of the (yet unmerged) PR checks will not
# be translated to the ultimate commit in the develop and Codecov will show "missing base report" errors in the UI.
# We don't want to re-run the precommits after PR merge via a separate 'on: push' action on the develop branch, so
# instead will grab the latest coverage report artifact from the just-merged PR and upload it as the report for the
# new commit on develop. Note that this will break if the PR is merged before the coverage artifact for the latest
# PR commit is generated.
name: Post-PR merge actions
permissions: read-all
on:
pull_request_target:
branches:
- develop
types:
- closed
paths-ignore:
- '**/*.md'
- 'docs/**/*'
jobs:
upload-coverage-common:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/upload_coverage_for_develop.yml
with:
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
last_sha_in_pr: ${{ github.event.pull_request.head.sha }}
coverage_artifact_name_in_pr: coverage_common
coverage_flags: COMMON
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
upload-coverage-onnx:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/upload_coverage_for_develop.yml
with:
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
last_sha_in_pr: ${{ github.event.pull_request.head.sha }}
coverage_artifact_name_in_pr: coverage_onnx
coverage_flags: ONNX
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
upload-coverage-openvino:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/upload_coverage_for_develop.yml
with:
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
last_sha_in_pr: ${{ github.event.pull_request.head.sha }}
coverage_artifact_name_in_pr: coverage_openvino
coverage_flags: OPENVINO
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
upload-coverage-torch-cpu:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/upload_coverage_for_develop.yml
with:
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
last_sha_in_pr: ${{ github.event.pull_request.head.sha }}
coverage_artifact_name_in_pr: coverage_pt_cpu
coverage_flags: TORCH
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
upload-coverage-torch-cuda:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/upload_coverage_for_develop.yml
with:
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
last_sha_in_pr: ${{ github.event.pull_request.head.sha }}
coverage_artifact_name_in_pr: coverage_pt_cuda
coverage_flags: TORCH
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
upload-coverage-tensorflow:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/upload_coverage_for_develop.yml
with:
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
last_sha_in_pr: ${{ github.event.pull_request.head.sha }}
coverage_artifact_name_in_pr: coverage_tensorflow
coverage_flags: TENSORFLOW
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}