mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
21dc3abe1b
# Objective - Test mobile example on real devices ## Solution - Use [BrowserStack](https://www.browserstack.com) to have access to [real devices](https://www.browserstack.com/list-of-browsers-and-platforms/app_automate) - [App Automate](https://www.browserstack.com/app-automate) to run the example - [App Percy](https://www.browserstack.com/app-percy) to compare the screenshot - Added a daily/manual CI job that will build for iOS and Android, send the apps to BrowserStack, run the app on one iOS device and one Android device, capture a screenshot, send it for visual validation, and archive it in the GitHub action Example run: https://github.com/mockersf/bevy/actions/runs/4521883534 They currently have a bug with the settings to view snapshots, they should be public. I'll raise it to them, and if they don't fix it in time it's possible to work around for everyone to view the results through their API. @cart to get this to work, you'll need - to set up an account on BrowserStack - add the secrets `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY` to the Bevy repo - create a project in Percy - add the secret `PERCY_TOKEN` to the Bevy repo and modify the project name line 122 in the `Daily.yml` file
25 lines
862 B
Makefile
25 lines
862 B
Makefile
.PHONY: xcodebuild run install boot-sim generate clean
|
|
|
|
DEVICE = ${DEVICE_ID}
|
|
ifndef DEVICE_ID
|
|
DEVICE=$(shell xcrun simctl list devices 'iOS' | grep -v 'unavailable' | grep -v '^--' | grep -v '==' | head -n 1 | cut -d ' ' -f 7 | sed 's/[()]//g')
|
|
endif
|
|
|
|
run: install
|
|
xcrun simctl launch --console $(DEVICE) org.bevyengine.example
|
|
|
|
boot-sim:
|
|
xcrun simctl boot $(DEVICE) || true
|
|
|
|
install: xcodebuild-simulator boot-sim
|
|
xcrun simctl install $(DEVICE) build/Build/Products/Debug-iphonesimulator/bevy_mobile_example.app
|
|
|
|
xcodebuild-simulator:
|
|
IOS_TARGETS=x86_64-apple-ios xcodebuild -scheme bevy_mobile_example -configuration Debug -derivedDataPath build -destination "id=$(DEVICE)"
|
|
|
|
xcodebuild-iphone:
|
|
IOS_TARGETS=aarch64-apple-ios xcodebuild -scheme bevy_mobile_example -configuration Debug -derivedDataPath build -arch arm64
|
|
|
|
clean:
|
|
rm -r build
|
|
cargo clean
|