mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
ci(adhoc): start the 12-vCPU Mac packaging jobs after template qualification (#34327)
Both arch jobs overlapped ~2.5 min of setup with qualification, then polled for the template for 400-560 s on the most expensive runner we use. Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
@@ -250,11 +250,19 @@ jobs:
|
||||
echo "tag=$TAG" >>"$GITHUB_OUTPUT"
|
||||
|
||||
build-adhoc-mac-arch:
|
||||
needs: [resolve-ref, orcad-template-support, release-javascript, prepare-adhoc-mac-release]
|
||||
# Template qualification gates packaging after desktop preparation.
|
||||
needs:
|
||||
[
|
||||
resolve-ref,
|
||||
orcad-template-support,
|
||||
orcad-template,
|
||||
release-javascript,
|
||||
prepare-adhoc-mac-release
|
||||
]
|
||||
# Start after template qualification: overlapping ~2.5 min of preparation left both 12-vCPU Macs idle ~7 min.
|
||||
if: >-
|
||||
!cancelled() && github.repository == 'stablyai/orca' &&
|
||||
needs.orcad-template-support.result == 'success' &&
|
||||
(needs.orcad-template.result == 'success' || needs.orcad-template-support.outputs.ships != 'true') &&
|
||||
needs.release-javascript.result == 'success' &&
|
||||
needs.prepare-adhoc-mac-release.result == 'success'
|
||||
# Signing environment must restrict deployments to main after MAC_CERTS/password, APPLE_ID/app password/team and hourly App secrets move there; referencing it alone enforces nothing.
|
||||
@@ -374,30 +382,6 @@ jobs:
|
||||
# Leave build identity unset: telemetry accepts only official stable/rc, so branch artifacts stay silent.
|
||||
ORCA_DIAGNOSTICS_TOKEN_URL: https://www.onorca.dev/diagnostics/token
|
||||
|
||||
- name: Wait for the qualified orcad template
|
||||
if: needs.orcad-template-support.outputs.ships == 'true'
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const deadline = Date.now() + 30 * 60_000
|
||||
while (Date.now() < deadline) {
|
||||
const jobs = await github.paginate(github.rest.actions.listJobsForWorkflowRun, {
|
||||
...context.repo, run_id: context.runId, filter: 'latest', per_page: 100
|
||||
})
|
||||
const lanes = jobs.filter(job => job.name.startsWith('orcad-template / '))
|
||||
const failed = lanes.find(job => job.status === 'completed' &&
|
||||
['failure', 'cancelled', 'timed_out', 'action_required', 'startup_failure'].includes(job.conclusion))
|
||||
if (failed) throw new Error(`Template qualification failed: ${failed.name}`)
|
||||
const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, {
|
||||
...context.repo, run_id: context.runId, per_page: 100
|
||||
})
|
||||
const ready = artifacts.some(artifact => artifact.name === 'orcad-template' && !artifact.expired)
|
||||
const completed = lanes.length > 0 && lanes.every(job => job.status === 'completed')
|
||||
if (ready && (process.env.WAIT_FOR_TEMPLATE_COMPLETION !== '1' || completed)) return
|
||||
await new Promise(resolve => setTimeout(resolve, 15_000))
|
||||
}
|
||||
throw new Error('Timed out waiting for the qualified orcad template')
|
||||
|
||||
# After the app build so nothing that cleans out/ can drop it; electron-builder ships it.
|
||||
- name: Download the orcad deployment template
|
||||
if: needs.orcad-template-support.outputs.ships == 'true'
|
||||
|
||||
Reference in New Issue
Block a user