Skip to content

Split release artifacts by runtime architecture - #124

Open
Ekozmaster wants to merge 1 commit into
mainfrom
dev/e-man/release-artifact-matrix
Open

Ekozmaster wants to merge 1 commit into
mainfrom
dev/e-man/release-artifact-matrix

Conversation

@Ekozmaster

Copy link
Copy Markdown
Collaborator
  • Publish one self-contained JAR per loader and architecture with stable release names.
  • Deduplicate the GitHub installer runtime and assemble the host-specific JAR during installation.
  • Exercise packaged JARs in release benchmarks and exclude PDB symbols from release payloads.

@Ekozmaster
Ekozmaster requested a review from sambvfx as a code owner November 25, 2026 23:01

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The design holds up and CI is green. I'd fix the first two inline items before merge; the rest are minor. This review comes from reading the code only. I did not run the PowerShell or Python tests.

Checked and fine: release asset names and hash checks line up across Gradle, validate-project-state.ps1, the Python registry and the installer. The installer pins a Java that matches the host architecture, so the single-architecture JAR it builds matches the JVM. PDB exclusion is applied in both the packaging rules and the verification step.

Other notes without a good inline anchor:

  • CI now runs build and test once per architecture (build.yml uses packageMatrix for every target job), roughly doubling target-job time. Only the packaging step needs the architecture.
  • Low risk: running a release benchmark with --no-build after a dev or Tracy launch in the same game folder may keep that runtime. The dev install overwrites remix-sdk/ without resetting .rtx-remix-version, so with an unchanged mod version the marker still matches and the mod skips re-extraction.

Written by Devin

Comment thread build.gradle Resolved
Comment thread build.gradle Resolved
Comment thread packaging/installer.ps1 Resolved
Comment thread packaging/installer.ps1 Resolved
Comment thread packaging/installer.ps1 Resolved
Comment thread versions/1.21.1/forge/build.gradle Resolved
Comment thread AGENTS.md Resolved
@Ekozmaster
Ekozmaster force-pushed the dev/e-man/release-artifact-matrix branch from 7240496 to bacd95a Compare November 25, 2026 23:36
@Ekozmaster

Copy link
Copy Markdown
Collaborator Author

Also addressed the two unanchored notes: CI now builds/tests once per loader and runs architecture-specific verification in separate packaging jobs, and packaged benchmark preparation deletes the extraction marker so --no-build cannot retain a prior development or Tracy runtime.

@devin-ai-integration

Copy link
Copy Markdown

Re-review of bacd95a: all points from my earlier review are addressed, and I found nothing new that blocks the merge. All 16 checks pass. I read the code only and didn't run it.

  • Mixed runtime sources: checkRuntimeSourceHomogeneity runs again in stageReleaseArchive (doFirst). The .local-sdk-source markers are optional task inputs, so adding or removing a local override invalidates the Sync. The marker is also excluded from payloads and rejected by both verifiers.
  • runtime/ verification: verifyRuntimePayloadDirectory runs after the Sync. It requires both architectures' d3d9.dll and remixbridge.dll, rtx.conf, the runtime textures, the rtx-remix/ payload and the licenses. It rejects PDB files, Python files, NvRemixBridge.exe, marker files and unexpected textures.
  • Wrong-architecture JAR: Install-ModFiles now lists the bundled remix-sdk-* architectures and fails with the packaged and required architecture instead of a component collision. A test covers this.
  • Nits: $input is renamed to $sourceStream. Published-name matching is built from packagedArtifact.pattern and architectures. The Forge and NeoForge indentation is fixed. AGENTS.md now says "equivalent".
  • CI: build and test run once per loader, and verifyPackageJar{Win64,Arm64} runs in separate package jobs that the required build job waits on.
  • Benchmark: install_packaged_build deletes .rtx-remix-version in the game directory, which is where DirectoryRuntimePayload reads it, so a --no-build release run re-extracts the packaged runtime.

Written by Devin

@sambvfx sambvfx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed at bacd95a. The split itself works. I built the Fabric win64 JAR and the thin component from this branch and ran Install-ModFiles against them: the assembled JAR has the same 1,138 entries as the Gradle JAR with identical content for every entry, and the other architecture's runtime is left out. I could not build the ARM64 side locally (no ARM64 MSVC libraries on this machine), so that part rests on CI.

I'd like four things settled before this merges; details are inline.

  1. The Forge and NeoForge package checks no longer run in PR CI.
  2. remixbridge.pdb is no longer kept anywhere.
  3. releaseArchive ignores -Parch and always needs the ARM64 toolchain.
  4. prepare_packaged is required on every launcher, with no fallback.

The other inline comments are smaller and fine as follow-ups.

