Skip to content

[ci] Enable the all_packages tasks #2724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2022
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
28 changes: 28 additions & 0 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,34 @@ targets:
{"dependency": "vs_build", "version": "version:vs2019"}
]

- name: Windows windows-build_all_packages master
bringup: true
recipe: packages/packages
timeout: 30
properties:
add_recipes_cq: "true"
target_file: build_all_packages.yaml
channel: master
version_file: flutter_master.version
dependencies: >
[
{"dependency": "vs_build", "version": "version:vs2019"}
]

- name: Windows windows-build_all_packages stable
bringup: true
recipe: packages/packages
timeout: 30
properties:
add_recipes_cq: "true"
target_file: build_all_packages.yaml
channel: stable
version_file: flutter_stable.version
dependencies: >
[
{"dependency": "vs_build", "version": "version:vs2019"}
]

- name: Linux ci_yaml packages roller
recipe: infra/ci_yaml
timeout: 30
Expand Down
8 changes: 8 additions & 0 deletions .ci/scripts/build_all_packages_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/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.

cd all_plugins
flutter build windows --debug
flutter build windows --release
7 changes: 7 additions & 0 deletions .ci/scripts/create_all_packages_app.sh
Original file line number Diff line number Diff line change
@@ -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.

dart pub global run flutter_plugin_tools all-plugins-app \
--output-dir=. --exclude script/configs/exclude_all_packages_app.yaml
7 changes: 7 additions & 0 deletions .ci/targets/build_all_packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
- name: create all_packages app
script: .ci/scripts/create_all_packages_app.sh
- name: build all_packages app
script: .ci/scripts/build_all_packages_app.sh
90 changes: 77 additions & 13 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
- flutter doctor -v
<< : *TOOL_SETUP_TEMPLATE

# Ensures that the latest versions of all of the 1P packages can be used
# together. See script/configs/exclude_all_packages_app.yaml for exceptions.
build_all_packages_app_template: &BUILD_ALL_PACKAGES_APP_TEMPLATE
create_all_packages_app_script:
- $PLUGIN_TOOL_COMMAND all-plugins-app --output-dir=. --exclude script/configs/exclude_all_packages_app.yaml
build_all_packages_debug_script:
- cd all_plugins
- if [[ "$BUILD_ALL_ARGS" == "web" ]]; then
- echo "Skipping; web does not support debug builds"
- else
- flutter build $BUILD_ALL_ARGS --debug
- fi
build_all_packages_release_script:
- cd all_plugins
- flutter build $BUILD_ALL_ARGS --release

# Light-workload Linux tasks.
# These use default machines, with fewer CPUs, to reduce pressure on the
# concurrency limits.
Expand Down Expand Up @@ -188,6 +204,22 @@ task:
- else
- ./script/tool_runner.sh custom-test --exclude=pigeon,flutter_image
- fi
### Web tasks ###
- name: web-build_all_packages
env:
BUILD_ALL_ARGS: "web"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
<< : *BUILD_ALL_PACKAGES_APP_TEMPLATE
### Linux desktop tasks ###
- name: linux-build_all_packages
env:
BUILD_ALL_ARGS: "linux"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
<< : *BUILD_ALL_PACKAGES_APP_TEMPLATE

# Heavy-workload Linux tasks.
# These use machines with more CPUs and memory, so will reduce parallelization
Expand Down Expand Up @@ -221,6 +253,13 @@ task:
- ./script/tool_runner.sh build-examples --apk --exclude=extension_google_sign_in_as_googleapis_auth
native_unit_test_scipt:
- ./script/tool_runner.sh native-test --android --no-integration
- name: android-build_all_packages
env:
BUILD_ALL_ARGS: "apk"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
<< : *BUILD_ALL_PACKAGES_APP_TEMPLATE
### Web tasks ###
- name: web-platform_tests
env:
Expand Down Expand Up @@ -268,6 +307,23 @@ task:
<< : *FLUTTER_UPGRADE_TEMPLATE
<< : *MACOS_ARM_TEMPLATE
matrix:
- name: macos-custom_package_tests
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The weird diff here and below is because I noticed that I had accidentally put this in the "iOS tasks" group when I added groups to this file, but we don't actually know what the target platform(s) is/are for custom test scripts because they can do anything.

# Run on macOS x64 image with Java runtime installed.
env:
PATH: $PATH:/usr/local/bin
matrix:
CHANNEL: "master"
CHANNEL: "stable"
local_tests_script:
# flutter_image
# https://github.com/flutter/flutter/issues/100387
# script/configs/linux_only_custom_test.yaml
# Custom tests need Chrome for these packages. (They run in linux-custom_package_tests)
- if [[ "$CHANNEL" == "master" ]]; then
- ./script/tool_runner.sh custom-test --exclude=script/configs/linux_only_custom_test.yaml
- else
- ./script/tool_runner.sh custom-test --exclude=flutter_image,script/configs/linux_only_custom_test.yaml
- fi
### iOS tasks ###
- name: ios-platform_tests
# Don't run full platform tests on both channels in pre-submit.
Expand All @@ -284,23 +340,14 @@ task:
- ./script/tool_runner.sh build-examples --ios
native_test_script:
- ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 13,OS=latest"
- name: macos-custom_package_tests
# Run on macOS x64 image with Java runtime installed.
### iOS tasks ###
- name: ios-build_all_packages
env:
PATH: $PATH:/usr/local/bin
BUILD_ALL_ARGS: "ios --no-codesign"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
local_tests_script:
# flutter_image
# https://github.com/flutter/flutter/issues/100387
# script/configs/linux_only_custom_test.yaml
# Custom tests need Chrome for these packages. (They run in linux-custom_package_tests)
- if [[ "$CHANNEL" == "master" ]]; then
- ./script/tool_runner.sh custom-test --exclude=script/configs/linux_only_custom_test.yaml
- else
- ./script/tool_runner.sh custom-test --exclude=flutter_image,script/configs/linux_only_custom_test.yaml
- fi
<< : *BUILD_ALL_PACKAGES_APP_TEMPLATE
### macOS desktop tasks ###
- name: macos-platform_tests
# Don't run full platform tests on both channels in pre-submit.
Expand All @@ -314,3 +361,20 @@ task:
- ./script/tool_runner.sh build-examples --macos
native_test_script:
- ./script/tool_runner.sh native-test --macos

# Intel macOS tasks.
task:
<< : *MACOS_INTEL_TEMPLATE
<< : *FLUTTER_UPGRADE_TEMPLATE
matrix:
### macOS desktop tasks ###
# macos-platform_tests builds all the packages on ARM, so this build is run
# on Intel to give us build coverage of both host types.
- name: macos-build_all_packages
env:
BUILD_ALL_ARGS: "macos"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
setup_script:
<< : *BUILD_ALL_PACKAGES_APP_TEMPLATE
10 changes: 10 additions & 0 deletions script/configs/exclude_all_packages_app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This list should be kept as short as possible, and things should remain here
# only as long as necessary, since in general the goal is for all of the latest
# versions of packages to be mutually compatible.
#
# An example use case for this list would be to temporarily add packages while
# updating multiple packages for a breaking change in a common dependency in
# cases where using a relaxed version constraint isn't possible.

# This is a permament entry, as it should never be a direct app dependency.
- plugin_platform_interface