Skip to content

Add cache built OpenSSL/wolfSSL deps in PR builders to speedup builds in CI#412

Open
aidangarske wants to merge 1 commit into
wolfSSL:masterfrom
aidangarske:ci-cache-build-deps
Open

Add cache built OpenSSL/wolfSSL deps in PR builders to speedup builds in CI#412
aidangarske wants to merge 1 commit into
wolfSSL:masterfrom
aidangarske:ci-cache-build-deps

Conversation

@aidangarske

@aidangarske aidangarske commented Jun 24, 2026

Copy link
Copy Markdown
Member

Description

Adds a reusable composite action .github/actions/cache-build-deps that caches
the built openssl-install / wolfssl-install (and openssl-source for
patched builds) keyed by resolved commit SHA, so build-wolfprovider.sh skips
the OpenSSL/wolfSSL configure+make on a cache hit. Wired into the normal-PR
from-source builders: cmdline, simple, smoke-test, seed-src,
fips-ready.

Pattern mirrors the existing multi-compiler.yml cache (resolve-ref -> SHA ->
actions/cache): a stable tag resolves to a fixed SHA (cached across runs);
master resolves to current HEAD (rebuilt only when upstream moves). The unit
under test (wolfprov-install) is never cached.

Measured effect (verified on this PR: cold run 1 -> warm run 2)

Workflow cold avg (from scratch) warm avg (cache hit) speedup
cmdline 283 s 52 s 5.4x
simple (incl. replace-default rows) ~262 s 41 s 6.4x
smoke-test 308 s 49 s 6.3x
seed-src 298 s 38 s 7.8x
fips-ready ~300 s 44 s ~7x

Per heavy config the from-scratch dep build is ~5:30-5:50; on a warm cache the
build step drops to ~30-50 s (about 5 min saved per cached job). All builders
passed on both the cold and warm runs.

Validation

  • Warm-run log confirms master rows hit on the resolved HEAD SHA
    ("Cache hit ... Cache restored successfully"): master is reused when the commit
    is unchanged and rebuilds when it moves; stable tags hit unconditionally.
  • Replace-default / FIPS-baseline rows (simple.yml) also cache openssl-source
    so the source-reading mismatch checks pass on a hit.
  • Variant token encodes every build-config dimension (compiler/debug/
    replace-default/seed-src/fips) so no wrong-config cache hit.
  • FIPS bundle cached by stable version; wget only runs on a cache miss.

@aidangarske aidangarske marked this pull request as ready for review June 24, 2026 16:43
@aidangarske aidangarske changed the title ci: cache built OpenSSL/wolfSSL deps in PR builders Add cache built OpenSSL/wolfSSL deps in PR builders to speedup builds in CI Jun 24, 2026
@aidangarske aidangarske requested a review from ColtonWilley June 24, 2026 17:12
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