ci: build only the Linux native image per PR#997
Merged
nielspardon merged 1 commit intoJul 9, 2026
Conversation
Take the slow, 10x-billed macOS native-image build off the PR critical path to speed up PR builds: - Build only the Linux native image on PRs, in quick-build mode (--quick-build-native / -Ob). The PR binary is only smoke-tested and never shipped, so trading binary runtime performance for a much faster build is free. - Run the native-image job in parallel with the java/integration jobs instead of after them (dropped the `needs`). - Move macOS native-image coverage to a dedicated workflow that runs on push to main plus a weekly backstop, so macOS-specific native regressions are still caught before the Sunday release. Closes substrait-io#768
benbellick
approved these changes
Jul 9, 2026
benbellick
left a comment
Member
There was a problem hiding this comment.
🚀 this has been a long time coming. Thanks for taking a look!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Speeds up PR builds by taking the slow, 10x-billed macOS native-image build off the PR critical path, without losing macOS coverage.
The native image built on PRs is only used to run the smoke tests (
smoke.sh/tpch_smoke.sh) and is uploaded as a throwaway PR artifact — the shipped release binaries are compiled separately inrelease.yml. That means the runtime performance of the PR binary is irrelevant, which unlocks the cheapest win below.Changes
--quick-build-native(GraalVM-Ob), which skips the expensive optimizing compiles and typically cuts native-image build time ~30–40%. The tradeoff — a slower/larger binary — doesn't matter because the PR binary is only smoke-tested.macOS-latestmatrix entry is dropped from the PR native-image job. The Linux build already validates the GraalVM configuration and runs the full smoke suite; macOS-specific native regressions are rare and now covered out-of-band (see below). macOS runners are the long pole and bill at 10x.needs: [java, integration]so the native-image job starts immediately instead of waiting for the Java + integration jobs to finish.To keep macOS native coverage, a new
native-image-macos.ymlworkflow builds and smoke-tests the macOS native image (full optimization, mirroring the release build) on push tomain(per-merge signal) plus a weekly backstop andworkflow_dispatch. Regressions are still caught promptly, and before the Sunday release build — just not on the per-PR critical path.Notes for reviewers
Build Isthmus Native Image (macOS-latest)) no longer runs. If branch protection requires it, that setting needs updating; the Linux check (Build Isthmus Native Image (ubuntu-latest)) is unchanged.--quick-build-nativewas verified to be a recognized option on thenativeCompiletask (gradle help --task nativeCompile→ "Enables quick build mode").release.ymlis intentionally left untouched — release binaries stay fully optimized on both Linux and macOS.Closes #768
🤖 Generated with AI