Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 1 | # CIRRUS CONFIGURATION FILE |
Todd Volkert | 6d848eb | 2019-12-05 12:13:01 -0800 | [diff] [blame] | 2 | # https://cirrus-ci.org/guide/writing-tasks/ |
Fedor Korotkov | 7333459 | 2018-05-01 18:11:21 -0400 | [diff] [blame] | 3 | |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 4 | environment: |
| 5 | # For details about environment variables used in Cirrus, including how encrypted variables work, |
| 6 | # see https://cirrus-ci.org/guide/writing-tasks/#environment-variables |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 7 | # We change Flutter's directory to include a space in its name (see $CIRRUS_WORKING_DIR) so that |
| 8 | # we constantly test path names with spaces in them. The FLUTTER_SDK_PATH_WITH_SPACE variable must |
| 9 | # therefore have a space in it. |
| 10 | FLUTTER_SDK_PATH_WITH_SPACE: "flutter sdk" |
| 11 | # We force BOT to true so that all our tools know we're in a CI environment. This avoids any |
| 12 | # dependency on precisely how Cirrus is detected by our tools. |
| 13 | BOT: "true" |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 14 | |
keyonghan | 9f72995 | 2021-12-07 13:09:05 -0800 | [diff] [blame] | 15 | gcp_credentials: ENCRYPTED[!cc769765170bebc37e0556e2da5915ca64ee37f4ec8c966ec147e2f59578b476c99e457eafce4e2f8b1a4e305f7096b8!] |
godofredoc | eb1868b | 2021-03-19 14:26:04 -0700 | [diff] [blame] | 16 | |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 17 | # LINUX SHARDS |
Fedor Korotkov | 7333459 | 2018-05-01 18:11:21 -0400 | [diff] [blame] | 18 | task: |
godofredoc | eb1868b | 2021-03-19 14:26:04 -0700 | [diff] [blame] | 19 | gke_container: |
Christopher Fujino | 20af1f2 | 2019-10-29 14:29:27 -0700 | [diff] [blame] | 20 | dockerfile: "dev/ci/docker_linux/Dockerfile" |
godofredoc | eb1868b | 2021-03-19 14:26:04 -0700 | [diff] [blame] | 21 | builder_image_name: docker-builder # gce vm image |
| 22 | builder_image_project: flutter-cirrus |
godofredoc | c2d12ea | 2021-03-23 10:11:54 -0700 | [diff] [blame] | 23 | cluster_name: test-cluster |
godofredoc | eb1868b | 2021-03-19 14:26:04 -0700 | [diff] [blame] | 24 | zone: us-central1-a |
| 25 | namespace: default |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 26 | cpu: $CPU |
| 27 | memory: $MEMORY |
Todd Volkert | 39fa002 | 2020-07-27 21:11:43 -0700 | [diff] [blame] | 28 | use_in_memory_disk: $USE_IN_MEMORY_DISK |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 29 | environment: |
| 30 | # We shrink our default resource requirement as much as possible because that way we are more |
| 31 | # likely to get scheduled. We require 4G of RAM because most of the shards (all but one as of |
| 32 | # October 2019) just get OOM-killed with less. Some shards may need more. When increasing the |
| 33 | # requirements for select shards, please leave a comment on those shards saying when you |
| 34 | # increased the requirements, what numbers you tried, and what the results were. |
| 35 | CPU: 1 # 0.1-8 without compute credits, 0.1-30 with (yes, you can go fractional) |
| 36 | MEMORY: 4G # 256M-24G without compute credits, 256M-90G with |
| 37 | CIRRUS_WORKING_DIR: "/tmp/$FLUTTER_SDK_PATH_WITH_SPACE" |
Dan Field | ed73f94 | 2020-02-05 13:18:46 -0800 | [diff] [blame] | 38 | CIRRUS_DOCKER_CONTEXT: "dev/" |
Fedor Korotkov | 7333459 | 2018-05-01 18:11:21 -0400 | [diff] [blame] | 39 | PATH: "$CIRRUS_WORKING_DIR/bin:$CIRRUS_WORKING_DIR/bin/cache/dart-sdk/bin:$PATH" |
Danny Tuppeny | c19142d | 2018-12-17 17:29:09 +0000 | [diff] [blame] | 40 | ANDROID_SDK_ROOT: "/opt/android_sdk" |
Christopher Fujino | 34c977f | 2020-09-03 13:49:26 -0700 | [diff] [blame] | 41 | SHOULD_UPDATE_PACKAGES: 'TRUE' # can be overridden at the task level |
Todd Volkert | 39fa002 | 2020-07-27 21:11:43 -0700 | [diff] [blame] | 42 | USE_IN_MEMORY_DISK: false |
Danny Tuppeny | 07e93b3 | 2018-08-02 20:45:07 +0100 | [diff] [blame] | 43 | pub_cache: |
| 44 | folder: $HOME/.pub-cache |
| 45 | fingerprint_script: echo $OS; grep -r --include=pubspec.yaml 'PUBSPEC CHECKSUM' "$CIRRUS_WORKING_DIR" |
Jenn Magder | be97fdb | 2020-02-27 10:34:46 -0800 | [diff] [blame] | 46 | reupload_on_changes: false |
Danny Tuppeny | 07e93b3 | 2018-08-02 20:45:07 +0100 | [diff] [blame] | 47 | flutter_pkg_cache: |
| 48 | folder: bin/cache/pkg |
Kate Lovett | 0379dd1 | 2019-07-23 09:30:41 -0700 | [diff] [blame] | 49 | fingerprint_script: echo $OS; cat bin/internal/*.version |
Jenn Magder | be97fdb | 2020-02-27 10:34:46 -0800 | [diff] [blame] | 50 | reupload_on_changes: false |
Danny Tuppeny | 07e93b3 | 2018-08-02 20:45:07 +0100 | [diff] [blame] | 51 | artifacts_cache: |
| 52 | folder: bin/cache/artifacts |
Christopher Fujino | 102ab1e | 2019-07-15 09:22:29 -0700 | [diff] [blame] | 53 | fingerprint_script: echo $OS; cat bin/internal/*.version |
Jenn Magder | be97fdb | 2020-02-27 10:34:46 -0800 | [diff] [blame] | 54 | reupload_on_changes: false |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 55 | setup_script: |
| 56 | - date |
Jenn Magder | 6f0136c | 2020-01-28 12:52:30 -0800 | [diff] [blame] | 57 | - git clean -xffd --exclude=bin/cache/ |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 58 | - git fetch origin |
| 59 | - git fetch origin master # To set FETCH_HEAD, so that "git merge-base" works. |
| 60 | - flutter config --no-analytics |
Christopher Fujino | 34c977f | 2020-09-03 13:49:26 -0700 | [diff] [blame] | 61 | - if [ "$SHOULD_UPDATE_PACKAGES" == TRUE ]; then flutter update-packages; fi |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 62 | - flutter doctor -v |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 63 | - ./dev/bots/accept_android_sdk_licenses.sh |
| 64 | - date |
| 65 | on_failure: |
| 66 | failure_script: |
| 67 | - date |
| 68 | - which flutter |
Fedor Korotkov | 7333459 | 2018-05-01 18:11:21 -0400 | [diff] [blame] | 69 | matrix: |
Greg Spencer | 0151359 | 2021-08-03 10:20:04 -0700 | [diff] [blame] | 70 | - name: analyze-linux # linux-only |
| 71 | only_if: "$CIRRUS_PR != ''" |
| 72 | environment: |
| 73 | # Empirically, the analyze-linux shard runs surprisingly fast (under 15 minutes) with just 1 |
| 74 | # CPU. We noticed OOM failures with 6GB 4/2020, so we increased the memory. |
| 75 | CPU: 1 |
| 76 | MEMORY: 8G |
| 77 | script: |
| 78 | - dart --enable-asserts ./dev/bots/analyze.dart |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 79 | |
godofredoc | 48b9c3d | 2020-08-14 00:04:33 -0700 | [diff] [blame] | 80 | - name: framework_tests-widgets-linux |
godofredoc | d504437 | 2020-08-18 17:01:09 -0700 | [diff] [blame] | 81 | only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_tools/lib/src/test/**', 'bin/**') && $CIRRUS_PR != ''" |
godofredoc | 48b9c3d | 2020-08-14 00:04:33 -0700 | [diff] [blame] | 82 | environment: |
| 83 | # We use 3 CPUs because that's the minimum required to get framework_tests-widgets-linux |
| 84 | # running fast enough that it is not the long pole, as of October 2019. |
| 85 | CPU: 3 |
godofredoc | 48b9c3d | 2020-08-14 00:04:33 -0700 | [diff] [blame] | 86 | script: |
| 87 | - dart --enable-asserts ./dev/bots/test.dart |
| 88 | |
| 89 | - name: framework_tests-libraries-linux |
godofredoc | d504437 | 2020-08-18 17:01:09 -0700 | [diff] [blame] | 90 | only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_tools/lib/src/test/**', 'bin/**') && $CIRRUS_PR != ''" |
godofredoc | 48b9c3d | 2020-08-14 00:04:33 -0700 | [diff] [blame] | 91 | environment: |
| 92 | # We use 3 CPUs because that's the minimum required to get the |
| 93 | # framework_tests-libraries-linux shard running fast enough that it is not the long pole, as |
| 94 | # of October 2019. |
| 95 | CPU: 3 |
godofredoc | 48b9c3d | 2020-08-14 00:04:33 -0700 | [diff] [blame] | 96 | script: |
| 97 | - dart --enable-asserts ./dev/bots/test.dart |
| 98 | |
| 99 | - name: framework_tests-misc-linux |
| 100 | # this includes the tests for directories in dev/ |
godofredoc | d504437 | 2020-08-18 17:01:09 -0700 | [diff] [blame] | 101 | only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter/**', 'packages/flutter_goldens/**', 'packages/flutter_test/**', 'packages/flutter_tools/lib/src/test/**', 'bin/**') && $CIRRUS_PR != ''" |
godofredoc | 48b9c3d | 2020-08-14 00:04:33 -0700 | [diff] [blame] | 102 | environment: |
| 103 | # We use 3 CPUs because that's the minimum required to get framework_tests-misc-linux |
| 104 | # running fast enough that it is not the long pole, as of October 2019. |
| 105 | CPU: 3 |
| 106 | script: |
| 107 | - dart --enable-asserts ./dev/bots/test.dart |
| 108 | |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 109 | - name: tool_tests-general-linux |
godofredoc | d504437 | 2020-08-18 17:01:09 -0700 | [diff] [blame] | 110 | only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter_tools/**', 'bin/**') && $CIRRUS_PR != ''" |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 111 | environment: |
Greg Spencer | 99055c7 | 2019-11-12 08:04:48 -0800 | [diff] [blame] | 112 | # As of November 2019, the tool_tests-general-linux shard got faster with more CPUs up to 4 |
| 113 | # CPUs, and needed at least 10G of RAM to not run out of memory. |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 114 | CPU: 4 |
Greg Spencer | 99055c7 | 2019-11-12 08:04:48 -0800 | [diff] [blame] | 115 | MEMORY: 10G |
Christopher Fujino | 34c977f | 2020-09-03 13:49:26 -0700 | [diff] [blame] | 116 | SHOULD_UPDATE_PACKAGES: "FALSE" |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 117 | script: |
Sigurd Meldgaard | bce3662 | 2021-08-30 19:40:10 +0200 | [diff] [blame] | 118 | - (cd packages/flutter_tools; dart __deprecated_pub get) |
| 119 | - (cd packages/flutter_tools/test/data/asset_test/main; dart __deprecated_pub get) |
| 120 | - (cd packages/flutter_tools/test/data/asset_test/font; dart __deprecated_pub get) |
| 121 | - (cd dev/bots; dart __deprecated_pub get) |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 122 | - dart --enable-asserts ./dev/bots/test.dart |
| 123 | |
| 124 | - name: tool_tests-commands-linux |
godofredoc | d504437 | 2020-08-18 17:01:09 -0700 | [diff] [blame] | 125 | only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter_tools/**', 'bin/**') && $CIRRUS_PR != ''" |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 126 | environment: |
| 127 | # As of October 2019, the tool_tests-commands-linux shard got faster with more CPUs up to 6 |
| 128 | # CPUs, and needed at least 8G of RAM to not run out of memory. |
Danny Tuppeny | 92e9f5f | 2019-11-19 19:52:02 +0000 | [diff] [blame] | 129 | # Increased to 10GB on 19th Nov 2019 due to significant number of OOMKilled failures on PR builds. |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 130 | CPU: 6 |
Danny Tuppeny | 92e9f5f | 2019-11-19 19:52:02 +0000 | [diff] [blame] | 131 | MEMORY: 10G |
Christopher Fujino | 34c977f | 2020-09-03 13:49:26 -0700 | [diff] [blame] | 132 | SHOULD_UPDATE_PACKAGES: "FALSE" |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 133 | script: |
Sigurd Meldgaard | bce3662 | 2021-08-30 19:40:10 +0200 | [diff] [blame] | 134 | - (cd packages/flutter_tools; dart __deprecated_pub get) |
| 135 | - (cd dev/bots; dart __deprecated_pub get) |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 136 | - dart --enable-asserts ./dev/bots/test.dart |
| 137 | |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 138 | - name: docs-linux # linux-only |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 139 | environment: |
Todd Volkert | 8c5c720 | 2020-07-28 01:07:42 -0700 | [diff] [blame] | 140 | CPU: 4 |
Greg Spencer | 10e4b04 | 2021-08-11 19:48:29 -0700 | [diff] [blame] | 141 | MEMORY: 12G |
godofredoc | 7b04422 | 2021-02-02 18:04:52 -0800 | [diff] [blame] | 142 | only_if: "$CIRRUS_PR != ''" |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 143 | script: |
Todd Volkert | 8c5c720 | 2020-07-28 01:07:42 -0700 | [diff] [blame] | 144 | - ./dev/bots/docs.sh |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 145 | |
Ian Hickson | 176ebfd | 2019-07-10 12:10:28 -0700 | [diff] [blame] | 146 | - name: customer_testing-linux |
godofredoc | d504437 | 2020-08-18 17:01:09 -0700 | [diff] [blame] | 147 | only_if: "$CIRRUS_PR != ''" |
Ian Hickson | 0b8174e | 2021-07-02 19:16:04 -0700 | [diff] [blame] | 148 | environment: |
Ian Hickson | 124dc66 | 2019-10-18 16:35:39 -0700 | [diff] [blame] | 149 | # Empirically, this shard runs fine at 1 CPU and 4G RAM as of October 2019. We will probably |
| 150 | # want to grow this container when we invite people to add their tests in large numbers. |
Ian Hickson | 0b8174e | 2021-07-02 19:16:04 -0700 | [diff] [blame] | 151 | SHOULD_UPDATE_PACKAGES: "FALSE" |
Ian Hickson | 176ebfd | 2019-07-10 12:10:28 -0700 | [diff] [blame] | 152 | script: |
Ian Hickson | 0b8174e | 2021-07-02 19:16:04 -0700 | [diff] [blame] | 153 | # Cirrus doesn't give us the master branch, so we have to fetch it for ourselves, |
| 154 | # otherwise we won't be able to figure out how old or new our current branch is. |
| 155 | - git config user.email "cirrus-bot@invalid" |
| 156 | - git fetch origin master:master |
Ian Hickson | 0b8174e | 2021-07-02 19:16:04 -0700 | [diff] [blame] | 157 | # The actual logic is in a shell script so that it can be shared between CIs. |
| 158 | - (cd dev/customer_testing/; ./ci.sh) |
Dan Field | bb79ff3 | 2019-06-26 13:55:16 -0700 | [diff] [blame] | 159 | |
Nurhan Turgut | 9ba4eb0 | 2020-02-24 13:09:21 -0800 | [diff] [blame] | 160 | - name: web_smoke_test |
godofredoc | cfe53fd | 2020-09-21 11:27:06 -0700 | [diff] [blame] | 161 | only_if: "changesInclude('.cirrus.yml', 'examples/hello_world/**' ,'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_tools/lib/src/test/**', 'packages/flutter_web_plugins/**', 'bin/**') && $CIRRUS_PR != ''" |
Nurhan Turgut | 9ba4eb0 | 2020-02-24 13:09:21 -0800 | [diff] [blame] | 162 | environment: |
| 163 | # Tests Hello World with Flutter Web Engine using Flutter Driver. Should not need more resources. |
| 164 | CPU: 2 |
| 165 | MEMORY: 2G |
| 166 | CHROME_NO_SANDBOX: true |
| 167 | script: |
| 168 | - flutter config --enable-web |
| 169 | - git clone https://github.com/flutter/web_installers.git |
| 170 | - cd web_installers/packages/web_drivers/ |
Sigurd Meldgaard | bce3662 | 2021-08-30 19:40:10 +0200 | [diff] [blame] | 171 | - dart __deprecated_pub get |
Yegor | 07a757c | 2020-10-07 19:07:06 -0700 | [diff] [blame] | 172 | - dart lib/web_driver_installer.dart chromedriver --install-only |
Nurhan Turgut | 9ba4eb0 | 2020-02-24 13:09:21 -0800 | [diff] [blame] | 173 | - chromedriver/chromedriver --port=4444 & |
Yegor | 07a757c | 2020-10-07 19:07:06 -0700 | [diff] [blame] | 174 | - sleep 1 |
Nurhan Turgut | 9ba4eb0 | 2020-02-24 13:09:21 -0800 | [diff] [blame] | 175 | - cd ../../../examples/hello_world/ |
| 176 | - flutter drive --target=test_driver/smoke_web_engine.dart -d web-server --profile --browser-name=chrome |