From 63560921c3e61a3d8484b2bf606ecd814db664d1 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Mon, 3 Feb 2020 13:21:02 -0800 Subject: [PATCH 1/4] Run Flutter framework tests against the web engine in Cirrus --- .cirrus.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 53f29cd4d5190..1bda15e726c8f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -80,6 +80,10 @@ task: test_framework_script: | cd $FRAMEWORK_PATH/flutter/packages/flutter ../../bin/flutter test --local-engine=host_debug_unopt + # Run Flutter framework tests against the web engine. + test_framework_web_script: | + cd $FRAMEWORK_PATH/flutter/packages/flutter + ../../bin/flutter test --platform=chrome --local-engine=host_debug_unopt - name: build_and_test_web_linux_firefox compile_host_script: | cd $ENGINE_PATH/src From c3d40381c72e11a5959c6608ca935b075d41f0f8 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Mon, 3 Feb 2020 14:51:53 -0800 Subject: [PATCH 2/4] Use shards to run the new tests --- .cirrus.yml | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1bda15e726c8f..c3def9384d910 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -80,10 +80,80 @@ task: test_framework_script: | cd $FRAMEWORK_PATH/flutter/packages/flutter ../../bin/flutter test --local-engine=host_debug_unopt - # Run Flutter framework tests against the web engine. - test_framework_web_script: | - cd $FRAMEWORK_PATH/flutter/packages/flutter - ../../bin/flutter test --platform=chrome --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 + only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" + environment: + # As of October 2019, the Web shards needed more than 6G of RAM. + CPU: 2 + MEMORY: 8G + script: + - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + + - name: web_tests-1-linux + only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" + environment: + # As of October 2019, the Web shards needed more than 6G of RAM. + CPU: 2 + MEMORY: 8G + script: + - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + + - name: web_tests-2-linux + only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" + environment: + # As of October 2019, the Web shards needed more than 6G of RAM. + CPU: 2 + MEMORY: 8G + script: + - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + + - name: web_tests-3-linux + only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" + environment: + # As of October 2019, the Web shards needed more than 6G of RAM. + CPU: 2 + MEMORY: 8G + script: + - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + + - name: web_tests-4-linux + only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" + environment: + # As of October 2019, the Web shards needed more than 6G of RAM. + CPU: 2 + MEMORY: 8G + script: + - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + + - name: web_tests-5-linux + only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" + environment: + # As of October 2019, the Web shards needed more than 6G of RAM. + CPU: 2 + MEMORY: 8G + script: + - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + + - name: web_tests-6-linux + only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" + environment: + # As of October 2019, the Web shards needed more than 6G of RAM. + CPU: 2 + MEMORY: 8G + script: + - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + + - name: web_tests-7_last-linux # last Web shard must end with _last + only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" + environment: + # As of October 2019, the Web shards needed more than 6G of RAM. + CPU: 2 + MEMORY: 8G + script: + - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + - name: build_and_test_web_linux_firefox compile_host_script: | cd $ENGINE_PATH/src From cb9b78c5f8e5814909b72eb40693eeb4fc354382 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Tue, 4 Feb 2020 10:23:31 -0800 Subject: [PATCH 3/4] Clone the flutter repo in every shard --- .cirrus.yml | 96 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 88 insertions(+), 8 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c3def9384d910..53551d2f3cd52 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -88,8 +88,18 @@ task: # As of October 2019, the Web shards needed more than 6G of RAM. CPU: 2 MEMORY: 8G + compile_host_script: | + cd $ENGINE_PATH/src + ./flutter/tools/gn --unoptimized --full-dart-sdk + ninja -C out/host_debug_unopt + fetch_framework_script: | + mkdir -p $FRAMEWORK_PATH + cd $FRAMEWORK_PATH + git clone https://github.com/flutter/flutter.git + cd flutter + bin/flutter update-packages --local-engine=host_debug_unopt script: - - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + - dart --enable-asserts $FRAMEWORK_PATH/flutter/dev/bots/test.dart --local-engine=host_debug_unopt - name: web_tests-1-linux only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" @@ -97,8 +107,18 @@ task: # As of October 2019, the Web shards needed more than 6G of RAM. CPU: 2 MEMORY: 8G + compile_host_script: | + cd $ENGINE_PATH/src + ./flutter/tools/gn --unoptimized --full-dart-sdk + ninja -C out/host_debug_unopt + fetch_framework_script: | + mkdir -p $FRAMEWORK_PATH + cd $FRAMEWORK_PATH + git clone https://github.com/flutter/flutter.git + cd flutter + bin/flutter update-packages --local-engine=host_debug_unopt script: - - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + - dart --enable-asserts $FRAMEWORK_PATH/flutter/dev/bots/test.dart --local-engine=host_debug_unopt - name: web_tests-2-linux only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" @@ -106,8 +126,18 @@ task: # As of October 2019, the Web shards needed more than 6G of RAM. CPU: 2 MEMORY: 8G + compile_host_script: | + cd $ENGINE_PATH/src + ./flutter/tools/gn --unoptimized --full-dart-sdk + ninja -C out/host_debug_unopt + fetch_framework_script: | + mkdir -p $FRAMEWORK_PATH + cd $FRAMEWORK_PATH + git clone https://github.com/flutter/flutter.git + cd flutter + bin/flutter update-packages --local-engine=host_debug_unopt script: - - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + - dart --enable-asserts $FRAMEWORK_PATH/flutter/dev/bots/test.dart --local-engine=host_debug_unopt - name: web_tests-3-linux only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" @@ -115,8 +145,18 @@ task: # As of October 2019, the Web shards needed more than 6G of RAM. CPU: 2 MEMORY: 8G + compile_host_script: | + cd $ENGINE_PATH/src + ./flutter/tools/gn --unoptimized --full-dart-sdk + ninja -C out/host_debug_unopt + fetch_framework_script: | + mkdir -p $FRAMEWORK_PATH + cd $FRAMEWORK_PATH + git clone https://github.com/flutter/flutter.git + cd flutter + bin/flutter update-packages --local-engine=host_debug_unopt script: - - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + - dart --enable-asserts $FRAMEWORK_PATH/flutter/dev/bots/test.dart --local-engine=host_debug_unopt - name: web_tests-4-linux only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" @@ -124,8 +164,18 @@ task: # As of October 2019, the Web shards needed more than 6G of RAM. CPU: 2 MEMORY: 8G + compile_host_script: | + cd $ENGINE_PATH/src + ./flutter/tools/gn --unoptimized --full-dart-sdk + ninja -C out/host_debug_unopt + fetch_framework_script: | + mkdir -p $FRAMEWORK_PATH + cd $FRAMEWORK_PATH + git clone https://github.com/flutter/flutter.git + cd flutter + bin/flutter update-packages --local-engine=host_debug_unopt script: - - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + - dart --enable-asserts $FRAMEWORK_PATH/flutter/dev/bots/test.dart --local-engine=host_debug_unopt - name: web_tests-5-linux only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" @@ -133,8 +183,18 @@ task: # As of October 2019, the Web shards needed more than 6G of RAM. CPU: 2 MEMORY: 8G + compile_host_script: | + cd $ENGINE_PATH/src + ./flutter/tools/gn --unoptimized --full-dart-sdk + ninja -C out/host_debug_unopt + fetch_framework_script: | + mkdir -p $FRAMEWORK_PATH + cd $FRAMEWORK_PATH + git clone https://github.com/flutter/flutter.git + cd flutter + bin/flutter update-packages --local-engine=host_debug_unopt script: - - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + - dart --enable-asserts $FRAMEWORK_PATH/flutter/dev/bots/test.dart --local-engine=host_debug_unopt - name: web_tests-6-linux only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" @@ -142,8 +202,18 @@ task: # As of October 2019, the Web shards needed more than 6G of RAM. CPU: 2 MEMORY: 8G + compile_host_script: | + cd $ENGINE_PATH/src + ./flutter/tools/gn --unoptimized --full-dart-sdk + ninja -C out/host_debug_unopt + fetch_framework_script: | + mkdir -p $FRAMEWORK_PATH + cd $FRAMEWORK_PATH + git clone https://github.com/flutter/flutter.git + cd flutter + bin/flutter update-packages --local-engine=host_debug_unopt script: - - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + - dart --enable-asserts $FRAMEWORK_PATH/flutter/dev/bots/test.dart --local-engine=host_debug_unopt - name: web_tests-7_last-linux # last Web shard must end with _last only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" @@ -151,8 +221,18 @@ task: # As of October 2019, the Web shards needed more than 6G of RAM. CPU: 2 MEMORY: 8G + compile_host_script: | + cd $ENGINE_PATH/src + ./flutter/tools/gn --unoptimized --full-dart-sdk + ninja -C out/host_debug_unopt + fetch_framework_script: | + mkdir -p $FRAMEWORK_PATH + cd $FRAMEWORK_PATH + git clone https://github.com/flutter/flutter.git + cd flutter + bin/flutter update-packages --local-engine=host_debug_unopt script: - - dart --enable-asserts $FRAMEWORK_PATH/dev/bots/test.dart + - dart --enable-asserts $FRAMEWORK_PATH/flutter/dev/bots/test.dart --local-engine=host_debug_unopt - name: build_and_test_web_linux_firefox compile_host_script: | From 576a1030ace7da844978eaa1567fb88a26006c09 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Thu, 6 Feb 2020 13:39:34 -0800 Subject: [PATCH 4/4] Try yaml template --- .cirrus.yml | 163 +++++++++------------------------------------------- 1 file changed, 27 insertions(+), 136 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 53551d2f3cd52..bbc78e709c1bd 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,5 +1,24 @@ gcp_credentials: ENCRYPTED[987a78af29b91ce8489594c9ab3fec21845bbe5ba68294b8f6def3cf0d380830f06687a89ea69c87344c5ade369700fe] +web_shard_template: &WEB_SHARD_TEMPLATE + only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" + environment: + # As of October 2019, the Web shards needed more than 6G of RAM. + CPU: 2 + MEMORY: 8G + compile_host_script: | + cd $ENGINE_PATH/src + ./flutter/tools/gn --unoptimized --full-dart-sdk + ninja -C out/host_debug_unopt + fetch_framework_script: | + mkdir -p $FRAMEWORK_PATH + cd $FRAMEWORK_PATH + git clone https://github.com/flutter/flutter.git + cd 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: @@ -83,156 +102,28 @@ task: # PLEASE KEEP THESE WEB TEST SHARDS IN SYNC WITH THEIR COUNTERPARTS IN flutter/flutter's CIRRUS CONFIG. - name: web_tests-0-linux - only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" - environment: - # As of October 2019, the Web shards needed more than 6G of RAM. - CPU: 2 - MEMORY: 8G - compile_host_script: | - cd $ENGINE_PATH/src - ./flutter/tools/gn --unoptimized --full-dart-sdk - ninja -C out/host_debug_unopt - fetch_framework_script: | - mkdir -p $FRAMEWORK_PATH - cd $FRAMEWORK_PATH - git clone https://github.com/flutter/flutter.git - cd 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 + << : *WEB_SHARD_TEMPLATE - name: web_tests-1-linux - only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" - environment: - # As of October 2019, the Web shards needed more than 6G of RAM. - CPU: 2 - MEMORY: 8G - compile_host_script: | - cd $ENGINE_PATH/src - ./flutter/tools/gn --unoptimized --full-dart-sdk - ninja -C out/host_debug_unopt - fetch_framework_script: | - mkdir -p $FRAMEWORK_PATH - cd $FRAMEWORK_PATH - git clone https://github.com/flutter/flutter.git - cd 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 + << : *WEB_SHARD_TEMPLATE - name: web_tests-2-linux - only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" - environment: - # As of October 2019, the Web shards needed more than 6G of RAM. - CPU: 2 - MEMORY: 8G - compile_host_script: | - cd $ENGINE_PATH/src - ./flutter/tools/gn --unoptimized --full-dart-sdk - ninja -C out/host_debug_unopt - fetch_framework_script: | - mkdir -p $FRAMEWORK_PATH - cd $FRAMEWORK_PATH - git clone https://github.com/flutter/flutter.git - cd 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 + << : *WEB_SHARD_TEMPLATE - name: web_tests-3-linux - only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" - environment: - # As of October 2019, the Web shards needed more than 6G of RAM. - CPU: 2 - MEMORY: 8G - compile_host_script: | - cd $ENGINE_PATH/src - ./flutter/tools/gn --unoptimized --full-dart-sdk - ninja -C out/host_debug_unopt - fetch_framework_script: | - mkdir -p $FRAMEWORK_PATH - cd $FRAMEWORK_PATH - git clone https://github.com/flutter/flutter.git - cd 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 + << : *WEB_SHARD_TEMPLATE - name: web_tests-4-linux - only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" - environment: - # As of October 2019, the Web shards needed more than 6G of RAM. - CPU: 2 - MEMORY: 8G - compile_host_script: | - cd $ENGINE_PATH/src - ./flutter/tools/gn --unoptimized --full-dart-sdk - ninja -C out/host_debug_unopt - fetch_framework_script: | - mkdir -p $FRAMEWORK_PATH - cd $FRAMEWORK_PATH - git clone https://github.com/flutter/flutter.git - cd 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 + << : *WEB_SHARD_TEMPLATE - name: web_tests-5-linux - only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" - environment: - # As of October 2019, the Web shards needed more than 6G of RAM. - CPU: 2 - MEMORY: 8G - compile_host_script: | - cd $ENGINE_PATH/src - ./flutter/tools/gn --unoptimized --full-dart-sdk - ninja -C out/host_debug_unopt - fetch_framework_script: | - mkdir -p $FRAMEWORK_PATH - cd $FRAMEWORK_PATH - git clone https://github.com/flutter/flutter.git - cd 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 + << : *WEB_SHARD_TEMPLATE - name: web_tests-6-linux - only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" - environment: - # As of October 2019, the Web shards needed more than 6G of RAM. - CPU: 2 - MEMORY: 8G - compile_host_script: | - cd $ENGINE_PATH/src - ./flutter/tools/gn --unoptimized --full-dart-sdk - ninja -C out/host_debug_unopt - fetch_framework_script: | - mkdir -p $FRAMEWORK_PATH - cd $FRAMEWORK_PATH - git clone https://github.com/flutter/flutter.git - cd 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 + << : *WEB_SHARD_TEMPLATE - name: web_tests-7_last-linux # last Web shard must end with _last - only_if: "changesInclude('.cirrus.yml', 'lib/web_ui/**', 'web_sdk/**') || $CIRRUS_PR == ''" - environment: - # As of October 2019, the Web shards needed more than 6G of RAM. - CPU: 2 - MEMORY: 8G - compile_host_script: | - cd $ENGINE_PATH/src - ./flutter/tools/gn --unoptimized --full-dart-sdk - ninja -C out/host_debug_unopt - fetch_framework_script: | - mkdir -p $FRAMEWORK_PATH - cd $FRAMEWORK_PATH - git clone https://github.com/flutter/flutter.git - cd 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 + << : *WEB_SHARD_TEMPLATE - name: build_and_test_web_linux_firefox compile_host_script: |