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 to Package.resolved hash (#4195)
The workflow build cache key was `Amplify-<platform>-<xcode-version>-build-cache`,
which is stable per platform+Xcode forever. When `aws-sdk-swift` (or any SPM
dependency) is bumped, `Package.resolved` changes and newly-generated source
references symbols in modules like `SmithyXML` that do not exist in the cached
`AWSClientRuntime.framework` from a prior commit. The result is linker errors
such as:
Undefined symbol: static SmithyXML.Reader.from(data: Foundation.Data) -> Reader
Undefined symbol: type metadata accessor for SmithyXML.Reader
Ld .../AWSClientRuntime.framework/AWSClientRuntime
The SPM dependencies cache already includes `hashFiles('Package.resolved')` in
its key, so it self-invalidates correctly. Apply the same pattern to the build
cache key so a `Package.resolved` change moves to a fresh cache bucket, and
stale buckets expire naturally under GitHub's cache LRU.
Updates every workflow that reads or writes the build cache:
- build_scheme.yml
- run_integration_tests.yml
- run_unit_tests.yml
- integ_test_auth_webauthn.yml
- integ_test_push_notifications.yml
The save step in build_scheme.yml uses `steps.build-cache.outputs.cache-primary-key`,
so it automatically writes to the new hashed bucket. The existing "Delete the old
build cache" step continues to remove only the matching bucket before overwriting.
0 commit comments