From 354f2701e4d649b7f9e22756423528a0f475f864 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 17 Jan 2023 10:53:41 -0500 Subject: [PATCH 1/7] [ci] Add an initial macOS ARM LUCI test Adds a macOS arm64 configuration, and adds the iOS build-all test in bringup mode to begin testing a LUCI migration for the ARM tests in this repository. --- .ci.yaml | 38 ++++++++++++++++++- .ci/scripts/build_all_plugins.sh | 3 +- .ci/targets/ios_build_all_plugins.yaml | 11 ++++++ .ci/targets/mac_build_all_plugins.yaml | 4 +- ...ns.yaml => windows_build_all_plugins.yaml} | 4 +- 5 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 .ci/targets/ios_build_all_plugins.yaml rename .ci/targets/{build_all_plugins.yaml => windows_build_all_plugins.yaml} (76%) diff --git a/.ci.yaml b/.ci.yaml index f88c794712ba..9bb12648e004 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -25,6 +25,17 @@ platform_properties: ] device_type: none os: Windows + mac_arm64: + properties: + dependencies: >- + [ + {"dependency": "xcode", "version": "14a5294e"}, + {"dependency": "gems", "version": "v3.3.14"} + ] + os: Mac-12 + device_type: none + cpu: arm64 + xcode: 14a5294e # xcode 14.0 beta 5 mac_x64: properties: dependencies: >- @@ -36,7 +47,7 @@ platform_properties: device_type: none cpu: x86 xcode: 14a5294e # xcode 14.0 beta 5 - + targets: ### iOS+macOS tasks *** @@ -74,7 +85,30 @@ targets: channel: stable ### iOS tasks ### - # TODO(stuartmorgan): Swap this and ios-build_all_plugins once simulator + # TODO(stuartmorgan): Swap this ios_platform_tests_* once simulator + # tests are reliable on the ARM infrastructure. See discussion at + # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 + - name: Mac_arm64 ios_build_all_plugins master + bringup: true + recipe: plugins/plugins + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: ios_build_all_plugins.yaml + channel: master + + - name: Mac_arm64 ios_build_all_plugins stable + bringup: true + recipe: plugins/plugins + timeout: 30 + properties: + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: ios_build_all_plugins.yaml + channel: stable + + # 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: Mac_x64 ios_platform_tests_1_of_4 master diff --git a/.ci/scripts/build_all_plugins.sh b/.ci/scripts/build_all_plugins.sh index 89dab629fd52..c22b9832ff22 100644 --- a/.ci/scripts/build_all_plugins.sh +++ b/.ci/scripts/build_all_plugins.sh @@ -5,5 +5,6 @@ platform="$1" build_mode="$2" +shift 2 cd all_packages -flutter build "$platform" --"$build_mode" +flutter build "$platform" --"$build_mode" "$@" diff --git a/.ci/targets/ios_build_all_plugins.yaml b/.ci/targets/ios_build_all_plugins.yaml new file mode 100644 index 000000000000..7b5b88d9c9ff --- /dev/null +++ b/.ci/targets/ios_build_all_plugins.yaml @@ -0,0 +1,11 @@ +tasks: + - name: prepare tool + script: .ci/scripts/prepare_tool.sh + - name: create all_plugins app + script: .ci/scripts/create_all_plugins_app.sh + - name: build all_plugins for iOS debug + script: .ci/scripts/build_all_plugins.sh + args: ["ios", "debug", "--no-codesign"] + - name: build all_plugins for iOS release + script: .ci/scripts/build_all_plugins.sh + args: ["ios", "release", "--no-codesign"] diff --git a/.ci/targets/mac_build_all_plugins.yaml b/.ci/targets/mac_build_all_plugins.yaml index 4dd324e8b3f0..e6eb8ac2c315 100644 --- a/.ci/targets/mac_build_all_plugins.yaml +++ b/.ci/targets/mac_build_all_plugins.yaml @@ -3,9 +3,9 @@ tasks: script: .ci/scripts/prepare_tool.sh - name: create all_plugins app script: .ci/scripts/create_all_plugins_app.sh - - name: build all_plugins debug + - name: build all_plugins for macOS debug script: .ci/scripts/build_all_plugins.sh args: ["macos", "debug"] - - name: build all_plugins release + - name: build all_plugins for macOS release script: .ci/scripts/build_all_plugins.sh args: ["macos", "release"] diff --git a/.ci/targets/build_all_plugins.yaml b/.ci/targets/windows_build_all_plugins.yaml similarity index 76% rename from .ci/targets/build_all_plugins.yaml rename to .ci/targets/windows_build_all_plugins.yaml index 0ffbdfcce376..53d6b99e2444 100644 --- a/.ci/targets/build_all_plugins.yaml +++ b/.ci/targets/windows_build_all_plugins.yaml @@ -3,9 +3,9 @@ tasks: script: .ci/scripts/prepare_tool.sh - name: create all_plugins app script: .ci/scripts/create_all_plugins_app.sh - - name: build all_plugins debug + - name: build all_plugins for Windows debug script: .ci/scripts/build_all_plugins.sh args: ["windows", "debug"] - - name: build all_plugins release + - name: build all_plugins for Windows release script: .ci/scripts/build_all_plugins.sh args: ["windows", "release"] From 8f5aeaaa48a0c262cf7d3e2d5d7e02fa99853eae Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 17 Jan 2023 14:01:17 -0500 Subject: [PATCH 2/7] Update for filename rename --- .ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index 9bb12648e004..fbd89566291f 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -223,7 +223,7 @@ targets: timeout: 30 properties: add_recipes_cq: "true" - target_file: build_all_plugins.yaml + target_file: windows_build_all_plugins.yaml channel: master version_file: flutter_master.version dependencies: > @@ -236,7 +236,7 @@ targets: timeout: 30 properties: add_recipes_cq: "true" - target_file: build_all_plugins.yaml + target_file: windows_build_all_plugins.yaml channel: stable version_file: flutter_stable.version dependencies: > From caf7775eaeb5b6720a830226906bd2bda3a0236a Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Thu, 26 Jan 2023 17:28:25 -0500 Subject: [PATCH 3/7] Try presubmit --- .ci.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index fbd89566291f..925b4b451431 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -89,7 +89,6 @@ targets: # tests are reliable on the ARM infrastructure. See discussion at # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 - name: Mac_arm64 ios_build_all_plugins master - bringup: true recipe: plugins/plugins timeout: 30 properties: @@ -99,7 +98,6 @@ targets: channel: master - name: Mac_arm64 ios_build_all_plugins stable - bringup: true recipe: plugins/plugins timeout: 30 properties: From ebdaf74abad62d007be04ca0d12dfff003c1eb65 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Thu, 26 Jan 2023 19:02:38 -0500 Subject: [PATCH 4/7] Re-add bringup --- .ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci.yaml b/.ci.yaml index 925b4b451431..fbd89566291f 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -89,6 +89,7 @@ targets: # tests are reliable on the ARM infrastructure. See discussion at # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 - name: Mac_arm64 ios_build_all_plugins master + bringup: true recipe: plugins/plugins timeout: 30 properties: @@ -98,6 +99,7 @@ targets: channel: master - name: Mac_arm64 ios_build_all_plugins stable + bringup: true recipe: plugins/plugins timeout: 30 properties: From 275b7c2dd7e97c96b14fb6e28e2343cabe4c0c63 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Mon, 30 Jan 2023 09:10:28 -0500 Subject: [PATCH 5/7] Rename iOS platform tests to be less confusing --- .ci.yaml | 16 ++++++++-------- ...atform_tests.yaml => ios_platform_tests.yaml} | 0 .ci/targets/mac_platform_tests.yaml | 0 3 files changed, 8 insertions(+), 8 deletions(-) rename .ci/targets/{mac_ios_platform_tests.yaml => ios_platform_tests.yaml} (100%) create mode 100644 .ci/targets/mac_platform_tests.yaml diff --git a/.ci.yaml b/.ci.yaml index 0289f3ba51f0..5f12e3a61aa0 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -117,7 +117,7 @@ targets: properties: add_recipes_cq: "true" version_file: flutter_master.version - target_file: mac_ios_platform_tests.yaml + target_file: ios_platform_tests.yaml package_sharding: "--shardIndex 0 --shardCount 4" - name: Mac_x64 ios_platform_tests_2_of_4 master @@ -126,7 +126,7 @@ targets: properties: add_recipes_cq: "true" version_file: flutter_master.version - target_file: mac_ios_platform_tests.yaml + target_file: ios_platform_tests.yaml package_sharding: "--shardIndex 1 --shardCount 4" - name: Mac_x64 ios_platform_tests_3_of_4 master @@ -135,7 +135,7 @@ targets: properties: add_recipes_cq: "true" version_file: flutter_master.version - target_file: mac_ios_platform_tests.yaml + target_file: ios_platform_tests.yaml package_sharding: "--shardIndex 2 --shardCount 4" - name: Mac_x64 ios_platform_tests_4_of_4 master @@ -144,7 +144,7 @@ targets: properties: add_recipes_cq: "true" version_file: flutter_master.version - target_file: mac_ios_platform_tests.yaml + target_file: ios_platform_tests.yaml package_sharding: "--shardIndex 3 --shardCount 4" # Don't run full platform tests on both channels in pre-submit. @@ -156,7 +156,7 @@ targets: channel: stable add_recipes_cq: "true" version_file: flutter_stable.version - target_file: mac_ios_platform_tests.yaml + target_file: ios_platform_tests.yaml package_sharding: "--shardIndex 0 --shardCount 4" - name: Mac_x64 ios_platform_tests_2_of_4 stable @@ -167,7 +167,7 @@ targets: channel: stable add_recipes_cq: "true" version_file: flutter_stable.version - target_file: mac_ios_platform_tests.yaml + target_file: ios_platform_tests.yaml package_sharding: "--shardIndex 1 --shardCount 4" - name: Mac_x64 ios_platform_tests_3_of_4 stable @@ -178,7 +178,7 @@ targets: channel: stable add_recipes_cq: "true" version_file: flutter_stable.version - target_file: mac_ios_platform_tests.yaml + target_file: ios_platform_tests.yaml package_sharding: "--shardIndex 2 --shardCount 4" - name: Mac_x64 ios_platform_tests_4_of_4 stable @@ -189,7 +189,7 @@ targets: channel: stable add_recipes_cq: "true" version_file: flutter_stable.version - target_file: mac_ios_platform_tests.yaml + target_file: ios_platform_tests.yaml package_sharding: "--shardIndex 3 --shardCount 4" - name: Windows win32-platform_tests master diff --git a/.ci/targets/mac_ios_platform_tests.yaml b/.ci/targets/ios_platform_tests.yaml similarity index 100% rename from .ci/targets/mac_ios_platform_tests.yaml rename to .ci/targets/ios_platform_tests.yaml diff --git a/.ci/targets/mac_platform_tests.yaml b/.ci/targets/mac_platform_tests.yaml new file mode 100644 index 000000000000..e69de29bb2d1 From c08fb7da1386f0a81c4c3e9215d0dc2720b264bd Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Mon, 30 Jan 2023 12:01:56 -0500 Subject: [PATCH 6/7] Add macOS platform tests too --- .ci.yaml | 43 +++++++++++++++++++++-------- .ci/targets/mac_platform_tests.yaml | 19 +++++++++++++ 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index 5f12e3a61aa0..29d0cf826b34 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -64,7 +64,7 @@ targets: target_file: mac_lint_podspecs.yaml ### macOS desktop tasks ### - # macos-platform_tests builds all the plugins on M1, so this build is run + # macos-platform_tests builds all the plugins on ARM, so this build is run # on Intel to give us build coverage of both host types. - name: Mac_x64 build_all_plugins master recipe: plugins/plugins @@ -84,33 +84,54 @@ targets: target_file: mac_build_all_plugins.yaml channel: stable + - name: Mac_x64 macos_platform_tests master + bringup: true # New task + recipe: plugins/plugins + timeout: 60 + properties: + channel: master + add_recipes_cq: "true" + version_file: flutter_master.version + target_file: macos_platform_tests.yaml + + - name: Mac_x64 macos_platform_tests stable + bringup: true # New task + recipe: plugins/plugins + presubmit: false + timeout: 60 + properties: + channel: stable + add_recipes_cq: "true" + version_file: flutter_stable.version + target_file: macos_platform_tests.yaml + ### iOS tasks ### - # TODO(stuartmorgan): Swap this ios_platform_tests_* once simulator - # tests are reliable on the ARM infrastructure. See discussion at - # https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 + # TODO(stuartmorgan): Swap the architecture of this and ios_platform_tests_* + # once simulator tests are reliable on the ARM infrastructure. See discussion + # at https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089 - name: Mac_arm64 ios_build_all_plugins master - bringup: true + bringup: true # New task recipe: plugins/plugins timeout: 30 properties: + channel: master add_recipes_cq: "true" version_file: flutter_master.version target_file: ios_build_all_plugins.yaml - channel: master - name: Mac_arm64 ios_build_all_plugins stable - bringup: true + bringup: true # New task recipe: plugins/plugins timeout: 30 properties: + channel: stable add_recipes_cq: "true" version_file: flutter_stable.version target_file: ios_build_all_plugins.yaml - channel: stable - # 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 + # TODO(stuartmorgan): Swap the architecture of 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: Mac_x64 ios_platform_tests_1_of_4 master recipe: plugins/plugins timeout: 60 diff --git a/.ci/targets/mac_platform_tests.yaml b/.ci/targets/mac_platform_tests.yaml index e69de29bb2d1..4b2ee4eac1fe 100644 --- a/.ci/targets/mac_platform_tests.yaml +++ b/.ci/targets/mac_platform_tests.yaml @@ -0,0 +1,19 @@ +tasks: + - name: prepare tool + script: .ci/scripts/prepare_tool.sh + - name: build examples + script: script/tool_runner.sh + args: ["build-examples", "--macos"] + - name: xcode analyze + script: script/tool_runner.sh + args: ["xcode-analyze", "--macos"] + - name: xcode analyze deprecation + # Ensure we don't accidentally introduce deprecated code. + script: script/tool_runner.sh + args: ["xcode-analyze", "--macos", "--macos-min-version=12.3"] + - name: native test + script: script/tool_runner.sh + args: ["native-test", "--macos"] + - name: drive examples + script: script/tool_runner.sh + args: ["drive-examples", "--macos", "--exclude=script/configs/exclude_integration_macos.yaml"] From 91e0dcdae587061bae200b9337ae04178e214a3e Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Mon, 30 Jan 2023 12:40:00 -0500 Subject: [PATCH 7/7] Fix arch --- .ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci.yaml b/.ci.yaml index 29d0cf826b34..b99ed5460056 100644 --- a/.ci.yaml +++ b/.ci.yaml @@ -84,7 +84,7 @@ targets: target_file: mac_build_all_plugins.yaml channel: stable - - name: Mac_x64 macos_platform_tests master + - name: Mac_arm64 macos_platform_tests master bringup: true # New task recipe: plugins/plugins timeout: 60 @@ -94,7 +94,7 @@ targets: version_file: flutter_master.version target_file: macos_platform_tests.yaml - - name: Mac_x64 macos_platform_tests stable + - name: Mac_arm64 macos_platform_tests stable bringup: true # New task recipe: plugins/plugins presubmit: false