[fuchsia] Make cirrus build fuchsia artifacts (flutter/engine#10268)

* [fuchsia] Make cirrus build fuchsia artifacts

* restrict to debug mode for better build times

* fix host gen_snapshot

* change buildroot version
This commit is contained in:
Kaushik Iska
2019-07-31 11:16:08 -07:00
committed by GitHub
parent 2452e2c206
commit 60f847b6c2
3 changed files with 19 additions and 12 deletions

2
DEPS
View File

@@ -137,7 +137,7 @@ allowed_hosts = [
]
deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '87840fd4ac6974537339969486acdbf9613b3c9e',
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'c6bd1f1e25048a97d99cf2fa679bd54ebad94697',
# Fuchsia compatibility
#

View File

@@ -105,11 +105,11 @@ task:
build_script: |
cd $ENGINE_PATH/src/flutter
./ci/build.sh
- name: build_fuchsia_unopt_profile_x64
- name: build_fuchsia_artifacts
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --runtime-mode profile --fuchsia --no-lto --unopt
ninja -C out/fuchsia_profile_unopt_x64
rm -rf out
./flutter/tools/fuchsia/build_fuchsia_artifacts.py --engine-version HEAD --runtime-mode debug
# WINDOWS
task:

View File

@@ -94,12 +94,12 @@ def FindFile(name, path):
def CopyGenSnapshotIfExists(source, destination):
source_root = os.path.join(_out_dir, source)
destination_base = os.path.join(destination, 'dart_binaries')
gen_snapshot = os.path.join(source_root, 'gen_snapshot')
gen_snapshot_product = os.path.join(source_root, 'gen_snapshot_product')
if os.path.isfile(gen_snapshot):
gen_snapshot = FindFile('gen_snapshot', source_root)
gen_snapshot_product = FindFile('gen_snapshot_product', source_root)
if gen_snapshot:
dst_path = os.path.join(destination_base, 'gen_snapshot')
CopyPath(gen_snapshot, dst_path)
if os.path.isfile(gen_snapshot_product):
if gen_snapshot_product:
dst_path = os.path.join(destination_base, 'gen_snapshot_product')
CopyPath(gen_snapshot_product, dst_path)
@@ -187,8 +187,6 @@ def GetTargetsToBuild(product=False):
GetRunnerTarget('flutter', product, True),
# The Dart Runner.
GetRunnerTarget('dart_runner', product, False),
'third_party/dart/runtime/bin:gen_snapshot',
'third_party/dart/runtime/bin:gen_snapshot_product'
]
return targets_to_build
@@ -225,18 +223,27 @@ def main():
required=True,
help='Specifies the flutter engine SHA.')
parser.add_argument(
'--runtime-mode',
type=str,
choices=['debug', 'profile', 'release', 'all'],
default='all')
args = parser.parse_args()
RemoveDirectoryIfExists(_bucket_directory)
build_mode = args.runtime_mode
archs = ['x64', 'arm64']
runtime_modes = ['debug', 'profile', 'release']
product_modes = [False, False, True]
for arch in archs:
for i in range(3):
runtime_mode = runtime_modes[i]
product = product_modes[i]
BuildTarget(runtime_mode, arch, product)
BuildBucket(runtime_mode, arch, product)
if build_mode == 'all' or runtime_mode == build_mode:
BuildTarget(runtime_mode, arch, product)
BuildBucket(runtime_mode, arch, product)
ProcessCIPDPakcage(args.upload, args.engine_version)