Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions .github/workflows/ios_sentry_upload_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ jobs:
TEST_RUNNER_SENTRY_IS_RUNNING_FOR_SNAPSHOTS: 1
# Keep this base path in sync with the workflow-level SNAPSHOT_UPLOAD_BASE_DIR.
TEST_RUNNER_SNAPSHOTS_EXPORT_DIR: ${{ github.workspace }}/ios/snapshot-images/${{ matrix.slug }}
# Diagnostic: emit per-preview render timing + phase breakdown to a
# dedicated dir (kept out of the export dir so it never reaches the
# Sentry upload). Consumed by the timing-analysis branch only.
TEST_RUNNER_SNAPSHOT_TIMING: "1"
TEST_RUNNER_SNAPSHOT_TIMING_DIR: ${{ github.workspace }}/ios/snapshot-timings/${{ matrix.slug }}

steps:
- name: Checkout
Expand Down Expand Up @@ -153,16 +158,22 @@ jobs:
run: xcrun simctl boot "${{ matrix.simulator_name }}" || true

- name: Prepare snapshot export directory
run: mkdir -p "${TEST_RUNNER_SNAPSHOTS_EXPORT_DIR}"
run: |
mkdir -p "${TEST_RUNNER_SNAPSHOTS_EXPORT_DIR}"
mkdir -p "${TEST_RUNNER_SNAPSHOT_TIMING_DIR}"

- name: Generate snapshot images
run: |
set -o pipefail && xcodebuild test-without-building \
# DNM diagnostic: bypass xcpretty and tee the full, unfiltered
# xcodebuild output so package-resolution/prepare phases are visible
# (xcpretty was swallowing them). Raw log rides the timings artifact.
set -o pipefail
xcodebuild test-without-building \
-xctestrun "${DERIVED_DATA_PATH}/Build/Products/${XCTESTRUN_FILENAME}" \
-destination 'platform=iOS Simulator,name=${{ matrix.simulator_name }},arch=arm64' \
-only-testing:HackerNewsTests/HackerNewsSnapshotTest \
-resultBundlePath "../SnapshotResults-${{ matrix.slug }}.xcresult" \
| bundle exec xcpretty
2>&1 | tee "${TEST_RUNNER_SNAPSHOT_TIMING_DIR}/raw-xcodebuild.log"

- name: Upload snapshots artifacts
uses: actions/upload-artifact@v7
Expand All @@ -171,6 +182,14 @@ jobs:
path: ${{ env.TEST_RUNNER_SNAPSHOTS_EXPORT_DIR }}
if-no-files-found: error

- name: Upload snapshot timings (diagnostic)
if: always()
uses: actions/upload-artifact@v7
with:
name: snapshot-timings-${{ matrix.slug }}
path: ${{ env.TEST_RUNNER_SNAPSHOT_TIMING_DIR }}
if-no-files-found: warn

# Aggregate every per-sim artifact and upload the combined set to Sentry
# in a single fastlane invocation.
upload_snapshots:
Expand Down
7 changes: 3 additions & 4 deletions ios/HackerNews.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1249,11 +1249,10 @@
};
A4D28AEC2C237E2A007F20D0 /* XCRemoteSwiftPackageReference "SnapshotPreviews" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/EmergeTools/SnapshotPreviews";
repositoryURL = "https://github.com/getsentry/SnapshotPreviews";
requirement = {
kind = versionRange;
maximumVersion = 1.0.0;
minimumVersion = 0.13.0;
branch = "perf/snapshot-timing";
kind = branch;
};
};
FA3637622EC7ACAD00541313 /* XCRemoteSwiftPackageReference "AccessibilitySnapshotios26" */ = {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading