Skip to content

Commit

Permalink
Merge pull request flutter#2215 from chinmaygarde/master
Browse files Browse the repository at this point in the history
Shared build configuration for Mac/iOS build targets on bot
  • Loading branch information
chinmaygarde committed Jan 5, 2016
2 parents bd301ca + da6f356 commit 405d9a8
Show file tree
Hide file tree
Showing 5 changed files with 266 additions and 1 deletion.
26 changes: 26 additions & 0 deletions travis/.gitignore
Original file line number Diff line number Diff line change
@@ -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
112 changes: 112 additions & 0 deletions travis/bot.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXGroup section */
9E687EA21C3C6D9A00FBE171 = {
isa = PBXGroup;
children = (
);
sourceTree = "<group>";
};
/* 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 */;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 80 additions & 0 deletions travis/bot.xcodeproj/xcshareddata/xcschemes/bot.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9E687EA71C3C6D9A00FBE171"
BuildableName = "bot"
BlueprintName = "bot"
ReferencedContainer = "container:bot.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9E687EA71C3C6D9A00FBE171"
BuildableName = "bot"
BlueprintName = "bot"
ReferencedContainer = "container:bot.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9E687EA71C3C6D9A00FBE171"
BuildableName = "bot"
BlueprintName = "bot"
ReferencedContainer = "container:bot.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
42 changes: 41 additions & 1 deletion travis/build_xcode_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand All @@ -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

0 comments on commit 405d9a8

Please sign in to comment.