mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-04 19:27:55 +00:00
* 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
40 lines
1.0 KiB
Bash
Executable File
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
|