Skip to content

ci: speed up CI by gating PRs on analyze/test only#116

Merged
krazyjakee merged 1 commit into
masterfrom
claude/affectionate-mclean-e517d2
Jun 11, 2026
Merged

ci: speed up CI by gating PRs on analyze/test only#116
krazyjakee merged 1 commit into
masterfrom
claude/affectionate-mclean-e517d2

Conversation

@krazyjakee

Copy link
Copy Markdown
Contributor

Summary

CI was slow because the build job compiled release binaries for all four platforms (Web, Android, Linux, Windows) on every push and PR. Each of those runners independently repeated the checkout → pub getbuild_runner codegen that the analyze job already did, so a single CI run did ~5 Flutter setups + 4 release builds.

The release builds are smoke-test artifacts, not the merge gate (analyze is). This change restricts them to run only on demand.

What changed

  • ci.yml — the build job now runs only on manual workflow_dispatch (if: github.event_name == 'workflow_dispatch'). PRs and pushes now run just the analyze (codegen + analyze + test) gate.
  • ci.yml — removed the now-unused skip_build workflow_call input.
  • ci.yml — dropped -v verbose flags from the Android/Linux/Windows smoke builds (faster log streaming, no functional change).
  • release.yml — dropped the defunct with: skip_build: true from its ci.yml call. Tagged releases still gate on analyze/test and build every platform via their own matrix (unchanged).

Net effect

  • PR/push CI drops from ~5 Flutter setups + 4 release builds to a single analyze/test job.
  • Tagged releases are unaffected (release.yml builds all platforms itself).
  • On-demand smoke builds remain available via the Actions "Run workflow" button.

Reviewer notes

  • No application code touched — workflow files only.
  • grep confirms no remaining references to skip_build or inputs. in .github/workflows/.

🤖 Generated with Claude Code

PR/push CI previously compiled release builds for all four platforms on
every run, each repeating the checkout/pub-get/codegen the analyze job
already did. The build artifacts are smoke tests, not the merge gate, so
this dwarfed CI time for no merge-blocking value.

Restrict ci.yml's build job to manual workflow_dispatch only; PRs now run
just the analyze/test gate. Tagged releases already build every platform
in release.yml, so its skip_build plumbing is removed as redundant. Also
drop unused -v verbose flags from the smoke builds.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@krazyjakee krazyjakee left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review findings — ranked by severity

No bugs found. All findings are informational.


✅ [Critical] workflow_call path is correct

When release.yml calls ci.yml via workflow_call, GitHub Actions sets github.event_name to 'workflow_call' inside the called workflow — not the outer event name. So if: ${{ github.event_name == 'workflow_dispatch' }} correctly evaluates to false and skips the build job. The release.yml call path therefore gates only on analyze, as intended.

✅ [High] No remaining skip_build / inputs. references

grep confirms both workflow files are clean. The removal is complete.

✅ [Medium] workflow_call: with no sub-keys is valid

After the inputs: block is removed, workflow_call: in on: has no sub-properties. Valid YAML and valid GitHub Actions syntax — same pattern used by pull_request: and workflow_dispatch: in this file.

✅ [Low] -v removal is intentional

Verbose flags removed from ci.yml smoke-test builds (Android/Linux/Windows). release.yml keeps -v for tagged-release builds where verbose logs matter for diagnosing native-archive fetch failures.

ℹ️ [Info] release.yml's ci job has no needs: [verify] (pre-existing)

verify (version-string check) and ci (Flutter analyze/test) run in parallel on every tag push. In the failure case (wrong tag version) CI wastes a few runner minutes. Not a regression from this PR — the trade-off is faster happy-path releases, and build already gates on both.


No code changes needed. The PR is logically correct, comments are accurate, and the removal of skip_build cleanly transfers responsibility for the guard from callers to the workflow itself.


Generated by Claude Code

@krazyjakee krazyjakee merged commit 29d4c3b into master Jun 11, 2026
2 checks passed
@krazyjakee krazyjakee deleted the claude/affectionate-mclean-e517d2 branch June 11, 2026 17:04
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.

1 participant