Skip to content

build-whisper-stt.yml's cache key silently loses the runner image, so it never busts on a toolchain roll #596

Description

@EtienneLescot

build-whisper-stt.yml keys its build cache on the runner image so that a Xcode/SDK roll invalidates it:

key: whisper-stt-build-${{ matrix.tag }}-${{ env.ImageOS }}-${{ env.ImageVersion }}-${{ hashFiles(...) }}

with a comment explaining exactly why that matters:

the runner image version ($ImageOS/$ImageVersion) is part of the key AND the restore-keys prefix because CMake bakes absolute toolchain paths (e.g. the Xcode SDK's libz.tbd) into the cached build tree — when GitHub rolls the image's Xcode/SDK, those paths vanish and a restored tree fails with "No rule to make target …libz.tbd". Scoping the cache to the image version auto-busts it on every toolchain roll.

It has never worked. Both expressions evaluate to the empty string, on every platform, since the line was written.

The evidence is the repository's own cache list (gh api repos/getopenscreen/openscreen/actions/caches):

whisper-stt-build-win32-x64---2ca5d2c75aac59ca…
whisper-stt-build-darwin-x64---2ca5d2c75aac59ca…
whisper-stt-build-linux-x64---2ca5d2c75aac59ca…
whisper-stt-build-darwin-arm64---2ca5d2c75aac59ca…

Three consecutive hyphens where <ImageOS>-<ImageVersion>- should be.

Why: the env expression context contains only what a workflow, job or step env: block defined. ImageOS and ImageVersion are set by the runner into its own process environment, so they are visible to run: steps as shell variables but not to ${{ env.… }}.

Consequence: the cache is keyed on matrix.tag + the CMakeLists hash alone. After a GitHub image roll, a stale tree with dead absolute SDK paths is restored, and the failure mode is the one the comment predicts — No rule to make target …libz.tbd, on a build nobody changed.

Fix, the same shape used in build-onnxruntime-macos.yml (#595):

- name: Read the runner image
  id: image
  run: echo "tag=${ImageOS:-unknown}-${ImageVersion:-unknown}" >> "$GITHUB_OUTPUT"

then ${{ steps.image.outputs.tag }} in both key: and restore-keys:.

Worth grepping the other workflows for env.Image at the same time — this idiom tends to be copied.

Activity

  1. added
    status: fixed in mainWork is merged into main but may not be in a downloadable release yet.
    status: pending releaseMerged change is waiting for a packaged desktop release.
    on Sep 4, 2026
  2. added this to the Next Release milestone on Sep 4, 2026
  3. github-actions commented on Sep 4, 2026

    @github-actions
    Contributor

    Fixed by #601 and merged into main.

    This change is assigned to the Next Release release milestone and is not necessarily available in the latest downloadable desktop release yet. It is currently marked as status: pending release until a packaged release containing it is published.

  4. added a commit that references this issue on Sep 4, 2026
    92d05a8
  5. EtienneLescot commented on Sep 8, 2026

    @EtienneLescot
    CollaboratorAuthor

    Moved into v1.11.0 as part of the pre-release cut.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: fixed in mainWork is merged into main but may not be in a downloadable release yet.status: pending releaseMerged change is waiting for a packaged desktop release.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions