-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Switch to Cirrus, turn off Travis #3
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
task: | ||
container: | ||
image: cirrusci/flutter:latest | ||
cpu: 4 | ||
memory: 8G | ||
upgrade_script: | ||
- 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 | ||
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-5.0 main" | ||
- sudo apt-get update | ||
- sudo apt-get install -y --allow-unauthenticated clang-format-5.0 | ||
format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-5.0 | ||
test_script: ./script/incremental_build.sh test | ||
- name: analyze | ||
script: ./script/incremental_build.sh analyze | ||
- name: build-apks+java-test | ||
env: | ||
matrix: | ||
BUILD_SHARDING: "--shardIndex 0 --shardCount 2" | ||
BUILD_SHARDING: "--shardIndex 1 --shardCount 2" | ||
script: | ||
- ./script/incremental_build.sh build-examples --apk | ||
- ./script/incremental_build.sh java-test # must come after apk build | ||
|
||
task: | ||
name: build-ipas | ||
osx_instance: | ||
image: high-sierra-xcode-9.4 | ||
env: | ||
PATH: $PATH:/usr/local/bin | ||
matrix: | ||
BUILD_SHARDING: "--shardIndex 0 --shardCount 2" | ||
BUILD_SHARDING: "--shardIndex 1 --shardCount 2" | ||
setup_script: | ||
- brew update | ||
- brew install libimobiledevice | ||
- brew install ideviceinstaller | ||
- brew install ios-deploy | ||
- pod repo update | ||
- git clone https://github.com/flutter/flutter.git | ||
- git fetch origin master | ||
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH | ||
- flutter doctor | ||
- pub global activate flutter_plugin_tools | ||
build_script: | ||
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH | ||
- ./script/incremental_build.sh build-examples --ipa |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -302,4 +302,3 @@ class PaletteSwatch extends StatelessWidget { | |
return swatch; | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# This script checks to make sure that each of the plugins *could* be published. | ||
# It doesn't actually publish anything. | ||
|
||
# So that users can run this script from anywhere and it will work as expected. | ||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" | ||
REPO_DIR="$(dirname "$SCRIPT_DIR")" | ||
|
||
source "$SCRIPT_DIR/common.sh" | ||
|
||
function check_publish() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to update any documentation (such as contributing.md) to point to the existence of such a script? or is it forced by Cirrus? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, not forced by Cirrus. I'll add a line in CONTRIBUTING.md |
||
local failures=() | ||
for package_name in "$@"; do | ||
local dir="$REPO_DIR/packages/$package_name" | ||
echo "Checking that $package_name can be published." | ||
if (cd "$dir" && pub publish --dry-run > /dev/null); then | ||
echo "Package $package_name is able to be published." | ||
else | ||
error "Unable to publish $package_name" | ||
failures=("${failures[@]}" "$package_name") | ||
fi | ||
done | ||
if [[ "${#failures[@]}" != 0 ]]; then | ||
error "FAIL: The following ${#failures[@]} package(s) failed the publishing check:" | ||
for failure in "${failures[@]}"; do | ||
error "$failure" | ||
done | ||
fi | ||
return "${#failures[@]}" | ||
} | ||
|
||
# Sets CHANGED_PACKAGE_LIST | ||
check_changed_packages | ||
|
||
if [[ "${#CHANGED_PACKAGE_LIST[@]}" != 0 ]]; then | ||
check_publish "${CHANGED_PACKAGE_LIST[@]}" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fishy. Rationale? Can we just make the closure async?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it already is async, but testWidgets requires a function that returns a
Future<Null>
. This was to fix an analyzer finding that showed up because the analyzer got more precise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I misunderstood. Yes, the closure is now async.