Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
Rate limit · GitHub

Whoa there!

You have triggered an abuse detection mechanism.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

acoates-ms committed Sep 12, 2019
2 parents e66e937 + 50e1f2d commit d03f7bb
Showing 53 changed files with 397 additions and 351 deletions.
21 changes: 10 additions & 11 deletions .ado/ado-test-cleanup.sh
Original file line number Diff line number Diff line change
@@ -9,19 +9,18 @@ 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

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
# 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-*
rm -rf /tmp/metro-bundler-cache-*;
rm -rf /tmp/haste-map-react-native-packager-*;
rm -fr "$TMPDIR/react-*"

# clear watchman state
rm -rf /usr/local/var/run/watchman/*
16 changes: 14 additions & 2 deletions .ado/ado-test-setup.sh
Original file line number Diff line number Diff line change
@@ -5,8 +5,20 @@ set -ex

THIS_DIR=$PWD

# 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

# Start the packager
osascript -e "tell application \"Terminal\" to do script \"cd ${THIS_DIR}; export SERVERS_NO_WAIT=1; ./scripts/launchPackager.command\""
# osascript -e "tell application \"Terminal\" to do script \"cd ${THIS_DIR}; export SERVERS_NO_WAIT=1; ./scripts/launchPackager.command --reactNativePath ${THIS_DIR}\""

# Start the WebSocket test server
osascript -e "tell application \"Terminal\" to do script \"cd ${THIS_DIR}; export SERVERS_NO_WAIT=1; ./IntegrationTests/launchWebSocketServer.command\""
# osascript -e "tell application \"Terminal\" to do script \"cd ${THIS_DIR}; export SERVERS_NO_WAIT=1; ./IntegrationTests/launchWebSocketServer.command\""

COMMAND="$TMPDIR/launchPackager.command"
echo "cd ${THIS_DIR}; export SERVERS_NO_WAIT=1; ./scripts/launchPackager.command --reactNativePath ${THIS_DIR}" > "$COMMAND"
chmod +x "$COMMAND"
open "$COMMAND"

COMMAND="$TMPDIR/launchWebSocketServer.command"
echo "cd ${THIS_DIR}; export SERVERS_NO_WAIT=1; ./IntegrationTests/launchWebSocketServer.command" > "$COMMAND"
chmod +x "$COMMAND"
open "$COMMAND"
3 changes: 2 additions & 1 deletion .ado/apple-pr.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ jobs:
packager_platform: 'ios'
xcode_sdk: iphonesimulator
xcode_scheme: 'RNTester'
xcode_destination: 'platform=iOS Simulator,OS=latest,name=iPhone 5s'
xcode_destination: 'platform=iOS Simulator,OS=latest,name=iPhone 8'
tvos:
packager_platform: 'ios'
xcode_sdk: appletvsimulator
@@ -27,6 +27,7 @@ jobs:
xcode_scheme: 'RNTester-macOS'
xcode_destination: 'platform=macOS,arch=x86_64'
pool:
name: Hosted Mac Internal Mojave
demands: ['xcode', 'sh', 'npm']
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
5 changes: 2 additions & 3 deletions .ado/publish.js
Original file line number Diff line number Diff line change
@@ -29,8 +29,7 @@ function doPublish() {
exec(`git checkout -b ${tempPublishBranch}`);

exec(`git config --global user.email "53619745+rnbot@users.noreply.github.com"`);
exec(`git config --global user.name "React-Native Build"`);
exec(`git remote set-url origin https://rnbot:${process.env.GIT_TOKEN}@github.com/microsoft/react-native.git`);
exec(`git config --global user.name "React-Native Bot"`);

exec(`git add ${pkgJsonPath}`);
exec(`git commit -m "Applying package update to ${releaseVersion} ***NO_CI***`);
@@ -58,7 +57,7 @@ function doPublish() {

const assetUpdateUrl = `https://uploads.github.com/repos/microsoft/react-native/releases/{id}/assets?name=react-native-${releaseVersion}.tgz`;
const authHeader =
"Basic " + new Buffer(":" + process.env.GIT_TOKEN).toString("base64");
"Basic " + new Buffer(":" + process.env.SYSTEM_ACCESSTOKEN).toString("base64");
const userAgent = "Microsoft-React-Native-Release-Agent";

let uploadReleaseAssetUrl = "";
2 changes: 2 additions & 0 deletions .ado/publish.yml
Original file line number Diff line number Diff line change
@@ -118,6 +118,8 @@ jobs:
script: node .ado/publish.js
env:
BUILD_STAGINGDIRECTORY: $(Build.StagingDirectory)
BUILD_SOURCEBRANCH: $(Build.SourceBranch)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

- task: PublishBuildArtifacts@1
displayName: 'Publish final artifacts'
4 changes: 2 additions & 2 deletions .ado/templates/apple-job-react-native.yml
Original file line number Diff line number Diff line change
@@ -20,9 +20,9 @@ steps:
- template: apple-xcode-select.yml

- task: CmdLine@2
displayName: npm install
displayName: yarn install
inputs:
script: npm install
script: yarn install

- task: ShellScript@2
displayName: 'Setup packager and WebSocket test server'
2 changes: 1 addition & 1 deletion .ado/templates/apple-xcode-build.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ steps:
sdk: ${{ parameters.xcode_sdk }}
xcWorkspacePath: ${{ parameters.xcode_workspacePath }}
scheme: ${{ parameters.xcode_scheme }}
xcodeVersion: 10
xcodeVersion: 11
signingOption: auto
packageApp: false
teamId: '$(XCodeSigningMicrosoftTeamID)'
14 changes: 7 additions & 7 deletions .ado/templates/apple-xcode-select.yml
Original file line number Diff line number Diff line change
@@ -2,32 +2,32 @@
# Task Group: XCode select proper version
#
steps:
# The XCODE_10_DEVELOPER_DIR variable is defined in the Hosted Agents and is used by the Xcode@5 tasks.
# The XCODE_11_DEVELOPER_DIR variable is defined in the Hosted Agents and is used by the Xcode@5 tasks.
# The 'OE Mac Pool' agents do not define this variable, so manually set it here if it is not defined.
- script: |
if [ -z $XCODE_10_DEVELOPER_DIR ]; then
DIR='/Applications/Xcode_10.1.app/Contents/Developer/'
if [ -z $XCODE_11_DEVELOPER_DIR ]; then
DIR='/Applications/Xcode_11_beta.app/Contents/Developer/'
if [ ! -d $DIR ]; then
DIR='/Applications/Xcode.app/Contents/Developer/'
fi
if [ -d $DIR ]; then
echo "##vso[task.setvariable variable=XCODE_10_DEVELOPER_DIR;]$DIR"
echo "##vso[task.setvariable variable=XCODE_11_DEVELOPER_DIR;]$DIR"
else
(>&2 echo "No Xcode found.")
fi
fi
displayName: 'Ensure XCODE_10_DEVELOPER_DIR'
displayName: 'Ensure XCODE_11_DEVELOPER_DIR'
failOnStderr: true
# The DEVELOPER_DIR variable is used by xcodebuild to specify the version of Xcode to use.
# Set the variable here so that npm components and CMake build steps get the latest XCode version
# instead of whatever version is the default on the build agent.
- script: |
echo "##vso[task.setvariable variable=DEVELOPER_DIR;]$XCODE_10_DEVELOPER_DIR"
echo "##vso[task.setvariable variable=DEVELOPER_DIR;]$XCODE_11_DEVELOPER_DIR"
displayName: 'Set DEVELOPER_DIR'
- script: |
REQUIRED=10.1
REQUIRED=11.0
VER=`xcodebuild -version | head -n1 | cut -d' ' -f2`
if (( $(echo "$VER >= $REQUIRED" | bc -l) )); then
echo "XCode version $VER is active."
31 changes: 0 additions & 31 deletions .ado/updateRNW.js

This file was deleted.

1 change: 1 addition & 0 deletions .flowconfig.android
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[ignore]
; We fork some components by platform
.*/*[.]ios.js
.*/*[.]macos.js

; Ignore templates for 'react-native init'
<PROJECT_ROOT>/template/.*
82 changes: 79 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: CI

on: [push, pull_request]
on: [pull_request]

jobs:

AndroidRNPR:
name: Android React Native PR

runs-on: windows-2016

steps:

- name: Skip NO CI
@@ -47,3 +45,81 @@ jobs:
- run: nuget pack ReactAndroid/ReactAndroid.nuspec

- run: gradlew.bat "clean"

ApplePR:
name: Apple React Native PR
runs-on: macOS-10.14
strategy:
matrix:
slice: [
{xcode_sdk: iphonesimulator, xcode_scheme: RNTester, xcode_destination: 'platform=iOS Simulator,OS=latest,name=iPhone 8', packager_platform: ios},
{xcode_sdk: appletvsimulator, xcode_scheme: RNTester-tvOS, xcode_destination: 'platform=tvOS Simulator,OS=latest,name=Apple TV', packager_platform: ios},
{xcode_sdk: macosx, xcode_scheme: RNTester-macOS, xcode_destination: 'platform=macOS,arch=x86_64', packager_platform: macos}
]

steps:

- name: Skip NO CI
if: contains( github.event.head_commit.message, '***NO_CI***')
run: exit 123

- uses: actions/checkout@v1
with:
submodules: true

- run: brew bundle

- run: brew link node@10 --overwrite --force

# The XCODE_11_DEVELOPER_DIR variable is defined in the Hosted Agents and is used by the Xcode@5 tasks.
- name: 'Ensure XCODE_11_DEVELOPER_DIR'
run: |
if [ -z $XCODE_11_DEVELOPER_DIR ]; then
DIR='/Applications/Xcode_11_beta.app/Contents/Developer/'
if [ ! -d $DIR ]; then
DIR='/Applications/Xcode.app/Contents/Developer/'
fi
if [ -d $DIR ]; then
echo "##[set-env name=XCODE_11_DEVELOPER_DIR;]$DIR"
else
(>&2 echo "No Xcode found.")
fi
fi
# The DEVELOPER_DIR variable is used by xcodebuild to specify the version of Xcode to use.
- name: Set DEVELOPER_DIR
run: |
echo "##[set-env name=DEVELOPER_DIR;]$XCODE_11_DEVELOPER_DIR"
- name: Check XCode version
run: |
REQUIRED=11.0
VER=`xcodebuild -version | head -n1 | cut -d' ' -f2`
if (( $(echo "$VER >= $REQUIRED" | bc -l) )); then
echo "XCode version $VER is active."
else
(>&2 echo "Must have XCode $REQUIRED or later.")
fi
- run: yarn install

- name: Setup packager and WebSocket test server
run: .ado/ado-test-setup.sh

- name: curl the packager
run: |
echo "Preparing the packager for platform ${PLATFORM}"
curl --retry-connrefused --connect-timeout 5 --max-time 10 --retry 10 --retry-delay 5 --retry-max-time 120 "http://localhost:8081/IntegrationTests/IntegrationTestsApp.bundle?platform=${PLATFORM}&dev=true" -o /dev/null
env:
PLATFORM: ${{ matrix.slice.packager_platform }}

- name: XCode build and test Debug
run: |
xcodebuild -sdk ${{ matrix.slice.xcode_sdk }} -configuration Debug -project RNTester/RNTester.xcodeproj -scheme ${{ matrix.slice.xcode_scheme }} build test -destination "${{ matrix.slice.xcode_destination }}" ONLY_ACTIVE_ARCH=NO -verbose -UseModernBuildSystem=NO -derivedDataPath DerivedData CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=UBF8T346G9 | xcpretty -r junit --no-color
- name: XCode build Release
run: |
xcodebuild -sdk ${{ matrix.slice.xcode_sdk }} -configuration Release -project RNTester/RNTester.xcodeproj -scheme ${{ matrix.slice.xcode_scheme }} build -destination "${{ matrix.slice.xcode_destination }}" ONLY_ACTIVE_ARCH=NO -verbose -UseModernBuildSystem=NO -derivedDataPath DerivedData CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=UBF8T346G9 | xcpretty -r junit --no-color
- name: Cleanup packager and WebSocket test server
run: .ado/ado-test-cleanup.sh
70 changes: 0 additions & 70 deletions .github/workflows/publish.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Brewfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
brew "node@8", link: true
brew "node@10"
brew "watchman"
19 changes: 19 additions & 0 deletions Libraries/Color/NativeOrDynamicColorType.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict
*/

'use strict';

export type NativeOrDynamicColorType = {
semantic?: string,
dynamic?: {
light: ?(string | number | NativeOrDynamicColorType),
dark: ?(string | number | NativeOrDynamicColorType),
},
};
Rate limit · GitHub

Whoa there!

You have triggered an abuse detection mechanism.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

0 comments on commit d03f7bb

Please sign in to comment.