Add Harness-managed cache for iOS simulator XCTest artifacts#109
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a Harness-owned XCTest cache root under
.harness/cache, where each reusable artifact lives in its own unique subdirectory with a localcache.jsonmanifest.Context
The iOS XCTest agent now discovers reusable simulator artifacts by scanning direct children of
.harness/cache, validating each directory'scache.json, and selecting only artifacts whose build input hash, Xcode version, simulator SDK/runtime, host architecture, and generated.xctestrunmetadata match the current environment. Compatible simulator artifacts are reused from their own unique cache directory, while incompatible ones are ignored and a new unique cache directory is created for the rebuilt artifact. Logs remain separate under.harness/logs.The iOS E2E workflow now restores and saves the full
.harness/cacheroot, and the cache key hashes all direct childcache.jsonfiles viahashFiles('apps/playground/.harness/cache/*/cache.json').Fixes #108
Proposed Testing Scenario
Run the platform iOS test suite locally to verify cache discovery, rebuild, and reuse behavior. Then run the iOS E2E workflow twice on the same Xcode family to confirm a previously generated simulator artifact directory under
.harness/cacheis restored and reused, and repeat with a changed simulator runtime or Xcode version to confirm Harness skips incompatible directories and rebuilds into a new unique cache subdirectory.