diff --git a/travis/.gitignore b/travis/.gitignore new file mode 100644 index 0000000000000..59ed186b0fd96 --- /dev/null +++ b/travis/.gitignore @@ -0,0 +1,26 @@ +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +.DS_Store +*.swp +*.lock +profile + +DerivedData/ +build/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside diff --git a/travis/bot.xcodeproj/project.pbxproj b/travis/bot.xcodeproj/project.pbxproj new file mode 100644 index 0000000000000..8c6db449c56cf --- /dev/null +++ b/travis/bot.xcodeproj/project.pbxproj @@ -0,0 +1,112 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXGroup section */ + 9E687EA21C3C6D9A00FBE171 = { + isa = PBXGroup; + children = ( + ); + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXLegacyTarget section */ + 9E687EA71C3C6D9A00FBE171 /* bot */ = { + isa = PBXLegacyTarget; + buildArgumentsString = travis/build_xcode_sdk.sh; + buildConfigurationList = 9E687EAA1C3C6D9A00FBE171 /* Build configuration list for PBXLegacyTarget "bot" */; + buildPhases = ( + ); + buildToolPath = /bin/sh; + buildWorkingDirectory = ..; + dependencies = ( + ); + name = bot; + passBuildSettingsInEnvironment = 1; + productName = bot; + }; +/* End PBXLegacyTarget section */ + +/* Begin PBXProject section */ + 9E687EA31C3C6D9A00FBE171 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = Flutter; + TargetAttributes = { + 9E687EA71C3C6D9A00FBE171 = { + CreatedOnToolsVersion = 7.2; + }; + }; + }; + buildConfigurationList = 9E687EA61C3C6D9A00FBE171 /* Build configuration list for PBXProject "bot" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 9E687EA21C3C6D9A00FBE171; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 9E687EA71C3C6D9A00FBE171 /* bot */, + ); + }; +/* End PBXProject section */ + +/* Begin XCBuildConfiguration section */ + 9E687EA81C3C6D9A00FBE171 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + 9E687EA91C3C6D9A00FBE171 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; + 9E687EAB1C3C6D9A00FBE171 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + 9E687EAC1C3C6D9A00FBE171 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 9E687EA61C3C6D9A00FBE171 /* Build configuration list for PBXProject "bot" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9E687EA81C3C6D9A00FBE171 /* Debug */, + 9E687EA91C3C6D9A00FBE171 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9E687EAA1C3C6D9A00FBE171 /* Build configuration list for PBXLegacyTarget "bot" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9E687EAB1C3C6D9A00FBE171 /* Debug */, + 9E687EAC1C3C6D9A00FBE171 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 9E687EA31C3C6D9A00FBE171 /* Project object */; +} diff --git a/travis/bot.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/travis/bot.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000000..caf01605397da --- /dev/null +++ b/travis/bot.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/travis/bot.xcodeproj/xcshareddata/xcschemes/bot.xcscheme b/travis/bot.xcodeproj/xcshareddata/xcschemes/bot.xcscheme new file mode 100644 index 0000000000000..88a930a1a78ca --- /dev/null +++ b/travis/bot.xcodeproj/xcshareddata/xcschemes/bot.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/travis/build_xcode_sdk.sh b/travis/build_xcode_sdk.sh index e5dd03274fff3..ec21cbd754378 100644 --- a/travis/build_xcode_sdk.sh +++ b/travis/build_xcode_sdk.sh @@ -5,6 +5,37 @@ set -ex +# When run using the Xcode Bot, the TARGET_TEMP_DIR variable is set. If not, +# use /tmp +WORKSPACE=${TARGET_TEMP_DIR}/tmp/flutter_build_workspace +DEPOT_WORKSPACE=${TARGET_TEMP_DIR}/tmp/flutter_depot_tools + +function NukeWorkspace { + rm -rf ${WORKSPACE} + rm -rf ${DEPOT_WORKSPACE} +} + +trap NukeWorkspace EXIT + +NukeWorkspace + +# Create a separate workspace for gclient +mkdir -p ${WORKSPACE} +cp -a . ${WORKSPACE}/src +cp travis/gclient ${WORKSPACE}/.gclient + +# Move into the fresh workspace +pushd ${WORKSPACE}/src + +# Setup Depot tools +rm -rf ${DEPOT_WORKSPACE} +git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ${DEPOT_WORKSPACE} +PATH="${DEPOT_WORKSPACE}:$PATH" + +# Sync dependencies +gclient sync + +# Setup Goma if available GOMA_FLAGS="-j900" if [[ -z "$GOMA_DIR" ]]; then GOMA_FLAGS="" @@ -30,5 +61,14 @@ cp -R out/ios_Release/Flutter out/FlutterXcode # Package it into a ZIP file for the builder to upload to cloud storage pushd out/FlutterXcode + zip -r FlutterXcode.zip Flutter -popd + +# When built for archiving, the DSTROOT is set by Xcode. +if [[ ! -z ${DSTROOT} ]]; then + mv FlutterXcode.zip ${DSTROOT} +fi + +popd # Out of the Xcode project + +popd # Out of the workspace