Skip to content

ci: share sccache setup across workflows#811

Open
abnobdoss wants to merge 1 commit into
apache:mainfrom
abnobdoss:ci/share-sccache-setup
Open

ci: share sccache setup across workflows#811
abnobdoss wants to merge 1 commit into
apache:mainfrom
abnobdoss:ci/share-sccache-setup

Conversation

@abnobdoss

@abnobdoss abnobdoss commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What

Add two composite actions for sccache:

  • .github/actions/setup-sccache sets the sccache environment, restores the cache, resolves the MSVC compiler version on Windows, and starts mozilla-actions/sccache-action.
  • .github/actions/save-sccache shows sccache stats for every run and saves the cache only on main branch runs.

The Test, SQL Catalog, sanitizer, C++ linter, and AWS workflows now pass only their cache key prefix at each call site.

This is part of the CI work discussed in #799.

Notes

The existing cache key shapes are preserved for the current CMake workflow legs. The Meson Windows leg now also gets the MSVC-version key suffix, matching the other Windows sccache legs and avoids cache misses after runner image compiler updates.

The MSVC version source also changes for the existing Windows legs (test and SQL catalog): the inline cl.exe banner parse is replaced by reading VCToolsVersion.default.txt via vswhere, which is more reliable and does not require cl.exe on PATH. This produces a different version format (e.g. 14.44.35217 vs 19.44.35217.1), so all Windows caches will miss once and reseed on the first post-merge main run.

Third-party actions stay pinned inside composite action.yml files, which are covered by the ASF allowlist checker glob.

Validation

  • Validated builds in fork: Test, AWS, SQL Catalog, ASAN/UBSAN, and pre-commit.
  • The C++ linter workflow ignores .github/**, so this PR does not exercise that workflow until a source-touching run or post-merge.

@abnobdoss abnobdoss force-pushed the ci/share-sccache-setup branch from 67d0a82 to 996a694 Compare July 4, 2026 00:50
@abnobdoss abnobdoss force-pushed the ci/share-sccache-setup branch 3 times, most recently from 4f1e4ee to 155e484 Compare July 16, 2026 04:41
@abnobdoss abnobdoss force-pushed the ci/share-sccache-setup branch from 155e484 to 493a9e1 Compare July 16, 2026 04:57
@abnobdoss abnobdoss marked this pull request as ready for review July 16, 2026 05:41
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