[go: nahoru, domu]

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

Commit

Permalink
Re-land testing of plugins on stable (#2203)
Browse files Browse the repository at this point in the history
* Revert "Revert "Enable testing on both master and stable (#2197)""

This reverts commit 1162798.

* Suppress testing of web plugins for now
* Run all plugins on stable
* Ignore deprecation warning in video player plugin
  • Loading branch information
collinjackson committed Oct 17, 2019
1 parent dce7169 commit 3e271bc
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 8 deletions.
47 changes: 41 additions & 6 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,57 @@ task:
cpu: 8
memory: 16G
upgrade_script:
- flutter channel stable
- flutter upgrade
- flutter channel master
- flutter upgrade
- git fetch origin master
activate_script: pub global activate flutter_plugin_tools
matrix:
- name: publishable
script: ./script/check_publish.sh
- name: test+format
- 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: "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
script: ./script/incremental_build.sh analyze
- name: build_all_plugins_apk
script: ./script/build_all_plugins_app.sh apk
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: build-apks+java-test+firebase-test-lab
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
matrix:
CHANNEL: "master"
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 Down Expand Up @@ -63,14 +87,18 @@ task:
- flutter channel master
- flutter upgrade
- git fetch origin master
activate_script:
- pub global activate flutter_plugin_tools
activate_script: pub global activate flutter_plugin_tools
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
matrix:
- name: build_all_plugins_ipa
script: ./script/build_all_plugins_app.sh ios --no-codesign
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: lint_darwin_plugins
script: ./script/lint_darwin_plugins.sh
- name: build-ipas+drive-examples
Expand All @@ -81,7 +109,14 @@ task:
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
matrix:
CHANNEL: "master"
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
- ./script/incremental_build.sh build-examples --ipa
- ./script/incremental_build.sh drive-examples
4 changes: 4 additions & 0 deletions packages/video_player/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.10.2+5

* Update unit test for compatibility with Flutter stable branch.

## 0.10.2+4

* Define clang module for iOS.
Expand Down
2 changes: 1 addition & 1 deletion packages/video_player/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: video_player
description: Flutter plugin for displaying inline video with other Flutter
widgets on Android and iOS.
author: Flutter Team <flutter-dev@googlegroups.com>
version: 0.10.2+4
version: 0.10.2+5
homepage: https://github.com/flutter/plugins/tree/master/packages/video_player

flutter:
Expand Down
6 changes: 5 additions & 1 deletion packages/video_player/test/video_player_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ class FakeEventsChannel {
}

void sendEvent(dynamic event) {
ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage(
// TODO(jackson): This has been deprecated and should be replaced
// with `ServicesBinding.instance.defaultBinaryMessenger` when it's
// available on all the versions of Flutter that we test.
// ignore: deprecated_member_use
defaultBinaryMessenger.handlePlatformMessage(
eventsMethodChannel.name,
const StandardMethodCodec().encodeSuccessEnvelope(event),
(ByteData data) {});
Expand Down
3 changes: 3 additions & 0 deletions script/incremental_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ else

if [[ "$CHANGED_PACKAGES" == "" ]]; then
echo "No changes detected in packages."
echo "Running for all packages"
(cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" $PLUGIN_SHARDING)
else
echo running "${ACTIONS[@]}"
(cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" $PLUGIN_SHARDING)
echo "Running version check for changed packages"
(cd "$REPO_DIR" && pub global run flutter_plugin_tools version-check --base_sha="$(get_branch_base_sha)")
Expand Down

0 comments on commit 3e271bc

Please sign in to comment.