| task: |
| use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' |
| container: |
| dockerfile: .ci/Dockerfile |
| cpu: 8 |
| memory: 16G |
| 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-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: analyze |
| script: ./script/incremental_build.sh analyze |
| - name: build-apks+java-test+drive-examples |
| env: |
| matrix: |
| PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" |
| PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" |
| MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] |
| 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. |
| # See: https://github.com/flutter/flutter/issues/24935 |
| # This is a temporary workaround until we figure how to properly configure |
| # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). |
| # TODO(amirh): Set the locale to UTF8. |
| - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt |
| - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt |
| - export CIRRUS_CHANGE_MESSAGE="" |
| - export CIRRUS_COMMIT_MESSAGE="" |
| - ./script/incremental_build.sh build-examples --apk |
| - ./script/incremental_build.sh java-test # must come after apk build |
| # TODO(jackson): Re-enable once Android emulators support Firebase |
| # https://github.com/flutter/flutter/issues/29571 |
| # - ./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+drive-examples |
| osx_instance: |
| image: mojave-xcode-10.1 |
| env: |
| PATH: $PATH:/usr/local/bin |
| 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" |
| SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] |
| 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 |
| - 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 |