Skip to content

Commit

Permalink
Build engine for iOS on presubmit (flutter#8011)
Browse files Browse the repository at this point in the history
* build the ios engine on Cirrus
  • Loading branch information
dnfield authored Mar 2, 2019
1 parent 7234cc4 commit 130cf77
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 11 deletions.
33 changes: 33 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,39 @@ task:
mkdir javadoc_tmp
./flutter/tools/gen_javadoc.py --out-dir javadoc_tmp
task:
name: build_ios
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: high-sierra-xcode-9.4.1
env:
CIRRUS_WORKING_DIR: "/tmp/github_repo"
ENGINE_PATH: "/tmp/engine"
DEPOT_TOOLS: "/tmp/depot_tools"
PATH: "$DEPOT_TOOLS:$PATH"
depot_tools_script:
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS
# jazzy_script:
# sudo gem install [email protected]
gclient_sync_script: |
mkdir -p $ENGINE_PATH/src
echo 'solutions = [{"managed": False,"name": "src/flutter","url": "[email protected]:flutter/engine.git","custom_deps": {},"deps_file": "DEPS","safesync_url": "",},]' > $ENGINE_PATH/.gclient
cd $ENGINE_PATH/src
rm -rf flutter
rm -rf out
mv $CIRRUS_WORKING_DIR flutter
gclient sync
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --ios --unoptimized
ninja -C out/ios_debug_unopt
# TODO(dnfield): when we can install jazzy properly, we should do this.
# AFAICT we can't because of Xcode version.
# mkdir objcdoc_tmp
# pushd flutter
# ./tools/gen_objcdoc.sh ../objcdoc_tmp
# popd
format_and_dart_test_task:
container:
image: gcr.io/flutter-cirrus/build-engine-image:latest
Expand Down
12 changes: 1 addition & 11 deletions tools/gen_objcdoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ if [[ -n "${GEM_HOME}" ]]
PATH="${GEM_HOME}/bin:$PATH"
fi

# Jazzy 0.8.x, used on chrome infra, expects --no-download-badge
# Jazzy 0.9.x, used on LUCI, doesn't support that flag.
noDownloadBadge=""
if [[ -z "$LUCI_CONTEXT" ]]
then
noDownloadBadge="--no-download-badge"
fi


# Use iPhoneSimulator SDK
# See: https://github.com/realm/jazzy/issues/791
jazzy \
Expand All @@ -47,5 +38,4 @@ jazzy \
--xcodebuild-arguments --objc,shell/platform/darwin/ios/framework/Headers/Flutter.h,--,-x,objective-c,-isysroot,"$(xcrun --show-sdk-path --sdk iphonesimulator)",-I,"$(pwd)"\
--module Flutter\
--root-url https://docs.flutter.io/objc/\
--output "$1"\
$noDownloadBadge
--output "$1"

0 comments on commit 130cf77

Please sign in to comment.