22
22
whl :
23
23
description : " whl to test (variable appears late binding so unusable outside 'download artifact')"
24
24
type : string
25
- required : true
25
+ run_id :
26
+ description : run id of the BUILD job that generated the assets
27
+ type : string
26
28
27
29
# makes workflow manually callable
28
30
workflow_dispatch :
44
46
type : string
45
47
required : true
46
48
whl :
47
- description : " whl to test (variable appears late binding so unusable outside 'download artifact')"
49
+ description : " whl to test (provide either whl or run_id)"
50
+ type : string
51
+ run_id :
52
+ description : run id of the BUILD job that generated the assets
48
53
type : string
49
- required : true
50
54
51
55
jobs :
52
56
@@ -87,11 +91,33 @@ jobs:
87
91
88
92
- name : download whl
89
93
id : download
94
+ if : ${{ inputs.whl != '' }}
90
95
uses : actions/download-artifact@v4
91
96
with :
92
97
name : ${{ inputs.whl }}
93
98
path : ${{ inputs.whl }}
94
99
100
+ # GCP
101
+ - name : ' Authenticate to Google Cloud'
102
+ id : auth
103
+ uses : google-github-actions/auth@v2.1.3
104
+ with :
105
+ project_id : ${{ secrets.GCP_PROJECT }}
106
+ workload_identity_provider : ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
107
+ service_account : ${{ secrets.GCP_GHA_SA }}
108
+
109
+ - name : ' Set up Cloud SDK'
110
+ uses : ' google-github-actions/setup-gcloud@v2'
111
+ with :
112
+ version : ' >= 473.0.0'
113
+
114
+ - name : download assets
115
+ if : ${{ inputs.run_id != '' }}
116
+ uses : neuralmagic/nm-actions/actions/gcp-download-assets@v1.1.0
117
+ with :
118
+ bucket_source : ${{ secrets.GCP_BUILD_ML_ASSETS2 }}
119
+ run_id : ${{ inputs.run_id }}
120
+
95
121
- name : run tests
96
122
id : test
97
123
uses : ./.github/actions/test/
@@ -109,19 +135,6 @@ jobs:
109
135
whl : ${{ inputs.whl }}
110
136
test_status : ${{ steps.test.outputs.status }}
111
137
112
- # GCP
113
- - name : ' Authenticate to Google Cloud'
114
- id : auth
115
- uses : google-github-actions/auth@v2.1.3
116
- with :
117
- project_id : ${{ secrets.GCP_PROJECT }}
118
- workload_identity_provider : ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
119
- service_account : ${{ secrets.GCP_GHA_SA }}
120
-
121
- - name : ' Set up Cloud SDK'
122
- uses : ' google-github-actions/setup-gcloud@v2'
123
- with :
124
- version : ' >= 473.0.0'
125
138
126
139
- name : copy results to GCP
127
140
run : |
0 commit comments