-
Notifications
You must be signed in to change notification settings - Fork 73
209 lines (187 loc) · 6.69 KB
/
Copy pathon-pr-vla.yml
File metadata and controls
209 lines (187 loc) · 6.69 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
name: On PR Trigger (VLA)
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
- labeled
branches:
- main
- release-*
- feature-*
- tmp-*
paths:
- "packages/vla-ggml/**"
- ".github/workflows/*-vla.yml"
- ".github/actions/cache-models/**"
workflow_dispatch:
workflow_call:
permissions:
contents: read
pull-requests: read
packages: read
id-token: write
env:
PKG_DIR: packages/vla-ggml
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
label-gate:
name: Authorise (label-gate)
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
outputs:
authorised: ${{ steps.gate.outputs.authorised }}
steps:
- name: Checkout (label-gate action only)
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: .github/actions/label-gate
sparse-checkout-cone-mode: false
- name: Run label-gate
id: gate
uses: ./.github/actions/label-gate
with:
github-token: ${{ secrets.PAT_TOKEN }}
authorize:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
outputs:
allowed: ${{ steps.auth.outputs.allowed }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
- name: Authorize
id: auth
uses: ./.github/actions/authorize-pr
with:
github-token: ${{ github.token }}
verify-fabric-lockstep:
if: needs.authorize.outputs.allowed == 'true'
needs: [authorize]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
- name: Verify qvac-fabric versions are lockstep
id: lockstep
uses: ./.github/actions/verify-qvac-fabric-lockstep
- name: Report verified version
run: 'echo "Verified qvac-fabric version: ${{ steps.lockstep.outputs.version }}"'
sanity-checks:
if: always() && !cancelled() && needs.label-gate.outputs.authorised == 'true' && needs.authorize.outputs.allowed == 'true'
needs: [authorize, verify-fabric-lockstep, label-gate]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
fetch-depth: 0
- name: Run Sanity checks
uses: ./.github/actions/sanity-checks
with:
secret-token: ${{ secrets.GITHUB_TOKEN }}
pat-token: ${{ secrets.PAT_TOKEN }}
run-integration: ${{ needs.authorize.outputs.allowed == 'true' }}
workdir: packages/vla-ggml
cpp-lint:
# Only runs when we have a PR base SHA to diff against. Workflow_dispatch
# has no pull_request context, which would make the diff target empty.
if: always() && !cancelled() && needs.label-gate.outputs.authorised == 'true' && needs.authorize.outputs.allowed == 'true' && github.event_name == 'pull_request_target'
needs: [authorize, label-gate]
uses: ./.github/workflows/cpp-lint.yaml
secrets: inherit
with:
sha: ${{ github.event.pull_request.base.sha }}
pr_head_sha: ${{ github.event.pull_request.head.sha }}
workdir: packages/vla-ggml
cpp-tests:
permissions:
contents: read
packages: read
pull-requests: write
if: always() && !cancelled() && needs.label-gate.outputs.authorised == 'true' && needs.authorize.outputs.allowed == 'true'
needs: [authorize, sanity-checks, label-gate]
uses: ./.github/workflows/cpp-tests-vla.yml
secrets: inherit
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
ts-checks:
if: needs.authorize.outputs.allowed == 'true'
needs: authorize
runs-on: ubuntu-latest
environment: release
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
- name: Set up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # 6.3.0
with:
node-version: 20
- name: Install dependencies
working-directory: packages/vla-ggml
run: npm install
- name: Type declaration check
working-directory: packages/vla-ggml
run: npm run test:dts
- name: Run lint and unit tests
id: run_lint_and_unit_tests
uses: ./.github/actions/run-lint-and-unit-tests
with:
gpr-token: ${{ secrets.GITHUB_TOKEN }}
pat-token: ${{ secrets.GITHUB_TOKEN }}
registry-type: gpr
workdir: packages/vla-ggml
prebuild:
permissions:
contents: write
packages: write
pull-requests: write
id-token: write
if: always() && !cancelled() && needs.label-gate.outputs.authorised == 'true' && needs.authorize.outputs.allowed == 'true'
needs: [authorize, sanity-checks, label-gate]
uses: ./.github/workflows/prebuilds-vla.yml
secrets: inherit
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
integration-tests:
needs: [authorize, prebuild, label-gate]
if: needs.label-gate.outputs.authorised == 'true' && needs.authorize.outputs.allowed == 'true'
permissions:
contents: read
packages: read
id-token: write
uses: ./.github/workflows/integration-test-vla.yml
secrets: inherit
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
run-mobile-integration-tests:
permissions:
contents: read
packages: read
pull-requests: write
id-token: write
if: needs.label-gate.outputs.authorised == 'true' && needs.authorize.outputs.allowed == 'true'
needs: [authorize, prebuild, label-gate]
uses: ./.github/workflows/integration-mobile-test-vla.yml
secrets: inherit
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
merge-guard:
needs: [authorize, verify-fabric-lockstep, sanity-checks, cpp-lint, cpp-tests, prebuild, integration-tests, run-mobile-integration-tests, ts-checks]
if: always() && !cancelled()
uses: ./.github/workflows/public-pr.yml
with:
sanity-checks-status: ${{ needs.verify-fabric-lockstep.result == 'success' && needs.sanity-checks.result == 'success' }}
build-status: ${{ needs.prebuild.result == 'success' }}