Files
simplex-chat/scripts/ci/ios-sim/snapshots.sh
T
Evgeny @ SimpleX Chat 0b4c798e50 ci: render iOS previews in the simulator, compare with references (#7905)
* ci: render iOS previews in the simulator, compare with references

* docs: assets license covers app screenshots and test snapshot images

* ci: references of the iOS preview snapshots
2026-10-27 11:49:16 +00:00

40 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
derived=$1
out=$2
mkdir -p "$out"
xcode=(
-project apps/ios/SimpleX.xcodeproj
-scheme "SimpleX (iOS)"
-configuration Debug
-destination "id=$SIM_UDID"
-derivedDataPath "$derived"
-onlyUsePackageVersionsFromResolvedFile
-skipPackagePluginValidation
-skipMacroValidation
-only-testing:"SimpleX Snapshots"
ARCHS=arm64
CODE_SIGN_STYLE=Manual
CODE_SIGN_IDENTITY=-
DEVELOPMENT_TEAM=
PROVISIONING_PROFILE_SPECIFIER=
)
xcodebuild build-for-testing -quiet "${xcode[@]}"
for size in large extra-extra-extra-large accessibility-medium; do
xcrun simctl ui "$SIM_UDID" content_size "$size"
TEST_RUNNER_SNAPSHOT_DIR="$out" TEST_RUNNER_SNAPSHOT_SIZE="$size" xcodebuild test-without-building -testLanguage en -testRegion US "${xcode[@]}"
done
xcrun simctl ui "$SIM_UDID" content_size large
ls -l "$out"
references="apps/ios/SimpleX Snapshots/References"
if [ -d "$references" ]; then
python3 "$(dirname "$0")/../snapshots-compare.py" "$references" "$out" "$(dirname "$out")/snapshots-diff"
fi