Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
Merge branch 'master' into patch-1
  • Loading branch information
stuartmorgan-g committed Feb 24, 2021
commit 644f3f17cf6ca0d9aa79984ec9bc2c38d28a535e
The diff you're trying to view is too large. We only load the first 3000 changed files.
21 changes: 20 additions & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
FROM cirrusci/flutter:stable

FROM cirrusci/flutter:latest
RUN sudo apt-get update -y

RUN sudo apt-get install -y --no-install-recommends gnupg

# Add repo for gcloud sdk and install it
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | \
sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

RUN sudo apt-get update && sudo apt-get install -y google-cloud-sdk && \
gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true

RUN yes | sdkmanager \
"platforms;android-27" \
Expand All @@ -8,3 +22,8 @@ RUN yes | sdkmanager \
"extras;android;m2repository"

RUN yes | sdkmanager --licenses

# Add repo for Google Chrome and install it
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
RUN echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends google-chrome-stable
31 changes: 31 additions & 0 deletions .ci/Dockerfile-LinuxDesktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM cirrusci/flutter:stable

RUN sudo apt-get update -y

RUN sudo apt-get install -y --no-install-recommends gnupg

# Add repo for gcloud sdk and install it
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | \
sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

RUN sudo apt-get update && sudo apt-get install -y google-cloud-sdk && \
gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true

# Install xvfb to allow running headless
RUN sudo apt-get install -y xvfb libegl1-mesa
# Install Linux desktop build tool requirements.
RUN sudo apt-get install -y clang cmake ninja-build file pkg-config
# Install necessary libraries.
RUN sudo apt-get install -y libgtk-3-dev

# Add repo for Google Chrome and install it, for url_launcher tests.
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
RUN echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends google-chrome-stable
# Make it the default so http: has a handler.
RUN sudo apt-get install -y xdg-utils
RUN xdg-settings set default-web-browser google-chrome.desktop
19 changes: 19 additions & 0 deletions .ci/dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
This directory contains resources that the Flutter team uses during
the development of plugins.

