Skip to content

ci: key the CmdStan cache on the runner image version - #628

Merged
GidonFrischkorn merged 1 commit into
developfrom
hotfix-cmdstan-cache-image
Oct 28, 2026
Merged

GidonFrischkorn merged 1 commit into
developfrom
hotfix-cmdstan-cache-image

Conversation

@GidonFrischkorn

Copy link
Copy Markdown
Collaborator

The macOS R-CMD-check job has failed on develop since the merges of #622, #623 and #624. Every Stan compile stops with:

fatal error: file '.../MacOSX.sdk/usr/include/c++/v1/__hash_table' has been modified since the precompiled header 'stan/src/stan/model/model_header.hpp.gch/...' was built

The CmdStan cache cmdstan-macOS-macOS-Tahoe-26.6.2-2.40.0 was saved on runner image macos-26-arm64 20261021.0445 and restored on the older 20261013.0424; GitHub serves both while the new image rolls out. Both images run macOS 26.6.2 with Xcode 26.6, so the OS-release key from #625 matched, but the SDK headers carry different timestamps and clang rejects the cached precompiled header.

This adds the runner's ImageVersion to the cache key in all four workflows that cache CmdStan. A new runner image now costs one CmdStan rebuild (2-4 minutes per OS, measured on the #625 runs) instead of a failed check. Where ImageVersion is unset, the key still works and just lacks the image part.

The macOS key can only be confirmed after the merge, since macOS runs Stan on push only; the Ubuntu job on this PR shows the new key in its "Cache CmdStan" step.

macOS R-CMD-check on develop failed every Stan compile: a CmdStan cache
saved on runner image macos-26-arm64 20261021.0445 was restored on the
older 20261013.0424. Both run macOS 26.6.2 with Xcode 26.6, so the OS
release key matched, but the SDK headers differ in timestamp and clang
rejects the cached precompiled header.

The key now also includes the runner's ImageVersion, so a new image
costs one CmdStan rebuild (2-4 min per OS) instead of a broken compile.
@GidonFrischkorn
GidonFrischkorn merged commit 6271154 into develop Oct 28, 2026
7 checks passed
@GidonFrischkorn
GidonFrischkorn deleted the hotfix-cmdstan-cache-image branch October 28, 2026 07:54
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.

1 participant