blob: 88f3c3e71319e9f07aa9ea9d6fe8e4d36d7e7d3b [file] [log] [blame]
gcp_credentials: ENCRYPTED[987a78af29b91ce8489594c9ab3fec21845bbe5ba68294b8f6def3cf0d380830f06687a89ea69c87344c5ade369700fe]
web_shard_template: &WEB_SHARD_TEMPLATE
only_if: "changesInclude('.cirrus.yml', 'DEPS', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''"
environment:
# As of March 2020, the Web shards needed 16G of RAM and 4 CPUs to run all framework tests with goldens without flaking.
CPU: 4
MEMORY: 16G
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --unoptimized --full-dart-sdk
ninja -C out/host_debug_unopt
fetch_framework_script: |
cd $ENGINE_PATH/src/flutter/tools
./clone_flutter.sh
cd $FRAMEWORK_PATH/flutter
bin/flutter update-packages --local-engine=host_debug_unopt
script:
- dart --enable-asserts $FRAMEWORK_PATH/flutter/dev/bots/test.dart --local-engine=host_debug_unopt
# LINUX
task:
gke_container:
dockerfile: "ci/docker/build/Dockerfile"
builder_image_name: docker-builder # gce vm image
cluster_name: build-32-cluster
zone: us-central1-a
namespace: default
cpu: 30 # can't use all 30-cores; system pods needs cores too
memory: 100Gb # similarly, can't use all 100Gb memory
env:
CIRRUS_DOCKER_CONTEXT: "ci/docker/build"
CIRRUS_WORKING_DIR: "/tmp/github_repo"
ENGINE_PATH: "/tmp/clean_engine"
DEPOT_TOOLS: "/tmp/depot_tools"
FLUTTER_ENGINE: "/tmp/clean_engine/src"
FRAMEWORK_PATH: "/tmp/master_framework"
PATH: "$FLUTTER_ENGINE/third_party/dart/tools/sdks/dart-sdk/bin:$DEPOT_TOOLS:$PATH"
USE_ANDROID: "False"
# TODO(liyuqian): currently we're using flutter-cirrus GCP project. Migrate
# to flutter-infra project once the metrics_center service is stabilized,
BENCHMARK_GCP_CREDENTIALS: ENCRYPTED[da76d2b7b39894de70fae1fc9182c97cc41400adc93f0f1c49bc7442f15fb933da8d756ed88523810a9a77c34f51a693]
setup_script: |
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS
mkdir -p $ENGINE_PATH/src
echo 'solutions = [{"managed": False,"name": "src/flutter","url": "git@github.com:flutter/engine.git","deps_file": "DEPS", "custom_vars": {"download_android_deps" : ' $USE_ANDROID ', "download_windows_deps" : False,},},]' > $ENGINE_PATH/.gclient
cd $ENGINE_PATH/src
rm -rf flutter
rm -rf out
mv $CIRRUS_WORKING_DIR flutter
gclient sync
matrix:
- name: build_and_benchmark_linux_release
only_if: $CIRRUS_BRANCH == 'master' # Only run for post-submit commits.
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --runtime-mode=release
ninja -C out/host_release
benchmark_host_script: |
cd $ENGINE_PATH/src/out/host_release/
./txt_benchmarks --benchmark_format=json > txt_benchmarks.json
./fml_benchmarks --benchmark_format=json > fml_benchmarks.json
cd $ENGINE_PATH/src/flutter/testing/benchmark
pub get
dart bin/parse_and_send.dart ../../../out/host_release/txt_benchmarks.json
dart bin/parse_and_send.dart ../../../out/host_release/fml_benchmarks.json
- name: build_and_test_linux_unopt_debug
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --unoptimized --full-dart-sdk
ninja -C out/host_debug_unopt
test_host_script: |
cd $ENGINE_PATH/src
./flutter/testing/run_tests.sh host_debug_unopt
test_web_engine_script: |
cd $ENGINE_PATH/src/flutter/web_sdk/web_engine_tester
$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
cd $ENGINE_PATH/src/flutter/lib/web_ui
$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
export FELT="$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/dart dev/felt.dart"
$FELT check-licenses
CHROME_NO_SANDBOX=true $FELT test
always:
web_engine_test_artifacts:
path: test_results/*
fetch_framework_script: |
mkdir -p $FRAMEWORK_PATH
cd $FRAMEWORK_PATH
git clone https://github.com/flutter/flutter.git
test_web_script: |
cd $FRAMEWORK_PATH/flutter/dev/integration_tests/web
../../../bin/flutter config --local-engine=host_debug_unopt --no-analytics --enable-web
../../../bin/flutter --local-engine=host_debug_unopt build web -v
analyze_framework_script: |
cd $FRAMEWORK_PATH/flutter
rm -rf bin/cache/pkg/sky_engine
cp -r $ENGINE_PATH/src/out/host_debug_unopt/gen/dart-pkg/sky_engine bin/cache/pkg/
bin/flutter update-packages --local-engine=host_debug_unopt
bin/flutter analyze --dartdocs --flutter-repo --local-engine=host_debug_unopt
test_framework_script: |
cd $FRAMEWORK_PATH/flutter/packages/flutter
../../bin/flutter test --local-engine=host_debug_unopt
# PLEASE KEEP THESE WEB TEST SHARDS IN SYNC WITH THEIR COUNTERPARTS IN flutter/flutter's CIRRUS CONFIG.
- name: web_tests-0-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-1-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-2-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-3-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-4-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-5-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-6-linux
<< : *WEB_SHARD_TEMPLATE
- name: web_tests-7_last-linux # last Web shard must end with _last
<< : *WEB_SHARD_TEMPLATE
- name: web_engine_analysis
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --unoptimized --full-dart-sdk
ninja -C out/host_debug_unopt
script:
- cd $ENGINE_PATH/src/flutter/lib/web_ui
- $ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
- $ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/dartanalyzer --fatal-warnings --fatal-hints dev/ lib/ test/ tool/
- name: web_engine_integration_test_linux
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --unoptimized --full-dart-sdk
ninja -C out/host_debug_unopt
fetch_framework_script: |
cd $ENGINE_PATH/src/flutter/tools
./clone_flutter.sh
cd $FRAMEWORK_PATH/flutter
bin/flutter update-packages --local-engine=host_debug_unopt
script:
- git clone https://github.com/flutter/web_installers.git
- cd web_installers/packages/web_drivers/
- $ENGINE_PATH/src/third_party/dart/tools/sdks/dart-sdk/bin/pub get
- $ENGINE_PATH/src/third_party/dart/tools/sdks/dart-sdk/bin/dart lib/web_driver_installer.dart chromedriver --install-only
- ./chromedriver/chromedriver --port=4444 &
- cd $ENGINE_PATH/src/flutter/e2etests/web/regular_integration_tests
- $FRAMEWORK_PATH/flutter/bin/flutter config --local-engine=host_debug_unopt --no-analytics --enable-web
- $FRAMEWORK_PATH/flutter/bin/flutter pub get --local-engine=host_debug_unopt
- $FRAMEWORK_PATH/flutter/bin/flutter drive -v --target=test_driver/text_editing_e2e.dart -d web-server --release --browser-name=chrome --local-engine=host_debug_unopt
- $FRAMEWORK_PATH/flutter/bin/flutter drive -v --target=test_driver/treeshaking_e2e.dart -d web-server --profile --browser-name=chrome --local-engine=host_debug_unopt
- $FRAMEWORK_PATH/flutter/bin/flutter drive -v --target=test_driver/image_loading_e2e.dart -d web-server --release --browser-name=chrome --local-engine=host_debug_unopt
- name: build_and_test_web_linux_firefox
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --unoptimized --full-dart-sdk
ninja -C out/host_debug_unopt
test_web_engine_firefox_script: |
cd $ENGINE_PATH/src/flutter/web_sdk/web_engine_tester
$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
cd $ENGINE_PATH/src/flutter/lib/web_ui
$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
export FELT="$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/dart dev/felt.dart"
$FELT test --browser=firefox
- name: build_and_test_android_unopt_debug
env:
USE_ANDROID: "True"
ANDROID_HOME: $ENGINE_PATH/src/third_party/android_tools/sdk
lint_host_script: |
cd $ENGINE_PATH/src/flutter/tools/android_lint
$ENGINE_PATH/src/third_party/dart/tools/sdks/dart-sdk/bin/pub get
$ENGINE_PATH/src/third_party/dart/tools/sdks/dart-sdk/bin/dart bin/main.dart
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --android --unoptimized
ninja -C out/android_debug_unopt
mkdir javadoc_tmp
./flutter/tools/gen_javadoc.py --out-dir javadoc_tmp
test_android_script: cd $ENGINE_PATH/src && python ./flutter/testing/run_tests.py --type=java
- name: format_and_dart_test
format_script: |
cd $ENGINE_PATH/src/flutter
./ci/format.sh
build_script: |
cd $ENGINE_PATH/src/flutter
./ci/build.sh
- name: build_fuchsia_artifacts
compile_fuchsia_script: |
cd $ENGINE_PATH/src
./flutter/tools/fuchsia/build_fuchsia_artifacts.py --engine-version HEAD --runtime-mode debug --no-lto --archs x64
cd $ENGINE_PATH/src/flutter
# WINDOWS
task:
gce_instance:
image_project: flutter-cirrus
image_name: flutter-engine-windows-server-2016
zone: us-central1-a
platform: windows
cpu: 32
memory: 32Gb
disk: 50
env:
# Cirrus is somehow not picking up the environment variables set in the VM image.
PATH: "c:/depot_tools;c:/MinGit/cmd;$PATH"
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
GYP_MSVS_OVERRIDE_PATH: "c:/Program Files (x86)/Microsoft Visual Studio/2017/Community"
ENGINE_PATH: "c:/flutter/engine"
setup_script: |
REM robocopy can return 1 for successful copy; suppress its error code.
REM move somehow doesn't work as it complains that the file is being used by another process.
robocopy %CIRRUS_WORKING_DIR% %ENGINE_PATH%/src/flutter /MIR| (cmd /s /c exit /b 0)
cd %ENGINE_PATH%/src
gclient sync
matrix:
- name: build_and_test_windows_unopt_debug
compile_host_script: |
cd %ENGINE_PATH%/src
python flutter/tools/gn --runtime-mode debug --unoptimized
ninja -C out/host_debug_unopt
test_host_script: |
cd %ENGINE_PATH%/src
python flutter/testing/run_tests.py --type=engine
- name: build_windows_opt_debug
compile_host_script: |
cd %ENGINE_PATH%/src
python flutter/tools/gn --runtime-mode debug
ninja -C out/host_debug