You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(ci): scope build cache per scheme and save from integration/unit runs (#4198)
PR #4195 keyed the build cache on Package.resolved, which fixed cross-dependency
poisoning. A second failure mode remained: the cache was populated exclusively
by `build_scheme.yml` building `Amplify-Package` on main. Integration test
schemes that link additional frameworks (e.g. SmithyXML via Predictions, S3
via Storage) restored that cache and then failed to link:
Undefined symbol: static SmithyXML.Reader.from(data: Foundation.Data) throws -> SmithyXML.Reader
Undefined symbol: type metadata accessor for SmithyXML.Reader
Root cause: one platform-scoped bucket was shared across schemes with
different module graphs. Fix by scoping the cache per scheme and having
each test workflow save its own bucket on main after a successful run.
Changes:
- Append ${{ inputs.scheme }} to the build cache key in build_scheme.yml,
run_integration_tests.yml, run_unit_tests.yml. Add literal scheme name
in integ_test_auth_webauthn.yml (AuthWebAuthnApp) and integ_test_push_
notifications.yml (PushNotificationHostApp / PushNotificationWatchTests).
- Add a `cache/save` step at the end of each test workflow (integration
and unit) gated on `github.ref_name == 'main'` and a successful test run,
so each scheme populates its own cache bucket on main.
The save steps only run on main, so PR branches continue to consume caches
without producing them. GitHub's per-repo cache LRU will evict least-
recently-used buckets as the per-scheme footprint grows.
0 commit comments