Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a build matrix to support multiple version of React Native and OSs #345

Merged
merged 42 commits into from
Oct 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f1e21eb
testing buildmatrix on a feature branch
rotemmiz Oct 3, 2017
0100069
build Detox on multiple Xcode versions
rotemmiz Oct 3, 2017
6e195f7
build Detox on multiple Xcode versions
rotemmiz Oct 3, 2017
6158a2e
CIDD
rotemmiz Oct 3, 2017
7782be2
CIDD
rotemmiz Oct 3, 2017
634680b
CIDD
rotemmiz Oct 3, 2017
0ef1a18
CIDD
rotemmiz Oct 3, 2017
7599d92
CIDD
rotemmiz Oct 3, 2017
d0a498a
CIDD
rotemmiz Oct 3, 2017
6709163
CIDD
rotemmiz Oct 3, 2017
d8cd344
CIDD
rotemmiz Oct 3, 2017
a173ee5
CIDD
rotemmiz Oct 3, 2017
c36ff99
lang to node
rotemmiz Oct 6, 2017
fe7188f
CIDD
rotemmiz Oct 6, 2017
c9018b8
CIDD
rotemmiz Oct 6, 2017
5d8c293
CIDD
rotemmiz Oct 6, 2017
8989ae5
CIDD
rotemmiz Oct 6, 2017
e328033
CIDD
rotemmiz Oct 6, 2017
83510bc
CIDD
rotemmiz Oct 6, 2017
62834bf
CIDD
rotemmiz Oct 6, 2017
d7713d1
CIDD
rotemmiz Oct 6, 2017
8b3517d
CIDD
rotemmiz Oct 6, 2017
1856d41
CIDD
rotemmiz Oct 6, 2017
92dba07
CIDD
rotemmiz Oct 6, 2017
ca69cbc
CIDD
rotemmiz Oct 6, 2017
bff00be
CIDD
rotemmiz Oct 6, 2017
2630432
CIDD
rotemmiz Oct 6, 2017
4377023
CIDD
rotemmiz Oct 6, 2017
7db24cb
CIDD
rotemmiz Oct 6, 2017
6d13539
CIDD
rotemmiz Oct 6, 2017
d70a138
Upgraded test proj to RN49
rotemmiz Oct 13, 2017
5e6510c
Cont...
rotemmiz Oct 13, 2017
3192050
cont...
rotemmiz Oct 13, 2017
9b3ef85
CIDD - revert this
rotemmiz Oct 13, 2017
0926952
CIDD - why doesn't it work on Xcode9 ?
rotemmiz Oct 13, 2017
4eb7728
travis linux `sh` doesn't support pushd
rotemmiz Oct 13, 2017
a9e8ef0
create android emulator pre-test
rotemmiz Oct 13, 2017
a7dcc54
create android emulator pre-test
rotemmiz Oct 13, 2017
8a75dc1
CIDD
rotemmiz Oct 13, 2017
6577cc5
Merge branch 'master' into buildmatrix
rotemmiz Oct 18, 2017
7f09c91
only build master automatically
rotemmiz Oct 18, 2017
b61a7d8
split this task in to two, first ios matrix, then add Android
rotemmiz Oct 18, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 61 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,67 @@
language: objective-c
osx_image: xcode8.3
language: node_js
node_js: 8

matrix:
include:
- language: objective-c
os: osx
osx_image: xcode8.3
env:
- REACT_NATIVE_VERSION=0.44.2
install:
- ./scripts/install.ios.sh
script:
- ./scripts/ci.ios.sh
- language: objective-c
os: osx
osx_image: xcode8.3
env:
- REACT_NATIVE_VERSION=0.49.3
install:
- ./scripts/install.ios.sh
script:
- ./scripts/ci.ios.sh
- language: objective-c
os: osx
osx_image: xcode9
env:
- REACT_NATIVE_VERSION=0.44.2
install:
- ./scripts/install.ios.sh
script:
- ./scripts/ci.ios.sh
- language: objective-c
os: osx
osx_image: xcode9
env:
- REACT_NATIVE_VERSION=0.49.3
install:
- ./scripts/install.ios.sh
script:
- ./scripts/ci.ios.sh
- language: android
os: linux
jdk: oraclejdk8
env:
- REACT_NATIVE_VERSION=0.49.3
android:
components:
- build-tools-25.0.3
- android-25
- extra-android-m2repository
- extra-google-google_play_services
- extra-google-m2repository
- sys-img-armeabi-v7a-android-26
install:
- ./scripts/install.android.sh
script:
- ./scripts/ci.android.sh

branches:
only:
- master
env:
global:
- NODE_VERSION=stable
install:
- brew install yarn
- export CODE_SIGNING_REQUIRED=NO
- brew tap wix/brew
- brew install applesimutils --HEAD
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
- export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- npm install -g lerna@2.1.2 >/dev/null 2>&1
- npm install -g react-native-cli >/dev/null 2>&1
- npm install -g detox-cli >/dev/null 2>&1
- gem install xcpretty >/dev/null 2>&1
script:
- ./scripts/ci.sh
before_install:
- nvm install stable
notifications:
email: true
slack:
Expand Down
5 changes: 2 additions & 3 deletions detox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@
"eslint-plugin-react-native": "^2.3.2",
"jest": "^20.0.4",
"minimist": "^1.2.0",
"mockdate": "^2.0.1",
"shelljs": "^0.7.3",
"ttab": "^0.3.1"
"mockdate": "^2.0.1"
},
"dependencies": {
"child-process-promise": "^2.2.0",
Expand All @@ -55,6 +53,7 @@
"get-port": "^2.1.0",
"lodash": "^4.14.1",
"npmlog": "^4.0.2",
"shell-utils": "^1.0.9",
"telnet-client": "0.15.3",
"ws": "^1.1.1"
},
Expand Down
2 changes: 1 addition & 1 deletion detox/scripts/build_framework.ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ echo "###############################"
echo "###############################"
echo "Extracting Detox sources..."

