diff --git a/.travis.yml b/.travis.yml index 54b0ac5..83d0156 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ matrix: include: - os: osx language: objective-c - osx_image: xcode9.4 + osx_image: xcode10.2 env: - OS: 'ios' @@ -10,6 +10,8 @@ matrix: language: android jdk: oraclejdk8 sudo: required + before_script: + - echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p android: components: - platform-tools @@ -42,7 +44,7 @@ script: - source ~/.nvm/nvm.sh # Installi a lts version of Node - - nvm install --lts + - nvm install 11.6.0 # Run build script - npm run ci diff --git a/example/package.json b/example/package.json index b9652e0..e9f06c8 100644 --- a/example/package.json +++ b/example/package.json @@ -11,18 +11,18 @@ }, "dependencies": { "react": "16.5.0", - "react-native": "0.57.0", + "react-native": "0.57.8", "tipsi-travis-scripts": "file:../tipsi-travis-scripts-latest.tgz" }, "devDependencies": { - "appium": "1.8.1", + "appium": "1.14.0", "babel-jest": "23.6.0", "metro-react-native-babel-preset": "0.45.2", "jest": "23.6.0", "react-test-renderer": "16.5.0", "tape-async": "2.3.0", - "tipsi-appium-helper": "3.0.0", - "webdriverio": "4.7.1", + "tipsi-appium-helper": "3.3.0", + "webdriverio": "5.11.7", "wml": "0.0.83" }, "jest": { diff --git a/package.json b/package.json index 2e18c52..f1013bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tipsi-travis-scripts", - "version": "1.1.0", + "version": "1.2.0", "description": "Scripts to run builds and tests for 3rd-party modules on Travis CI", "main": "index.js", "scripts": { diff --git a/scripts/buildIOS.js b/scripts/buildIOS.js index ff71d85..2540dfc 100644 --- a/scripts/buildIOS.js +++ b/scripts/buildIOS.js @@ -12,39 +12,44 @@ import log from './utils/log' const isProjectUsingPods = config.get('usePods') -function buildIOSProject(projectPath) { - const iosFolder = path.resolve(projectPath, 'ios') - const whatToBuild = isProjectUsingPods - ? '-workspace example.xcworkspace' - : '-project example.xcodeproj' +function buildIOSProject(projectPath, isReactNativeBuild) { + if (isReactNativeBuild) { + run('react-native run-ios --simulator="iPhone 6" --configuration=release', projectPath) + } else { + const iosFolder = path.resolve(projectPath, 'ios') + const whatToBuild = isProjectUsingPods + ? '-workspace example.xcworkspace' + : '-project example.xcodeproj' - log('RUN RELEASE BUILD', 'info') - const xcodebuildArguments = [ - 'build', - whatToBuild, - '-scheme example', - '-configuration Release', - '-sdk iphonesimulator', - "-destination 'platform=iOS Simulator,name=iPhone 6'", - '-derivedDataPath build', - 'ONLY_ACTIVE_ARCH=NO', - "OTHER_LDFLAGS='$(inherited) -ObjC -lc++'", - ].join(' ') + log('RUN RELEASE BUILD', 'info') + const xcodebuildArguments = [ + 'build', + whatToBuild, + '-scheme example', + '-configuration Release', + '-sdk iphonesimulator', + "-destination 'platform=iOS Simulator,name=iPhone 6'", + '-derivedDataPath build', + 'ONLY_ACTIVE_ARCH=NO', + '-UseModernBuildSystem=NO', + "OTHER_LDFLAGS='$(inherited) -ObjC -lc++'", + ].join(' ') - const formatter = commandExists.sync('xcpretty') ? '| xcpretty' : '' - run(`xcodebuild ${xcodebuildArguments} ${formatter}`, iosFolder) + const formatter = commandExists.sync('xcpretty') ? '| xcpretty' : '' + run(`xcodebuild ${xcodebuildArguments} ${formatter}`, iosFolder) + } } -export default function buildIOS() { +export default function buildIOS(isReactNativeBuild = false) { if (IS_MACOS && IS_IOS) { - log('', 'empty') // only for beautiful stdout - log('BUILD IOS DEFAULT') - buildIOSProject(DEFAULT_TESTS_FOLDER) - if (isProjectUsingPods) { log('', 'empty') // only for beautiful stdout log('BUILD IOS PODSPEC') - buildIOSProject(PODSPEC_TESTS_FOLDER) + buildIOSProject(PODSPEC_TESTS_FOLDER, isReactNativeBuild) + } else { + log('', 'empty') // only for beautiful stdout + log('BUILD IOS DEFAULT') + buildIOSProject(DEFAULT_TESTS_FOLDER, isReactNativeBuild) } log('', 'empty') // only for beautiful stdout