[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[ci] Add LUCI versions of macOS ARM tests #6984

Merged
merged 8 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 70 additions & 15 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand All @@ -36,7 +47,7 @@ platform_properties:
device_type: none
cpu: x86
xcode: 14a5294e # xcode 14.0 beta 5


targets:
### iOS+macOS tasks ***
Expand All @@ -53,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
Expand All @@ -73,17 +84,61 @@ targets:
target_file: mac_build_all_plugins.yaml
channel: stable

- name: Mac_arm64 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_arm64 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 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_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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second space doesn't messing up the recipe script, right? I can picture a bug related to splitting on the spaces to parse Mac_arm64, but I didn't look.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the format we've been using for all of the packages and plugins LUCI tasks, and the script has been happy with it. Infra folks helped set up the initial naming structure.

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

- name: Mac_arm64 ios_build_all_plugins stable
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

# 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
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
Expand All @@ -92,7 +147,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
Expand All @@ -101,7 +156,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
Expand All @@ -110,7 +165,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.
Expand All @@ -122,7 +177,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
Expand All @@ -133,7 +188,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
Expand All @@ -144,7 +199,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
Expand All @@ -155,7 +210,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
Expand Down Expand Up @@ -190,7 +245,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: >
Expand All @@ -203,7 +258,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: >
Expand Down
3 changes: 2 additions & 1 deletion .ci/scripts/build_all_plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

platform="$1"
build_mode="$2"
shift 2
cd all_packages
flutter build "$platform" --"$build_mode"
flutter build "$platform" --"$build_mode" "$@"
11 changes: 11 additions & 0 deletions .ci/targets/ios_build_all_plugins.yaml
Original file line number Diff line number Diff line change
@@ -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"]
4 changes: 2 additions & 2 deletions .ci/targets/mac_build_all_plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
19 changes: 19 additions & 0 deletions .ci/targets/mac_platform_tests.yaml
Original file line number Diff line number Diff line change
@@ -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"]
Original file line number Diff line number Diff line change
Expand Up @@ -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"]