From c3ec25d781155fc2f84623f9abf4eeb5fb88d967 Mon Sep 17 00:00:00 2001 From: Keyong Han Date: Tue, 8 Nov 2022 16:51:07 -0800 Subject: [PATCH 1/7] add 0_4 master --- .ci.yaml | 96 ++++++++++++++++++++++++- .ci/scripts/create_simulator.sh | 7 ++ .ci/targets/mac_ios_platform_tests.yaml | 22 ++++++ 3 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 .ci/scripts/create_simulator.sh create mode 100644 .ci/targets/mac_ios_platform_tests.yaml diff --git a/.ci.yaml b/.ci.yaml index e48175acc6a2..3e0a01a0f88a 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -51,8 +51,7 @@ targets: add_recipes_cq: "true" version_file: flutter_master.version target_file: mac_lint_podspecs.yaml - - ### macOS desktop tasks ### +### macOS desktop tasks ### # macos-platform_tests builds all the plugins on M1, so this build is run # on Intel to give us build coverage of both host types. - name: Mac_x64 build_all_plugins master @@ -75,6 +74,99 @@ targets: target_file: mac_build_all_plugins.yaml channel: stable + ### iOS tasks ### + # TODO(stuartmorgan): Swap this and ios-build_all_plugins once simulator + # tests are reliable on the ARM infrastructure. See discussion at + # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 + - name: Max_x64 ios_platform_tests_0_4 master + recipe: plugins/plugins + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 0 --shardCount 4" + + - name: Max_x64 ios_platform_tests_1_4 master + recipe: plugins/plugins + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 1 --shardCount 4" + + - name: Max_x64 ios_platform_tests_2_4 master + recipe: plugins/plugins + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 2 --shardCount 4" + + - name: Max_x64 ios_platform_tests_3_4 master + recipe: plugins/plugins + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 3 --shardCount 4" + + # Don't run full platform tests on both channels in pre-submit. + - name: Max_x64 ios_platform_tests_0_4 stable + recipe: plugins/plugins + presubmit: false + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + channel: stable + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 0 --shardCount 4" + + - name: Max_x64 ios_platform_tests_1_4 stable + recipe: plugins/plugins + presubmit: false + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + channel: stable + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 1 --shardCount 4" + + - name: Max_x64 ios_platform_tests_2_4 stable + recipe: plugins/plugins + presubmit: false + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + channel: stable + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 2 --shardCount 4" + + - name: Max_x64 ios_platform_tests_3_4 stable + recipe: plugins/plugins + presubmit: false + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + timeout: 30 + properties: + channel: stable + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: mac_ios_platform_tests.yaml + package_sharding: "--shardIndex 3 --shardCount 4" + - name: Windows win32-platform_tests master recipe: plugins/plugins timeout: 30 diff --git a/.ci/scripts/create_simulator.sh b/.ci/scripts/create_simulator.sh new file mode 100644 index 000000000000..3c4a12bdccfd --- /dev/null +++ b/.ci/scripts/create_simulator.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +xcrun simctl list +xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-0 | xargs xcrun simctl boot diff --git a/.ci/targets/mac_ios_platform_tests.yaml b/.ci/targets/mac_ios_platform_tests.yaml new file mode 100644 index 000000000000..19e7b8ee2f2f --- /dev/null +++ b/.ci/targets/mac_ios_platform_tests.yaml @@ -0,0 +1,22 @@ +tasks: + - name: create simulator + script: .ci/scripts/create_simulator.sh + - name: build examples + script: script/tool_runner.sh + args: ["build-examples", "--ios"] + - name: xcode analyze + script: script/tool_runner.sh + args: ["xcode-analyze", "--ios"] + - name: xcode analyze deprecation + # Ensure we don't accidentally introduce deprecated code. + script: script/tool_runner.sh + args: ["xcode-analyze", "--ios", "--ios-min-version=13.0"] + - name: native test + script: script/tool_runner.sh + args: ["native-test", "--ios", "--ios-destination", "'platform=iOS Simulator,name=iPhone 11,OS=latest'"] + - name: drive examples + # `drive-examples` contains integration tests, which changes the UI of the application. + # This UI change sometimes affects `xctest`. + # So we run `drive-examples` after `native-test`; changing the order will result ci failure. + script: script/tool_runner.sh + args: ["drive-examples", "--ios", "--exclude=script/configs/exclude_integration_ios.yaml"] From bb597aaab131b05954b96ae3fb7bb0d618514507 Mon Sep 17 00:00:00 2001 From: Keyong Han Date: Tue, 8 Nov 2022 16:52:57 -0800 Subject: [PATCH 2/7] typo fix --- .ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci.yaml b/.ci.yaml index 3e0a01a0f88a..a21cfa9c81ff 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -80,7 +80,7 @@ targets: # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 - name: Max_x64 ios_platform_tests_0_4 master recipe: plugins/plugins - bringup: true # New target: https://github.com/flutter/plugins/pull/6682 + bringup: true # New target: timeout: 30 properties: add_recipes_cq: "true" From f7e09fb6c64318bffa21266c2b28e92c460ee0b5 Mon Sep 17 00:00:00 2001 From: Keyong Han Date: Tue, 8 Nov 2022 17:51:36 -0800 Subject: [PATCH 3/7] update args --- .ci.yaml | 5 +++-- .ci/targets/mac_ios_platform_tests.yaml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index a21cfa9c81ff..d2c2c7d4a56f 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -51,7 +51,8 @@ targets: add_recipes_cq: "true" version_file: flutter_master.version target_file: mac_lint_podspecs.yaml -### macOS desktop tasks ### + + ### macOS desktop tasks ### # macos-platform_tests builds all the plugins on M1, so this build is run # on Intel to give us build coverage of both host types. - name: Mac_x64 build_all_plugins master @@ -80,7 +81,7 @@ targets: # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 - name: Max_x64 ios_platform_tests_0_4 master recipe: plugins/plugins - bringup: true # New target: + bringup: true # New target: https://github.com/flutter/plugins/pull/6682 timeout: 30 properties: add_recipes_cq: "true" diff --git a/.ci/targets/mac_ios_platform_tests.yaml b/.ci/targets/mac_ios_platform_tests.yaml index 19e7b8ee2f2f..1cefd3ee12d5 100644 --- a/.ci/targets/mac_ios_platform_tests.yaml +++ b/.ci/targets/mac_ios_platform_tests.yaml @@ -13,7 +13,7 @@ tasks: args: ["xcode-analyze", "--ios", "--ios-min-version=13.0"] - name: native test script: script/tool_runner.sh - args: ["native-test", "--ios", "--ios-destination", "'platform=iOS Simulator,name=iPhone 11,OS=latest'"] + args: ['native-test', '--ios', '--ios-destination', '"platform=iOS Simulator,name=iPhone 11,OS=latest"'] - name: drive examples # `drive-examples` contains integration tests, which changes the UI of the application. # This UI change sometimes affects `xctest`. From 9ebdc82dfe6e7898133795822c20d23eda109d77 Mon Sep 17 00:00:00 2001 From: Keyong Han Date: Tue, 8 Nov 2022 18:13:35 -0800 Subject: [PATCH 4/7] fix args --- .ci/targets/mac_ios_platform_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/targets/mac_ios_platform_tests.yaml b/.ci/targets/mac_ios_platform_tests.yaml index 1cefd3ee12d5..ed63f226eaec 100644 --- a/.ci/targets/mac_ios_platform_tests.yaml +++ b/.ci/targets/mac_ios_platform_tests.yaml @@ -13,7 +13,7 @@ tasks: args: ["xcode-analyze", "--ios", "--ios-min-version=13.0"] - name: native test script: script/tool_runner.sh - args: ['native-test', '--ios', '--ios-destination', '"platform=iOS Simulator,name=iPhone 11,OS=latest"'] + args: ["native-test", "--ios", "--ios-destination", "platform=iOS Simulator,name=iPhone 11,OS=latest"] - name: drive examples # `drive-examples` contains integration tests, which changes the UI of the application. # This UI change sometimes affects `xctest`. From bea4b96f06a6b5a79b035f263c604129ee1bef9a Mon Sep 17 00:00:00 2001 From: Keyong Han Date: Fri, 11 Nov 2022 13:07:19 -0800 Subject: [PATCH 5/7] ios runtime update --- .ci/scripts/create_simulator.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/scripts/create_simulator.sh b/.ci/scripts/create_simulator.sh index 3c4a12bdccfd..0c00852b44ba 100644 --- a/.ci/scripts/create_simulator.sh +++ b/.ci/scripts/create_simulator.sh @@ -4,4 +4,4 @@ # found in the LICENSE file. xcrun simctl list -xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-15-0 | xargs xcrun simctl boot +xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-16-0 | xargs xcrun simctl boot From 9735b7516ca2bbea5de9abf6b2d7d048b2b12566 Mon Sep 17 00:00:00 2001 From: Keyong Han Date: Mon, 14 Nov 2022 13:37:31 -0800 Subject: [PATCH 6/7] name change & variables --- .ci.yaml | 16 ++++++++-------- .ci/scripts/create_simulator.sh | 5 ++++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index d2c2c7d4a56f..d5450b79069b 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -79,7 +79,7 @@ targets: # TODO(stuartmorgan): Swap this and ios-build_all_plugins once simulator # tests are reliable on the ARM infrastructure. See discussion at # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 - - name: Max_x64 ios_platform_tests_0_4 master + - name: Max_x64 ios_platform_tests_1_of_4 master recipe: plugins/plugins bringup: true # New target: https://github.com/flutter/plugins/pull/6682 timeout: 30 @@ -89,7 +89,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 0 --shardCount 4" - - name: Max_x64 ios_platform_tests_1_4 master + - name: Max_x64 ios_platform_tests_2_of_4 master recipe: plugins/plugins bringup: true # New target: https://github.com/flutter/plugins/pull/6682 timeout: 30 @@ -99,7 +99,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 1 --shardCount 4" - - name: Max_x64 ios_platform_tests_2_4 master + - name: Max_x64 ios_platform_tests_3_of_4 master recipe: plugins/plugins bringup: true # New target: https://github.com/flutter/plugins/pull/6682 timeout: 30 @@ -109,7 +109,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 2 --shardCount 4" - - name: Max_x64 ios_platform_tests_3_4 master + - name: Max_x64 ios_platform_tests_4_of_4 master recipe: plugins/plugins bringup: true # New target: https://github.com/flutter/plugins/pull/6682 timeout: 30 @@ -120,7 +120,7 @@ targets: package_sharding: "--shardIndex 3 --shardCount 4" # Don't run full platform tests on both channels in pre-submit. - - name: Max_x64 ios_platform_tests_0_4 stable + - name: Max_x64 ios_platform_tests_1_of_4 stable recipe: plugins/plugins presubmit: false bringup: true # New target: https://github.com/flutter/plugins/pull/6682 @@ -132,7 +132,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 0 --shardCount 4" - - name: Max_x64 ios_platform_tests_1_4 stable + - name: Max_x64 ios_platform_tests_2_of_4 stable recipe: plugins/plugins presubmit: false bringup: true # New target: https://github.com/flutter/plugins/pull/6682 @@ -144,7 +144,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 1 --shardCount 4" - - name: Max_x64 ios_platform_tests_2_4 stable + - name: Max_x64 ios_platform_tests_3_of_4 stable recipe: plugins/plugins presubmit: false bringup: true # New target: https://github.com/flutter/plugins/pull/6682 @@ -156,7 +156,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 2 --shardCount 4" - - name: Max_x64 ios_platform_tests_3_4 stable + - name: Max_x64 ios_platform_tests_4_of_4 stable recipe: plugins/plugins presubmit: false bringup: true # New target: https://github.com/flutter/plugins/pull/6682 diff --git a/.ci/scripts/create_simulator.sh b/.ci/scripts/create_simulator.sh index 0c00852b44ba..3d86739051f1 100644 --- a/.ci/scripts/create_simulator.sh +++ b/.ci/scripts/create_simulator.sh @@ -3,5 +3,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +device=com.apple.CoreSimulator.SimDeviceType.iPhone-11 +os=com.apple.CoreSimulator.SimRuntime.iOS-16-0 + xcrun simctl list -xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-16-0 | xargs xcrun simctl boot +xcrun simctl create Flutter-iPhone "$device" "$os" | xargs xcrun simctl boot From 38362ea71fbba1ffc6c7484a70f02e4570d7b316 Mon Sep 17 00:00:00 2001 From: Keyong Han Date: Mon, 14 Nov 2022 15:08:01 -0800 Subject: [PATCH 7/7] platform name fix --- .ci.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index d5450b79069b..dffc7364e65a 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -79,7 +79,7 @@ targets: # TODO(stuartmorgan): Swap this and ios-build_all_plugins once simulator # tests are reliable on the ARM infrastructure. See discussion at # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 - - name: Max_x64 ios_platform_tests_1_of_4 master + - name: Mac_x64 ios_platform_tests_1_of_4 master recipe: plugins/plugins bringup: true # New target: https://github.com/flutter/plugins/pull/6682 timeout: 30 @@ -89,7 +89,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 0 --shardCount 4" - - name: Max_x64 ios_platform_tests_2_of_4 master + - name: Mac_x64 ios_platform_tests_2_of_4 master recipe: plugins/plugins bringup: true # New target: https://github.com/flutter/plugins/pull/6682 timeout: 30 @@ -99,7 +99,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 1 --shardCount 4" - - name: Max_x64 ios_platform_tests_3_of_4 master + - name: Mac_x64 ios_platform_tests_3_of_4 master recipe: plugins/plugins bringup: true # New target: https://github.com/flutter/plugins/pull/6682 timeout: 30 @@ -109,7 +109,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 2 --shardCount 4" - - name: Max_x64 ios_platform_tests_4_of_4 master + - name: Mac_x64 ios_platform_tests_4_of_4 master recipe: plugins/plugins bringup: true # New target: https://github.com/flutter/plugins/pull/6682 timeout: 30 @@ -120,7 +120,7 @@ targets: package_sharding: "--shardIndex 3 --shardCount 4" # Don't run full platform tests on both channels in pre-submit. - - name: Max_x64 ios_platform_tests_1_of_4 stable + - name: Mac_x64 ios_platform_tests_1_of_4 stable recipe: plugins/plugins presubmit: false bringup: true # New target: https://github.com/flutter/plugins/pull/6682 @@ -132,7 +132,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 0 --shardCount 4" - - name: Max_x64 ios_platform_tests_2_of_4 stable + - name: Mac_x64 ios_platform_tests_2_of_4 stable recipe: plugins/plugins presubmit: false bringup: true # New target: https://github.com/flutter/plugins/pull/6682 @@ -144,7 +144,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 1 --shardCount 4" - - name: Max_x64 ios_platform_tests_3_of_4 stable + - name: Mac_x64 ios_platform_tests_3_of_4 stable recipe: plugins/plugins presubmit: false bringup: true # New target: https://github.com/flutter/plugins/pull/6682 @@ -156,7 +156,7 @@ targets: target_file: mac_ios_platform_tests.yaml package_sharding: "--shardIndex 2 --shardCount 4" - - name: Max_x64 ios_platform_tests_4_of_4 stable + - name: Mac_x64 ios_platform_tests_4_of_4 stable recipe: plugins/plugins presubmit: false bringup: true # New target: https://github.com/flutter/plugins/pull/6682