Skip to content

Commit

Permalink
add driver test command to cirrus (firebase#1342)
Browse files Browse the repository at this point in the history
This teaches Cirrus to run the new drive-examples command added in flutter/plugin_tools#29 on iOS and Android simulators.

I'm sharding the plugins tests more and requesting more powerful Linux VMs to ensure that the tests don't time out now that they're running simulators.
  • Loading branch information
collinjackson authored Mar 18, 2019
1 parent 4e7e96f commit 88d29cb
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
container:
dockerfile: .ci/Dockerfile
cpu: 4
memory: 8G
cpu: 8
memory: 16G
upgrade_script:
- flutter channel master
- flutter upgrade
Expand All @@ -22,11 +22,16 @@ task:
test_script: ./script/incremental_build.sh test
- name: analyze
script: ./script/incremental_build.sh analyze
- name: build-apks+java-test
- name: build-apks+java-test+drive-examples
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
create_device_script:
echo no | avdmanager -v create avd -n test -k "system-images;android-21;default;armeabi-v7a"
start_emulator_background_script:
- $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window
wait_for_emulator_script: adb wait-for-device
script:
# Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
# might include non-ASCII characters which makes Gradle crash.
Expand All @@ -40,19 +45,22 @@ task:
- export CIRRUS_COMMIT_MESSAGE=""
- ./script/incremental_build.sh build-examples --apk
- ./script/incremental_build.sh java-test # must come after apk build
- ./script/incremental_build.sh drive-examples
- export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt`
- export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt`

task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
name: build-ipas
name: build-ipas+drive-examples
osx_instance:
image: mojave-xcode-10.1
env:
PATH: $PATH:/usr/local/bin
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
setup_script:
- brew update
- brew install libimobiledevice
Expand All @@ -64,6 +72,8 @@ task:
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter doctor
- pub global activate flutter_plugin_tools
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-12-1 | xargs xcrun simctl boot
build_script:
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
- ./script/incremental_build.sh build-examples --ipa
- ./script/incremental_build.sh drive-examples

0 comments on commit 88d29cb

Please sign in to comment.