perf(release): overlap server checks and share the mobile bundle (#30… · tmchow/orca@67eb94a · GitHub
Skip to content

Commit 67eb94a

Browse files
authored
perf(release): overlap server checks and share the mobile bundle (stablyai#30990)
* perf(release): overlap server qualification and reuse mobile bundle * fix(ci): preserve draft suppression for independent compatibility checks * test(release): update template download cache policy contract
1 parent c09af97 commit 67eb94a

5 files changed

Lines changed: 147 additions & 21 deletions

‎.github/workflows/node-server-tests.yml‎

Lines changed: 20 additions & 13 deletions

‎config/scripts/ci-dependency-download-cache.test.mjs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,9 @@ describe('CI dependency download caches', () => {
290290
).jobs
291291
const warmer = platformJobs['warm-windows'].steps.find((step) => step.uses === installer)
292292
expect(action.inputs['cache-pnpm-store'].default).toBe('true')
293-
expect(persistence.with['cache-pnpm-store']).toBe("${{ runner.os != 'Windows' }}")
293+
expect(persistence.with['cache-pnpm-store']).toBe(
294+
"${{ !inputs.build_template && runner.os != 'Windows' }}"
295+
)
294296
expect(ssh.with['cache-pnpm-store']).toBe('false')
295297
expect(warmer.with['cache-pnpm-store']).toBe('false')
296298
expect(warmer.with['native-runtime']).toBe('node')

‎config/scripts/node-server-change-scope.test.mjs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,11 +571,11 @@ it('keeps every platform job and runs them when detection is skipped or fails',
571571
expect(workflow.jobs.persistence.strategy.matrix.os).toContain('needs.changes.outputs.runners')
572572
for (const jobName of ['linux_glibc_floor', 'linux_musl']) {
573573
const job = workflow.jobs[jobName]
574-
expect(job.needs).toEqual(['changes', 'persistence', 'mobile_web_bundle'])
574+
expect(job.needs).toEqual(['changes', 'mobile_web_bundle'])
575575
// The containers never install mobile/, and orcad refuses to build without the page.
576576
expect(job.steps.some((step) => step.with?.name === 'orcad-mobile-web-bundle')).toBe(true)
577577
expect(job.if).toContain("needs.mobile_web_bundle.result == 'success'")
578-
expect(job.if).toContain("needs.persistence.result == 'success'")
578+
expect(job.if).not.toContain('needs.persistence')
579579
expect(job.if).toContain("needs.changes.outputs.qualification != 'false'")
580580
expect(job.if).toContain("needs.changes.outputs.should_run != 'false'")
581581
expect(job.strategy.matrix.os).toEqual(['ubuntu-22.04', 'ubuntu-24.04-arm'])

‎config/scripts/node-server-native-compat-scope.test.mjs‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ it('builds server glibc slots on glibc 2.28 and the compat slot on glibc 2.17 (d
327327
expect(floor.env).toMatchObject({ CC: 'gcc', CXX: 'g++' })
328328

329329
const compat = workflow.jobs.linux_glibc217_compat
330-
expect(compat.needs).toEqual(['changes', 'persistence'])
330+
expect(compat.needs).toBe('changes')
331331
// Only the floor builds orcad, so only it waits for the page.
332332
expect(compat.if).toContain(
333333
floor.if.slice(0, -3).replace(" && needs.mobile_web_bundle.result == 'success'", '')
@@ -366,15 +366,19 @@ it.each([
366366
{ expected: true, native: 'false', event: 'workflow_dispatch' },
367367
{ expected: true, native: 'false', template: true },
368368
{ expected: true, native: 'false', ref: 'other-commit' },
369-
{ expected: false, native: 'true', persistence: 'failure' },
370-
{ expected: false, native: 'true', persistence: 'cancelled' },
371-
{ expected: false, native: 'true', persistence: 'skipped' },
369+
{ expected: true, native: 'true', persistence: 'failure' },
370+
{ expected: true, native: 'true', persistence: 'cancelled' },
371+
{ expected: true, native: 'true', persistence: 'skipped' },
372+
{ expected: false, native: 'true', draft: true },
372373
{ expected: false, native: 'true', qualification: 'false' },
373374
{ expected: false, native: 'true', shouldRun: 'false' },
374375
{ expected: false, native: 'true', cancelled: true }
375376
])('evaluates the hosted native job guard with %j', (scenario) => {
376377
const context = {
377-
github: { event_name: scenario.event ?? 'pull_request' },
378+
github: {
379+
event_name: scenario.event ?? 'pull_request',
380+
event: { pull_request: { draft: scenario.draft ?? false } }
381+
},
378382
inputs: { build_template: scenario.template ?? false, ref: scenario.ref ?? '' },
379383
needs: {
380384
persistence: { result: scenario.persistence ?? 'success' },
Lines changed: 113 additions & 0 deletions

0 commit comments

Comments
 (0)