xcodebuild build -project "${detoxSourcePath}"/Detox.xcodeproj -scheme DetoxFramework -configuration Release -derivedDataPath "${detoxFrameworkDirPath}"/DetoxBuild > /dev/null
xcodebuild build -project "${detoxSourcePath}"/Detox.xcodeproj -scheme DetoxFramework -configuration Release -derivedDataPath "${detoxFrameworkDirPath}"/DetoxBuild
mv "${detoxFrameworkDirPath}"/DetoxBuild/Build/Products/Release-universal/Detox.framework "${detoxFrameworkDirPath}"
rm -fr "${detoxFrameworkDirPath}"/DetoxBuild

Expand Down
4 changes: 2 additions & 2 deletions detox/src/devices/IosDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const DeviceDriverBase = require('./DeviceDriverBase');
const InvocationManager = require('../invoke').InvocationManager;
const invoke = require('../invoke');
const GREYConfiguration = require('./../ios/earlgreyapi/GREYConfiguration');
const exec = require('child-process-promise').exec;
const exec = require('shell-utils').exec;
const environment = require('../utils/environment');

class IosDriver extends DeviceDriverBase {
Expand Down Expand Up @@ -40,7 +40,7 @@ class IosDriver extends DeviceDriverBase {
}
} else {
log.info(`Building Detox.framework (${environment.getDetoxVersion()}) into ${detoxFrameworkDirPath}...`);
await exec(path.join(__dirname, `../../scripts/build_framework.ios.sh "${detoxIosSourceTarballDirPath}" "${detoxFrameworkDirPath}"`));
await exec.execAsync(path.join(__dirname, `../../scripts/build_framework.ios.sh "${detoxIosSourceTarballDirPath}" "${detoxFrameworkDirPath}"`));
}
}

Expand Down
2 changes: 1 addition & 1 deletion detox/test/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies {

testCompile 'junit:junit:4.12'

androidTestCompile(project(path: ":detox", configuration: "oldOkhttpDebug"), {
androidTestCompile(project(path: ":detox", configuration: "newOkhttpDebug"), {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public List<NativeModule> createNativeModules(ReactApplicationContext reactConte
);
}

@Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
Expand Down
2 changes: 1 addition & 1 deletion detox/test/e2e/mocha.opts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
--recursive
--timeout 240000
--timeout 480000
--bail
94 changes: 92 additions & 2 deletions detox/test/ios/example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,48 @@
remoteGlobalIDString = 394767961DBF985400D72256;
remoteInfo = Detox;
};
4644B8641F897583003223D4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7;
remoteInfo = "third-party";
};
4644B8661F897583003223D4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D383D3C1EBD27B6005632C8;
remoteInfo = "third-party-tvOS";
};
4644B8681F897583003223D4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 139D7E881E25C6D100323FB7;
remoteInfo = "double-conversion";
};
4644B86A1F897583003223D4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D383D621EBD27B9005632C8;
remoteInfo = "double-conversion-tvOS";
};
4644B86E1F916562003223D4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
remoteInfo = fishhook;
};
4644B8701F916562003223D4 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
remoteInfo = "fishhook-tvOS";
};
78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
Expand Down Expand Up @@ -412,6 +454,8 @@
children = (
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
39A34C4B1E30ED3600BEBB59 /* libRCTWebSocket-tvOS.a */,
4644B86F1F916562003223D4 /* libfishhook.a */,
4644B8711F916562003223D4 /* libfishhook-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -445,6 +489,10 @@
39A34C5D1E30ED3600BEBB59 /* libcxxreact.a */,
39A34C5F1E30ED3600BEBB59 /* libjschelpers.a */,
39A34C611E30ED3600BEBB59 /* libjschelpers.a */,
4644B8651F897583003223D4 /* libthird-party.a */,
4644B8671F897583003223D4 /* libthird-party.a */,
4644B8691F897583003223D4 /* libdouble-conversion.a */,
4644B86B1F897583003223D4 /* libdouble-conversion.a */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -856,6 +904,48 @@
remoteRef = 39B044611DAED76400431EC5 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4644B8651F897583003223D4 /* libthird-party.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libthird-party.a";
remoteRef = 4644B8641F897583003223D4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4644B8671F897583003223D4 /* libthird-party.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libthird-party.a";
remoteRef = 4644B8661F897583003223D4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4644B8691F897583003223D4 /* libdouble-conversion.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libdouble-conversion.a";
remoteRef = 4644B8681F897583003223D4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4644B86B1F897583003223D4 /* libdouble-conversion.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libdouble-conversion.a";
remoteRef = 4644B86A1F897583003223D4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4644B86F1F916562003223D4 /* libfishhook.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libfishhook.a;
remoteRef = 4644B86E1F916562003223D4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4644B8711F916562003223D4 /* libfishhook-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libfishhook-tvOS.a";
remoteRef = 4644B8701F916562003223D4 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
Expand Down Expand Up @@ -906,7 +996,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
399B4E001ED587120098D2AC /* Bundle React Native code and images */ = {
isa = PBXShellScriptBuildPhase;
Expand All @@ -920,7 +1010,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
Loading