Skip to content

ci: Skip the costly Kotlin library build on unrelated PRs - #779

Open
cdecker wants to merge 1 commit into
mainfrom
2026m11-skip-kotlin-on-prs
Open

cdecker wants to merge 1 commit into
mainfrom
2026m11-skip-kotlin-on-prs

Conversation

@cdecker

@cdecker cdecker commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Kotlin library workflow runs one macOS job that release-compiles the sdk for eleven targets (4 Android ABIs, 3 iOS, 2 macOS, 2 Linux via zig, 2 Windows via cargo-xwin), generates the Kotlin bindings and runs the gradle build. That takes 75-115 minutes per run (recent: 1h54, 1h24, 1h25, 1h13, 1h34, 1h20, 1h19) and it gates every PR even though a PR never publishes anything. #776, a libs/gl-plugin change, waited on it after all other checks had passed.

Change

PRs now run the build only when they touch what the bindings are actually built from:

  • libs/gl-sdk*/** (gl-sdk, gl-sdk-android, gl-sdk-cli, gl-sdk-napi)
  • libs/uniffi-bindgen/**, libs/proto/**
  • build/**, Taskfile.yml, Cargo.toml
  • the workflow file itself

No cheap smoke variant is added: Rust Unit Test already compiles the whole libs workspace on the host for every PR, so plain Rust changes keep pre-merge coverage; what only this workflow checks is the cross-target and gradle packaging, and binding-path PRs still get that in full.

The full build still runs, unchanged, for:

  • every push to main — the trigger previously named master, which this repository no longer has, so main was never built after a merge (all branch-push runs of this workflow are tags; none on main). Naming main closes that gap and keeps continuous coverage feeding the gl-sdk releases and the Maven Central pipeline downstream,
  • every gl-sdk-* release tag,
  • manual workflow_dispatch runs (new).

Also fixes the "Puiblish to Maven" step-name typo.

Merge-safety

Branch protection on main requires only the linux status check; Kotlin library is not a required check, so PRs whose paths don't match simply merge without this check. No workflow consumes glsdk-artifact; the Maven Central release pipeline consumes the bundle attached to gl-sdk-v* releases, which the tag trigger still builds.

Note for #768

#768 rewrites this same on: block (adding workflow_call, which is unaffected by the path filter) but keeps pull_request: {} unfiltered. When it is rebased, keep the paths: above, or it silently restores the full build to every PR.

The Kotlin library job cross compiles the sdk for eleven release
targets and then runs the gradle build, 75 to 115 minutes per run, on
every PR, even though a PR publishes nothing. PRs now run it only when
they touch the bindings, the proto sources or the build files, the Rust
unit tests still compile the libs workspace on the host, and branch
protection requires just `linux`, so unrelated PRs merge without
waiting for this check.

The full build still runs for pushes to main, gl-sdk-* release tags and
workflow_dispatch. The push trigger said master, a branch this
repository no longer has, so main was never built after a merge;
naming main closes that gap and keeps the gl-sdk release and the Maven
Central pipeline downstream continuously fed.

This branch has not been deployed

No deployments
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