Skip to content

CI: more cache coverage, drop redundant triggers and a duplicate build step#4836

Merged
shai-almog merged 1 commit intomasterfrom
ci-cache-tier2
Apr 30, 2026
Merged

CI: more cache coverage, drop redundant triggers and a duplicate build step#4836
shai-almog merged 1 commit intomasterfrom
ci-cache-tier2

Conversation

@liannacasper
Copy link
Copy Markdown
Collaborator

Summary

Round 2 of CI optimizations, building on #4834. All low-risk; no test coverage changes. The remaining structural items (pr.yml Maven+Ant dedupe, iOS port artifact sharing across workflows, dropping push: triggers on test-only workflows) are bigger changes and will land as their own focused PRs.

Changes

  • parparvm-tests.yml: Move cache: 'maven' from the 6th setup-java invocation (a "Restore JDK 8" step) onto the first JDK 8 install. The cache restore now happens before the five JDK installs, not after.
  • scripts-javascript.yml: Add three caches:
    • codenameone-tools (the JDK 8/17 + Maven binaries that setup-workspace.sh downloads itself — was previously the only scripts-*.yml workflow without this cache)
    • scripts/node_modules (npm install of playwright)
    • ~/.cache/ms-playwright (the ~150 MB Chromium binary — on cache hit we use install-deps chromium to install only the OS packages, skipping the browser download)
  • developer-guide-docs.yml + website-docs.yml: Drop the ready_for_review trigger type. The default [opened, synchronize, reopened] covers everything; ready_for_review only fires on draft → ready transitions where the head SHA hasn't changed since the last synchronize, so the workflow has already run.
  • javadocs.yml: Add a paths: filter so it only runs when Java sources, the build script, or the workflow itself change. Previously ran on every PR including pure docs/CI/typo PRs.
  • codeql.yml: Drop timeout-minutes from 360 (6h) to 60. CodeQL on this codebase finishes well under 30 min; a 6-hour ceiling lets a hung run burn money.
  • pr.yml: Remove the "Build CLDC 11 VM" step. It ran the byte-identical ant command as "Build CLDC11 JAR" earlier in the same job:
    ant $ANT_OPTS_ARGS -noinput -buildfile Ports/CLDC11/build.xml jar
    
    Both targeted the same buildfile and the same jar target.

Expected savings

  • scripts-javascript.yml (cache hit): ~3–5 min/run (skips the JDK redownloads in setup-workspace.sh and the Chromium download).
  • parparvm-tests.yml (cache hit): ~30s earlier in the job — small but real.
  • pr.yml: removes one redundant ant invocation × 3 matrix rows.
  • javadocs.yml: zero CI for PRs that don't touch Java sources (was ~31s/run).
  • codeql.yml: bound on a worst-case stuck run.

What I didn't include and why

  • pr.yml Maven + Ant double-build dedupe (M3/M4) — touches the structure of the main PR job; deserves a focused review on its own.
  • iOS port artifact sharing across workflows (M5/M6) — biggest macOS win, but needs a workflow_call reusable workflow and careful artifact-key design.
  • Dropping push: triggers on test-only workflows (L6) — would halve master-merge CI cost but changes the signal model; should be reviewed deliberately.

Test plan

  • All 7 modified workflows parse (verified locally with yaml.safe_load).
  • Confirm Cache restored from key: lines appear for the new cn1-tools / npm / Playwright caches in scripts-javascript.yml on a second run.
  • Confirm parparvm-tests job logs show the cache: maven restore early in the job.
  • Confirm CLDC11 jar is still produced (the first "Build CLDC11 JAR" step still runs unchanged).

🤖 Generated with Claude Code

…d step

Round 2 of CI optimizations. All low-risk; no test coverage changes.

- parparvm-tests.yml: move cache: 'maven' from the 6th setup-java to
  the first JDK 8 install so dependency restore happens before the
  five JDK installs run, not after.
- scripts-javascript.yml: cache codenameone-tools, scripts/node_modules,
  and ~/.cache/ms-playwright; skip the ~150 MB Chromium download on
  cache hit (still installs OS deps via install-deps).
- developer-guide-docs.yml + website-docs.yml: drop ready_for_review
  trigger type (synchronize already covers the relevant transitions).
- javadocs.yml: add path filter so it only runs when Java sources, the
  build script, or the workflow itself change.
- codeql.yml: drop timeout-minutes from 360 (6h) to 60. A hung run
  shouldn't burn 6 hours of compute.
- pr.yml: remove the "Build CLDC 11 VM" step — it ran the byte-identical
  ant command as "Build CLDC11 JAR" earlier in the same job.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: Vale failed (exit code 2) (report)
  • Image references: No unused images detected (report)

@github-actions
Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ByteCodeTranslator: 0 findings (no issues)
    • android: 0 findings (no issues)
    • codenameone-maven-plugin: 0 findings (no issues)
    • core-unittests: 0 findings (no issues)
    • ios: 0 findings (no issues)
  • PMD: 0 findings (no issues) [Report archive]
  • Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@github-actions
Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog shai-almog merged commit d0fd9c1 into master Apr 30, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants