Repository navigation
ci: build deb and rpm packages and a Homebrew formula - #3
Merged
Merged
Conversation
…eleases Add system packages for the Java profiler, as the TypeScript profiler has them. scripts/release-package.py builds, from the jar of a release, the jar, rc-profiler-java_<v>.tar.gz (the launcher and the jar, which the Homebrew formula installs), and SHA256SUMS; and for a stable tag with --system-packages also a deb and an rpm for amd64 and arm64, and the formula. The deb and rpm carry a Java runtime made with jlink from the Temurin JDK 21.0.13 pinned by checksum in distribution/jdk.lock.json, holding only the modules the jar needs (jdeps, plus jdk.compiler), so they need nothing else installed. The launcher finds the jar and that runtime through ../lib/rc-profiler-java. The formula depends on openjdk@21 and sets JAVA_HOME to it unless the user has set one. The release workflow builds these for a stable tag, installs the packages in clean Ubuntu, Debian and Rocky Linux containers, and publishes SHA256SUMS in place of checksums.txt, because the Homebrew and package repositories look for that name. A prerelease still gets the jar and the archive. After a stable release it dispatches rc-profiler-java-release-published to homebrew-tools and packages, as the TypeScript profiler does; that needs the package-distribution environment and a HOMEBREW_REPO_DISPATCH_TOKEN secret, and skips with a notice without one. test.yml gets a packages job that builds and installs the packages on every pull request, so a change to the packaging is checked before a release. The helpers have 19 unit tests. Not verified locally: building the real packages downloads and runs the pinned JDK's jlink and jdeps, which this change's author could not do, so the first real run of the packages job is the check.
colinjlacy
approved these changes
Nov 18, 2026
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.
Add system packages for the Java profiler, as the TypeScript profiler has them.
scripts/release-package.py builds, from the jar of a release, the jar, rc-profiler-java_.tar.gz (the launcher and the jar, which the Homebrew formula installs), and SHA256SUMS; and for a stable tag with --system-packages also a deb and an rpm for amd64 and arm64, and the formula. The deb and rpm carry a Java runtime made with jlink from the Temurin JDK 21.0.13 pinned by checksum in distribution/jdk.lock.json, holding only the modules the jar needs (jdeps, plus jdk.compiler), so they need nothing else installed. The launcher finds the jar and that runtime through ../lib/rc-profiler-java. The formula depends on openjdk@21 and sets JAVA_HOME to it unless the user has set one.
The release workflow builds these for a stable tag, installs the packages in clean Ubuntu, Debian and Rocky Linux containers, and publishes SHA256SUMS in place of checksums.txt, because the Homebrew and package repositories look for that name. A prerelease still gets the jar and the archive. After a stable release it dispatches rc-profiler-java-release-published to homebrew-tools and packages, as the TypeScript profiler does; that needs the package-distribution environment and a HOMEBREW_REPO_DISPATCH_TOKEN secret, and skips with a notice without one.
test.yml gets a packages job that builds and installs the packages on every pull request, so a change to the packaging is checked before a release. The helpers have 19 unit tests.