Two things without a line in the diff:

  • Bundle layout. Anything that takes the JAR from the bundle's mods/<loader>/ now gets a component without a runtime. I'm checking the consumers I know of separately; please hold the merge until I confirm.
  • Stale wording.
    • docs/GETTING_STARTED.md lines 76-77 and 553 still say package rejects mixed runtime sources.
    • Lines 263 and 557 still show -Parch=win64 for releaseArchive and as the way around a missing ARM64 toolset.
    • Line 573 still says "dual-architecture artifacts".
    • .github/ISSUE_TEMPLATE/bug_report.yml:52 still shows the old stamped file name.
    • The new AGENTS.md sentence "assembles ... into an equivalent self-contained JAR published separately for launcher installs" doesn't parse; I think it wants "equivalent to the self-contained JAR published separately".

Comment thread versions/1.21.1/forge/build.gradle Outdated
].each { name ->
if (!entries.contains(name)) {
throw new GradleException("Forge package is missing ${name}")
packageJarArchives.each { packageArch, packageArchive ->

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These checks no longer run in PR CI. They hang off the aggregate verifyPackageJar, but the new package jobs run only verifyPackageJarWin64 / verifyPackageJarArm64. The Forge win64 job log for this commit shows packageJarWin64 and verifyPackageJarWin64 and nothing else. releaseArchive on its own skips them too, since it now depends only on verifyInstallerThinJar; the release workflow is still covered through package. The same applies to versions/1.21.1/neoforge/build.gradle.

Suggest attaching the loader checks to each task in verifyPackageJarTasks (and ideally to the thin component), or having the CI job run package.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 459d1f4: Forge and NeoForge artifact checks are now attached to every architecture-specific verifier in verifyPackageJarTasks, so the per-arch CI jobs execute them.

from(new File(repoRoot, "build/native/${arch}")) {
into "native/remix-sdk-${arch}"
include 'remixbridge.dll', 'remixbridge.pdb'
include 'remixbridge.dll'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remixbridge.pdb is now kept nowhere. The JAR used to carry it and the verifier required it. docs/GETTING_STARTED.md now says release symbols are published by the runtime producer, but the bridge is built here, and neither stageReleaseAssets nor release.yml keeps its PDB. A crash log with frames in remixbridge.dll from a release could not be symbolized.

Dropping it from the JAR is fine. Suggest keeping the per-architecture PDB as a release workflow artifact and correcting the doc sentence.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Still open at 142a5e3: the JAR drops remixbridge.pdb, nothing in stageReleaseAssets or release.yml keeps it, and docs/GETTING_STARTED.md still says the runtime producer publishes release symbols, which does not cover the bridge built here.

I'm fine with either keeping the per-architecture PDB as a release workflow artifact in this PR, or deferring it to an issue and fixing the doc sentence now. Which do you prefer?

Comment thread build.gradle
group = 'build'
dependsOn declaredLoaders.collect { "${it.projectPath}:verifyPackageJar" }
dependsOn declaredLoaders.collect { "${it.projectPath}:verifyInstallerThinJar" }
dependsOn fetchRuntimeSdkTasks.values(), compileNativeTasks.values(), fetchRuntimeTexturesTask

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

releaseArchive -Parch=win64 no longer narrows. This depends on every compileNative and fetchRuntimeSdk task, so the bundle always needs the ARM64 toolchain. gradlew releaseArchive "-PmcVersion=1.21.1" -Parch=win64 --dry-run schedules compileNativeArm64, and the real build stops here with "No MSVC toolset ... has the ARM64 C++ libraries". Before this PR the same command built a win64 bundle, and docs/GETTING_STARTED.md still shows it.

Suggest letting -Parch narrow the staged runtime (the installer already copes with one architecture), or saying in the docs that the bundle always needs both toolchains.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Resolved in 459d1f4 by making the contract explicit: the GitHub installer is always universal. releaseArchive, stageReleaseArchive, and stageReleaseAssets now reject -Parch before execution with guidance to use package -Parch= for standalone JARs; the docs were updated accordingly.

Comment thread tools/src/rtx_tools/benchmark/runner.py Outdated
# The jar is built, by the step above or by the caller of --no-build; this installs it into the game directory.
client.active().prepare(arch, build=False)
if args.sdk_variant == "release":
client.active().prepare_packaged(arch)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

prepare_packaged is now required on every launcher. ClientLauncher is a protocol and client.use() accepts any implementation, so a launcher written before this method existed fails here with AttributeError on every release-variant run.

Suggest falling back to prepare(arch, build=False) when the active launcher has no prepare_packaged, or giving the method a default that does that.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 459d1f4. Release benchmarks now detect a missing/non-callable prepare_packaged hook and raise an actionable LaunchBlocked compatibility error instead of leaking AttributeError or silently using development preparation.

Comment thread packaging/installer.ps1
if (-not (Test-Path -LiteralPath (Join-Path $selectedSdk 'd3d9.dll') -PathType Leaf)) {
throw "The installer runtime is missing native/remix-sdk-$runtimeArch/d3d9.dll."
}
$assembledJar = New-SessionTempPath "$($provider.Id)-$runtimeArch.jar"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Assembly recompresses about 940 MB at Optimal with no output. It took 40 seconds on a desktop here and will be slower on an ARM64 laptop, so the installer looks hung after "Installing mod files". It also runs after the launcher and loader are prepared, so a missing runtime\ folder is reported late, while INSTALLER_REFERENCE.md says this happens before the game directory changes.

Suggest a step line before assembling, trying Fastest, and moving the runtime presence check to the preflight.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 459d1f4. The selected component and host runtime payload are now preflighted immediately after loader selection, before Java/launcher/game mutations. Assembly has an explicit hold-on message, a roughly-one-minute step label, and elapsed-time completion output. I kept Optimal until we have comparative size/time measurements rather than changing the release compression policy blindly.

if required_runtime not in names or "native/rtx.conf" not in names:
print(f'ERROR: packaged JAR "{mod_jar}" is not self-contained for {arch}.')
return 1
_install_mod_jar(mod_jar, game_dir, loader.installed_jar)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The development install and the player installer both run migrate_resource_packs.ps1; this path does not. After a loader switch in the same game directory, a release benchmark keeps the previous loader's built-in pack ordering. Suggest running the migration here as install_development_build does.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 459d1f4. Packaged benchmark installation now uses the same resource-pack migration helper as development installation, with test coverage for loader/version arguments.

Comment thread settings.gradle Outdated
}
if (!(state.architectures instanceof List)
|| state.architectures.isEmpty()
|| state.architectures.unique().size() != state.architectures.size()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This check never fires. Groovy's List.unique() removes duplicates in place and returns the same list, so both sides are equal. With "architectures": ["win64", "win64", "arm64"], gradlew help succeeds. The PowerShell and Python validators do reject it. Suggest toUnique() or unique(false).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 459d1f4 by comparing architectures.toSet().size() without mutating the source list.

Comment thread tools/src/rtx_tools/prism_launcher.py Outdated
)
if install.packaged_mod_jar(project, mod_loader, arch) is None:
raise LaunchBlocked(f"No packaged {loader.display_name} {arch} mod JAR exists. Rerun without --no-build.")
self._runtime_probe = runtime_compat.warn_if_incompatible(project, arch)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: this probes the runtime REMIX_BUILD selects, but the packaged JAR always embeds remix-runtime/<arch>. With REMIX_BUILD set, a release run checks one runtime and launches another without saying so. Suggest a warning when it is set on this path.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 459d1f4. Packaged preparation now explicitly probes remix-runtime/, which is the runtime embedded by package, so REMIX_BUILD no longer redirects this compatibility check.

@Ekozmaster
Ekozmaster force-pushed the dev/e-man/release-artifact-matrix branch from bacd95a to 459d1f4 Compare December 1, 2026 19:23
Signed-off-by: Emanuel Kozerski <emanuelkoz.97@hotmail.com>
@Ekozmaster
Ekozmaster force-pushed the dev/e-man/release-artifact-matrix branch from 459d1f4 to 142a5e3 Compare December 1, 2026 20:59

@sambvfx sambvfx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed at 142a5e3. Thanks, this covers most of the last round, and I checked it on a build of this commit:

  • The Forge and NeoForge checks now run on each per-architecture verify task; the Fabric and Forge win64 JARs build and verify here.
  • releaseArchive -Parch=win64 stops with the "always universal" message, and package -Parch=win64 still works.
  • The installer preflight runs right after loader selection and rejects a bundle with a missing runtime file. The assembled JAR still matches the Gradle JAR: 1,138 entries, identical content. Assembly took 52 seconds this time, so "about a minute" is a fair message.
  • A launch-blocked error for a launcher without prepare_packaged works for me in place of a fallback.

Two things are left before merge:

  1. remixbridge.pdb. The earlier thread on packaging/runtime-payload.gradle has no reply; I've added a note there.
  2. Bundle README. packaging/INSTALL.md still lists the old mods\<loader>\ folders (inline).

On the bundle layout: the rename to components/ means I need to redo my check of the consumers that read the bundle, so please keep holding the merge until I confirm here.

Not blocking, fine as follow-ups:

  • No test covers Test-ModInstallPayload or the new launch-blocked path in the benchmark runner.
  • The preflight names overcast_thunderstorm_bc6u.dds literally, while the texture list lives in runtime-payload.gradle; a rename there would stop every install at preflight.
  • releaseArchive on its own still runs no Forge or NeoForge checks, since the thin component only goes through verifyInstallerThinJar. The release workflow is covered through package.
  • The AGENTS.md sentence "into an equivalent self-contained JAR published separately" still reads as if the assembled JAR is the published one.

Comment thread packaging/INSTALL.md
| `mods\fabric\` | The verified, self-contained Fabric JAR |
| `mods\forge\` | The verified, self-contained Forge JAR |
| `mods\neoforge\` | The verified, self-contained NeoForge JAR |
| `mods\fabric\` | The verified Fabric loader component |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These three rows still name mods\fabric\, mods\forge\ and mods\neoforge\. The components moved to components\<loader>\ in this push and every other guide was updated; this file becomes the bundle's README.md, so players would look for folders that are not there.

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.

2 participants