react-native-macos/.ado/scripts/ado-test-cleanup.sh

35 строки
1.2 KiB
Bash
Исходник Обычный вид История

#!/bin/bash
set -ex
# Script used by the Azure DevOps build agent to cleanup the packager and web socket server
Add some robustness to the CI and switch to Xcode 12 (#709) * Update RCTCxxBridge.mm * make CI xcode versioning more robust to xcode12 * update to xcode 12.4 * use apple variables file * Update RCTCxxBridge.mm * add quotes * switch to catalina * update pods to 10.15 * make CI xcode versioning more robust to xcode12 * update to xcode 12.4 * use apple variables file * add quotes * switch to catalina * update pods to 10.15 * upgrade version requirements to n-2 for osx * make CI xcode versioning more robust to xcode12 * update to xcode 12.4 * use apple variables file * add quotes * switch to catalina * make CI xcode versioning more robust to xcode12 * update to xcode 12.4 * use apple variables file * add quotes * make CI xcode versioning more robust to xcode12 * update to xcode 12.4 * use apple variables file * add quotes * CI should run on PRs to future stable branches (#718) * Pull in header's C declaration to stop symbol mangling (#728) * Update RCTCxxBridge.mm * Update RCTCxxBridge.mm * fix undefined extern c symbol * scroll content with animation (#725) Summary: please see test plan Test Plan: |Before|After| |{F371503806}|{F371499708}| Reviewers: skyle Reviewed By: skyle Subscribers: zackargyle Differential Revision: https://phabricator.intern.facebook.com/D26354172 Tasks: T84165504 Signature: 26354172:1612920735:2cd8455b1bae06ee555bd98cfd41c4dfb29c288e Co-authored-by: Mo Wang <mowang@fb.com> * Fix missing props on secure text input (#719) * Enable animated gif playback on Mac (#724) * enable gif for mac Summary: I verify that it works for Zeratul as well. It also works regardless turbo module is enabled or not. Test Plan: |{F369886201}|{F369889196}| Reviewers: skyle Reviewed By: skyle Subscribers: zackargyle Differential Revision: https://phabricator.intern.facebook.com/D26272145 Tasks: T82742678 Signature: 26272145:1612513052:520a8b0b3ab4b211c953b3225c6c96ffb8a29fc5 * bypass setImage logic when it is Mac Summary: as titled Test Plan: {F370138978} {F370139033} Reviewers: skyle Reviewed By: skyle Subscribers: zackargyle Differential Revision: https://phabricator.intern.facebook.com/D26288169 Signature: 26288169:1612565769:8f779fe01614e3399ac3e484853bb61246210ff4 * address PR comments * address PR comments 1 Co-authored-by: Mo Wang <mowang@fb.com> * Add explicit Tab support to keyboarding (#723) * Update RCTCxxBridge.mm * Update RCTCxxBridge.mm * add explicit tab support * missing tab validity check * Fix Deadlock in RCTi18nUtil (iOS) (#733) * Initial Commit * Fix typo * Fix default initialization of isRTLAllowed and documentation * use BOOL, remove superfluous readwrite decorator * Fix another typo * Add TODO Marker * update to macOS 10.15 * make CI xcode versioning more robust to xcode12 * update to xcode 12.4 * use apple variables file * add quotes * switch to catalina * update pods to 10.15 * upgrade version requirements to n-2 for osx * make CI xcode versioning more robust to xcode12 * update to xcode 12.4 * use apple variables file * add quotes * switch to catalina * make CI xcode versioning more robust to xcode12 * update to xcode 12.4 * use apple variables file * add quotes * make CI xcode versioning more robust to xcode12 * update to xcode 12.4 * use apple variables file * add quotes * update to macOS 10.15 * update to xcode 12.4 * use apple variables file * switch to catalina * 10.14 * CI has to run on 10.15.4 or later * fix up pod errors * upgrade iphone simulator * iphone 13 * remove old post install script * iphone 8 * Restore Podfile.lock to see if it fixes CI * Restore compiler flags in TurboModuleCxx-WinRTPort * Remove macOS arm64 build divergence * Remove building all ARCHS temporarily * Override ONLY_ACTIVE_ARCH in release builds too * Push iOS 14 snapshots Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Co-authored-by: Mo <mo.hy.wang@gmail.com> Co-authored-by: Mo Wang <mowang@fb.com> Co-authored-by: Scott Kyle <scott@appden.com> Co-authored-by: Saad Najmi <saadnajmi2@gmail.com> Co-authored-by: Anand Rajeswaran <anand.rajeswaran@outlook.com>
2021-03-17 21:41:57 +03:00
# after the Xcode test step has completed
# kill whatever is occupying port 8081 (packager)
lsof -i tcp:8081 | awk 'NR!=1 {print $2}' | xargs kill
# kill whatever is occupying port 5555 (web socket server)
lsof -i tcp:5555 | awk 'NR!=1 {print $2}' | xargs kill
# AppleScript can't be invoked from Azure DevOps Mojave agents until the following ticket is resolved: https://dev.azure.com/mseng/AzureDevOps/_workitems/edit/1513729
# osascript <<'EOF'
# tell application "Terminal"
# set winlist to windows where name contains "React Packager" or name contains "Metro Bundler" or name contains "Web Socket Test Server"
# repeat with win in winlist
# tell application "Terminal" to close win
# end repeat
# end tell
# EOF
# clear packager cache
rm -fr "$TMPDIR/react-*"
# dump the log files created by launchPackager.command and launchWebSocketServer.command
THIS_DIR=$(dirname "$0")
PACKAGER_LOG="${THIS_DIR}/launchPackager.log"
WEBSOCKET_LOG="${THIS_DIR}/../IntegrationTests/launchWebSocketServer.log"
if [ -f "$PACKAGER_LOG" ]; then
cat "$PACKAGER_LOG"
fi
if [ -f "$WEBSOCKET_LOG" ]; then
cat "$WEBSOCKET_LOG"
fi