Repository navigation
[CI] Reuse unchanged tarballs of the LLVM and CUDA JLLs - #15163
Merged
Merged
Conversation
Picks up JuliaPackaging/BinaryBuilder.jl#1455 and JuliaPackaging/BinaryBuilderBase.jl#503, which the reuse of unchanged tarballs relies on.
The *_unified LLVM JLLs carry every supported LLVM version, and CUDA_Runtime and CUDA_Compiler every CUDA toolkit, so bumping one of them rebuilt and re-uploaded all platforms: 968 jobs for the LLVM 23.1.4 bump, of which 824 produced the same tarballs as before. For these projects, plan_reuse.jl now evaluates the recipe at the commit that built the previous release (named in its README), and compares the build description of every platform: sources, script, products, build dependencies and build options. Only platforms that differ are built. Registration keeps the Artifacts.toml entries of the others, pointing at the previous release's tarballs, and takes their metadata from the sidecars that are now published with every release (or, for releases made before this, from unpacking their tarballs once). Everything is rebuilt when the rebuild trigger in the recipe changes, or when the previous release can't be located.
maleadt
force-pushed
the
tb/reuse-tarballs
branch
from
October 21, 2026 07:28
c43ad0f to
1ca618a
Compare
maleadt
marked this pull request as ready for review
October 21, 2026 07:28
Member
Author
|
I'll be rebuilding LLVM today, so I'm going to merge this to test the added functionality. This shouldn't impact other recipes. |
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.
The
*_unifiedLLVM JLLs carry every supported LLVM version, and CUDA_Runtime and CUDA_Compiler every CUDA toolkit. Bumping one version therefore rebuilds and re-uploads every platform. For the LLVM 23.1.4 bump (#15144) that was 968 jobs in the unified JLLs, and 824 of them produced tarballs with the same tree hash as the previous release: about 35 of the build's 51 agent-hours. Registering Clang_unified then re-uploaded 39 GB, which took 25 minutes.This PR builds only the platforms whose build changed, and keeps the previous release's tarballs for the rest.
How it works
.ci/bb1_project/plan_reuse.jlruns from the generator, for an allowlist of projects: the four*_unifiedLLVM recipes, CUDA_Runtime and CUDA_Compiler. It:--meta-json, in today's environment;DirectorySources), script, products, build dependencies, and build options.<project>.reuse.json, which the launcher step uploads as an artifact.Artifacts.tomlentries of reused platforms verbatim, so they still point at the release that built them. Their product metadata comes from the build metadata sidecars, which every release now publishes alongside its tarballs. For releases made before this change, registration downloads and unpacks each tarball once instead.augment_platform_block,init_block, compat bounds, runtime dependencies. Bumping the rebuild trigger rebuilds everything. Any failure while planning falls back to a full build.Builds on
rebuild_jll_package(...; reused_urls), andbuild_optionsin--meta-json.LLVM_full_jllbuild is invisible in meta-json, and the planner refuses to reuse anything.Both are merged; the first commit updates
.ci/bb1_projectto pick them up.Validation
Done locally, re-checked after rebasing onto the Julia 1.13.2 CI environment; this PR touches no recipe, so its CI doesn't exercise any of this.
toolkit_selection.jl, reuses everything.build_13.4.jlrebuilds the 3 CUDA 13.4 platforms.register_package.jlfor LLD_unified, simulating 0.1.10 with v23 at 23.1.3. The push, upload and registration were cut off, andbuildkite-agentwas stubbed.llvm_version=18artifact through its 0.1.9 URL, and runslld.Open questions
Artifacts.tomlchanged in 17 of its 44 commits since March. A precise alternative is to record in each sidecar the shards a build used, and compare those per platform. Is that worth doing before enabling this, or is the trigger bump enough as the way to force rebuilds?Zlib_jlldoesn't trigger a rebuild. It doesn't matter for these recipes, which only repackage LLVM_full or NVIDIA's archives, but it would for general recipes. Pinned and git-sourced dependencies, like LLVM_full, are compared exactly.