## Luci builder file
`try_builders.json` contains the supported luci try builders
for plugins. It follows format:
```json
{
"builders":[
{
"name":"yyy",
"repo":"plugins",
"enabled":true
}
]
}
```
This file will be mainly used in [`flutter/cocoon`](https://github.com/flutter/cocoon)
to trigger/update pre-submit luci tasks.
9 changes: 9 additions & 0 deletions .ci/dev/try_builders.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"builders":[
{
"name":"Windows Plugins",
"repo":"plugins",
"enabled":true
}
]
}
222 changes: 206 additions & 16 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,98 @@
task:
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
container:
dockerfile: .ci/Dockerfile
cpu: 8
memory: 16G
env:
INTEGRATION_TEST_PATH: "./packages/integration_test"
upgrade_script:
- flutter channel stable
- flutter upgrade
- flutter channel beta
- flutter upgrade
- flutter channel master
- flutter upgrade
- git fetch origin master
activate_script: pub global activate flutter_plugin_tools
submodules_script:
- git submodule init
- git submodule update
matrix:
- name: publishable
script: ./script/check_publish.sh
- name: test+format
script:
- flutter channel master
- ./script/check_publish.sh
- name: format
install_script:
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main"
- sudo apt-get update
- sudo apt-get install -y --allow-unauthenticated clang-format-7
format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7
test_script: ./script/incremental_build.sh test
- name: test
env:
matrix:
CHANNEL: "master"
CHANNEL: "beta"
CHANNEL: "stable"
test_script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
- flutter channel $CHANNEL
- ./script/incremental_build.sh test
- name: analyze
env:
matrix:
CHANNEL: "master"
CHANNEL: "beta"
CHANNEL: "stable"
script: ./script/incremental_build.sh analyze
- name: build_all_plugins_apk
script: ./script/build_all_plugins_app.sh apk
- name: build-apks+java-test+drive-examples
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
CHANNEL: "master"
CHANNEL: "beta"
CHANNEL: "stable"
script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
- flutter channel $CHANNEL
- ./script/build_all_plugins_app.sh apk
- name: integration_web_smoke_test
# Tests integration example test in web.
only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''"
install_script:
- flutter config --enable-web
- git clone https://github.com/flutter/web_installers.git
- cd web_installers/packages/web_drivers/
- pub get
- dart lib/web_driver_installer.dart chromedriver --install-only
- ./chromedriver/chromedriver --port=4444 &
test_script:
- cd $INTEGRATION_TEST_PATH/example/
- flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome
- name: build-apks+java-test+firebase-test-lab
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
matrix:
CHANNEL: "master"
CHANNEL: "beta"
CHANNEL: "stable"
MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4]
script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
- flutter channel $CHANNEL
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
# might include non-ASCII characters which makes Gradle crash.
# See: https://github.com/flutter/flutter/issues/24935
Expand All @@ -43,36 +105,164 @@ task:
- export CIRRUS_COMMIT_MESSAGE=""
- ./script/incremental_build.sh build-examples --apk
- ./script/incremental_build.sh java-test # must come after apk build
- if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then
- echo "This user does not have permission to run Firebase Test Lab tests."
- else
- echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json
- ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26
- fi
- export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
- export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`

task:
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
container:
dockerfile: .ci/Dockerfile-LinuxDesktop
cpu: 8
memory: 16G
env:
INTEGRATION_TEST_PATH: "./packages/integration_test"
upgrade_script:
- flutter channel stable
- flutter upgrade
- flutter channel beta
- flutter upgrade
- flutter channel master
- flutter upgrade
- git fetch origin master
submodules_script:
- git submodule init
- git submodule update
matrix:
- name: build-linux+drive-examples
install_script:
- flutter config --enable-linux-desktop
build_script:
# TODO(stuartmorgan): Include stable once Linux is supported on stable.
- flutter channel master
- ./script/incremental_build.sh build-examples --linux
- xvfb-run ./script/incremental_build.sh drive-examples --linux

task:
# Xcode 12 task
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: mojave-xcode-10.2-flutter
setup_script:
- pod repo update
image: big-sur-xcode-12.3
upgrade_script:
- sudo gem install cocoapods
- flutter channel stable
- flutter upgrade
- flutter channel beta
- flutter upgrade
- flutter channel master
- flutter upgrade
- git fetch origin master
activate_script:
- pub global activate flutter_plugin_tools
submodules_script:
- git submodule init
- git submodule update
create_simulator_script:
- xcrun simctl list
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-12-2 | xargs xcrun simctl boot
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot
matrix:
- name: build_all_plugins_ipa
script: ./script/build_all_plugins_app.sh ios --no-codesign
env:
matrix:
CHANNEL: "master"
CHANNEL: "beta"
CHANNEL: "stable"
script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
- flutter channel $CHANNEL
- ./script/build_all_plugins_app.sh ios --no-codesign
- name: build-ipas+drive-examples
env:
PATH: $PATH:/usr/local/bin
PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera/camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter"
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
matrix:
CHANNEL: "master"
CHANNEL: "beta"
CHANNEL: "stable"
SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
build_script:
# TODO(jackson): Allow web plugins once supported on stable
# https://github.com/flutter/flutter/issues/42864
- if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi
- flutter channel $CHANNEL
- flutter upgrade
- ./script/incremental_build.sh build-examples --ipa
- ./script/incremental_build.sh drive-examples
- ./script/incremental_build.sh drive-examples --ios
- ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3"

task:
# Xcode 11 task
# TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12.
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: catalina-xcode-11.3.1-flutter
upgrade_script:
- sudo gem install cocoapods
- flutter channel stable
- flutter upgrade
- flutter channel master
- flutter upgrade
- git fetch origin master
submodules_script:
- git submodule init
- git submodule update
create_simulator_script:
- xcrun simctl list
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot
matrix:
- name: lint_darwin_plugins
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
script:
# TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
- find . -name "*.podspec" | xargs grep -l "osx" | xargs rm
# Skip the dummy podspecs used to placate the tool.
- find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm
- ./script/incremental_build.sh podspecs

task:
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
only_if: $CIRRUS_TAG == ''
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: big-sur-xcode-12.3
setup_script:
- flutter config --enable-macos-desktop
upgrade_script:
- sudo gem install cocoapods
- flutter channel master
- flutter upgrade
- git fetch origin master
submodules_script:
- git submodule init
- git submodule update
matrix:
- name: build_all_plugins_app
script:
- flutter channel master
- ./script/build_all_plugins_app.sh macos
- name: build-apps+drive-examples
env:
PATH: $PATH:/usr/local/bin
build_script:
- flutter channel master
- ./script/incremental_build.sh build-examples --macos --no-ipa
- ./script/incremental_build.sh drive-examples --macos
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BasedOnStyle: Google
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.