Packaging scopes' build trees (1.3-2 GB each, 6 scopes) were ~90% installer
outputs and jlink runtime duplicates that actions/cache negation patterns
are unable to exclude (actions/toolkit#713). Saving ~7 GB per run kept the
repo at the 10 GB cache cap and LRU-evicted build-jar/android/windows-rust
entries within minutes of being saved. Packaging scopes are now
restore-only: they fall back to the build-jar scope via restore-keys, and
their outputs regenerate from the JAR artifact in a couple of minutes.
Also remove the temporary cache-inspect workflow (purpose served).
- drop the tag-push trigger: caches saved by tag-scoped runs are visible
to that tag only (GitHub docs, 'Restrictions for accessing a cache'),
so every tag build started cold and warmed nobody
- dispatch instead, preferably from the default branch; the tag does not
need to exist, publish creates it at the built commit; warn when
dispatching from a non-default branch
- merge check-build into resolve-version (one runner + one checkout
instead of two)
- merge record-build into publish: save the build-success marker at the
start of publish
- fix softprops input: overwrite_existing does not exist upstream
(silently ignored); the valid input is overwrite_files
The ARM64 fix had grown into duplicated, arch-conditional steps inside
windows-package: rust-toolchain, rust cache, a binary verification loop and a
build step, all gated on matrix.arch. That is per-architecture data, not control
flow, so it belongs in a matrix.
windows-common (x64-only) becomes windows-tools, a 2-entry matrix over
{x64 -> windows-latest -> x86_64-pc-windows-msvc} and
{arm64 -> windows-11-arm -> aarch64-pc-windows-msvc}. Each leg builds the
installer tooling natively — cargo has no --target, so it builds for the host —
and uploads it as windows-rust-tools-<arch>. windows-package then downloads
that artifact unconditionally again, and its two setup-java-gradle calls
collapse into one driven by a matrix key.
The ARM leg still needs its own step for the packaging JDK
(ensure-windows-arm64-jdk.cmd); that one is genuinely arch-specific rather than
matrix data.
This keeps the invariant that matters: fromchat-pack selects the embedded
payload with std::env::consts::ARCH, so each architecture's installer must be
compiled for its own target or it reports the wrong CPU and finds no payload.
The ARM64 installer still died with "installer has no payload for this CPU
(x86_64)". Two installers, two architectures, and each needs tooling compiled
for its own target.
fromchat-pack embeds the app-image payload, and payload.rs selects it with
std::env::consts::ARCH — the stub's own compile-time architecture, not the
machine's. The stub is a Windows x64 binary, so on ARM64 it runs emulated,
reports x86_64, and looks for an x86_64 payload that the ARM-only bundle never
embeds. The ARM asset was therefore structurally incapable of installing.
So the ARM64 leg now builds its own aarch64-pc-windows-msvc tooling on the ARM
runner (cargo build --release --workspace with no --target builds for the
host) instead of downloading the x64 artifact, which is now x64-only.
ensureWindowsRustBinaries is existence-based and rebuilds when binaries are
absent, so this leg is self-healing if the explicit build step ever misfires.
The Rust cache key was also arch-blind — windows-rust-${{ runner.os }}-v3-... —
so an x64 target/ directory could be restored onto the ARM runner and make the
"binaries ready" check pass with the wrong architecture. It now includes
${{ runner.arch }} and is bumped to v4, so the two legs cannot share a cache.
This also reverts the PROCESSOR_ARCHITEW6432 sniffing added in 35492fc: with
natively compiled stubs it is unnecessary, and it would have been actively
wrong — an x64 installer running emulated on ARM64 should install the x64
payload, not be redirected to the arm64 one.
Neither is related to the jmods work; both were visible only on the
windows-11-arm runner.
1. Gradle hung at build shutdown. The runner's ambient JAVA_HOME is Temurin
21.0.12 aarch64, and JDK-8371740 — a LinkedTransferQueue race fixed only
in JDK 26 — makes Gradle on Windows ARM64 hang whenever it runs on JDK
21+, failing the build after the installer was already written with
"Timeout waiting for concurrent jobs to complete". Gradle's own repo and
linroid/Ketch both carry workarounds for this. Pin the Gradle JVM to 17,
which is what the x64 job already does; Adoptium ships no Windows aarch64
17, hence the new `java-distribution` input and zulu there. Packaging is
unaffected: resolvePackagingJdkHome() rejects 17 as too old and falls back
to the Java 25 toolchain JDK for jpackage.
2. "Ensure ARM64 packaging JDK" stalled for minutes and looked hung. The
script only scanned C:\Program Files\Eclipse Adoptium, but hosted ARM64
runners ship their ARM64 Temurin 21 under the hostedtoolcache, so the scan
missed it and fell through to downloading a ~180 MB JDK via
Invoke-WebRequest + Expand-Archive. Re-running the job showed it still
installing 3m24s later. Accept JAVA_HOME when it reports os.arch=aarch64 —
the script's own comments already call Java 21 good enough as the Gradle
daemon JVM.
beta5 proved the ProGuard fix: Build JAR passed in 9m35s, and Windows
(x64 + ARM) and macOS (arm64 + Intel) all packaged successfully. Only the
two Linux jobs failed, at :app:desktop:createRuntimeImage — jlink exits 1
because jlink defaults its --module-path to <javaHome>/jmods, the same
directory ProGuard needs. So the jmods gap bites twice: ProGuard degrades
into a wall of warnings, jlink just dies.
macOS/Windows runners happen to resolve a JDK 25 that still ships jmods;
ubuntu-latest's /usr/lib/jvm only has the jmods-less Temurin 25. Point the
Linux jobs at Zulu 25 via the setup action's desktop-jdk input, and stop
the packaging step's `export FROMCHAT_PACKAGING_JDK="$JAVA_HOME"` from
clobbering it with Temurin 17 (hence ${VAR:-$JAVA_HOME}).
Also widen the Gradle guard to name jlink, since that is what actually
fails on a jmods-less JDK during packaging.
Compose Desktop's AbstractProguardTask builds ProGuard's -libraryjars by
walking <javaHome>/jmods and nothing else. Adoptium stopped shipping the
jmods/ directory in JDK 25 archives (verified: 0 jmods entries in both the
linux/x64 and macOS/aarch64 Temurin 25.0.4.1 tarballs, vs 71 for Temurin
17), so on the runners the desktop packaging JDK resolves to
/usr/lib/jvm/temurin-25-jdk-amd64 and ProGuard gets no JDK whatsoever.
Every class then fails to resolve java.lang.Object — 1.3M
"can't find superclass or interface java.lang.Object" warnings, followed by
"Please correct the above warnings first".
This is why the Java 25 toolchain bump broke every release while the
v1.2.0-beta release on the toolchain 17 build kept working, and why a local
build with the JetBrains Runtime (which does ship jmods) succeeded while CI
did not. ProGuard's version was never the cause; 7.10.0 was still kept
because it is what understands this project's Kotlin 2.4 metadata.
Install Zulu 25 (still ships jmods) in the desktop-proguard job and export
it as FROMCHAT_PACKAGING_JDK; setup-java runs before Temurin 17 so JAVA_HOME
stays on 17 for Gradle and the Android build. resolvePackagingJdkHome() now
warns loudly when the JDK it picks has no jmods/, instead of leaving it to
ProGuard's wall of warnings.
release.yml already builds Windows x64 and arm64 installers as part of
the full release pipeline; the standalone workflow only produced a
beta-only x64 artifact, never succeeded, and is superseded.
Cache the entire windows-setup target tree plus ~/.cargo; split restore/save; skip cargo build when all release binaries are present.
Co-authored-by: Cursor <cursoragent@cursor.com>
Save always uses the job scope key; do not reuse cache-primary-key from a partial restore (e.g. Android saving build-jar).
Co-authored-by: Cursor <cursoragent@cursor.com>
Fail early when the release already exists; workflow_dispatch can set force_update_release to overwrite it.
Co-authored-by: Cursor <cursoragent@cursor.com>
Cache project .gradle/ and root build/ (execution history + outputs), restore git mtimes after checkout, skip set-version when unchanged, and bump cache keys to v2 with build-jar restore fallback.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use a single glob for platform artifacts and a separate step for Android; multiline pattern values are not supported.
Co-authored-by: Cursor <cursoragent@cursor.com>
download-artifact accepts one glob pattern, not multiline lists; split platform and Android downloads. Scope Gradle build cache keys per job and use read-only setup-gradle on parallel jobs to avoid cache reservation races.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove test/smoke jobs and ci-*.sh scripts; embed compile, packaging, and version setup directly in release.yml.
Co-authored-by: Cursor <cursoragent@cursor.com>
Split Windows builds into shared x64 prep and arch-specific packaging, add comprehensive caching, verification scripts, and a PR smoke workflow.
Co-authored-by: Cursor <cursoragent@cursor.com>