.cirrus.yml 6.1 KB
Newer Older
1 2
gcp_credentials: ENCRYPTED[987a78af29b91ce8489594c9ab3fec21845bbe5ba68294b8f6def3cf0d380830f06687a89ea69c87344c5ade369700fe]

3
# LINUX
4
task:
L
liyuqian 已提交
5 6 7 8 9 10 11
  gke_container:
   image: gcr.io/flutter-cirrus/build-engine-image:latest
   cluster_name: build-32-cluster
   zone: us-central1-a
   namespace: default
   cpu: 30 # can't use all 30-cores; system pods needs cores too
   memory: 100Gb # similarly, can't use all 100Gb memory
12 13
  env:
    CIRRUS_WORKING_DIR: "/tmp/github_repo"
D
Dan Field 已提交
14 15
    ENGINE_PATH: "/tmp/clean_engine"
    DEPOT_TOOLS: "/tmp/depot_tools"
16 17
    FLUTTER_ENGINE: "/tmp/clean_engine/src"
    FRAMEWORK_PATH: "/tmp/master_framework"
D
Dan Field 已提交
18
    PATH: "$FLUTTER_ENGINE/third_party/dart/tools/sdks/dart-sdk/bin:$DEPOT_TOOLS:$PATH"
D
Dan Field 已提交
19
    USE_ANDROID: "False"
20
  setup_script: |
D
Dan Field 已提交
21 22
    git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS
    mkdir -p $ENGINE_PATH/src
D
Dan Field 已提交
23
    echo 'solutions = [{"managed": False,"name": "src/flutter","url": "git@github.com:flutter/engine.git","deps_file": "DEPS", "custom_vars": {"download_android_deps" : ' $USE_ANDROID ', "download_windows_deps" : False,},},]' > $ENGINE_PATH/.gclient
24
    cd $ENGINE_PATH/src
D
Dan Field 已提交
25 26
    rm -rf flutter
    rm -rf out
27
    mv $CIRRUS_WORKING_DIR flutter
28
    gclient sync
29
  matrix:
30
    - name: build_and_test_linux_unopt_debug
31 32
      compile_host_script: |
        cd $ENGINE_PATH/src
33
        ./flutter/tools/gn --unoptimized --full-dart-sdk
34
        ninja -C out/host_debug_unopt
35 36 37
      test_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/testing/run_tests.sh host_debug_unopt
38 39 40 41
      fetch_framework_script: |
        mkdir -p $FRAMEWORK_PATH
        cd $FRAMEWORK_PATH
        git clone https://github.com/flutter/flutter.git
42
      test_web_script: |
43
        cd $FRAMEWORK_PATH/flutter/dev/integration_tests/web
D
Dan Field 已提交
44
        ../../../bin/flutter config --local-engine=host_debug_unopt --no-analytics --enable-web
45
        ../../../bin/flutter --local-engine=host_debug_unopt build web -v
46
      test_framework_script: |
47 48
        cd $FRAMEWORK_PATH/flutter/packages/flutter
        ../../bin/flutter test --local-engine=host_debug_unopt
49
    - name: build_and_test_linux_opt_profile
50 51 52 53
      compile_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/tools/gn --runtime-mode profile --no-lto
        ninja -C out/host_profile
54 55 56 57
      test_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/testing/run_tests.sh host_profile
    - name: build_and_test_linux_opt_release
58 59 60 61
      compile_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/tools/gn --runtime-mode release --no-lto
        ninja -C out/host_release
62 63 64
      test_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/testing/run_tests.sh host_release
65
    - name: build_and_test_android_unopt_debug
D
Dan Field 已提交
66 67 68
      env:
        USE_ANDROID: "True"
        ANDROID_HOME: $ENGINE_PATH/src/third_party/android_tools/sdk
69 70 71 72
      lint_host_script: |
        cd $ENGINE_PATH/src/flutter/tools/android_lint
        $ENGINE_PATH/src/third_party/dart/tools/sdks/dart-sdk/bin/pub get
        $ENGINE_PATH/src/third_party/dart/tools/sdks/dart-sdk/bin/dart bin/main.dart
73 74 75 76
      compile_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/tools/gn --android --unoptimized
        ninja -C out/android_debug_unopt
D
Dan Field 已提交
77 78
        mkdir javadoc_tmp
        ./flutter/tools/gen_javadoc.py --out-dir javadoc_tmp
79
      test_android_script: cd $ENGINE_PATH/src && python ./flutter/testing/run_tests.py --type=java
D
Dan Field 已提交
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
    - name: build_and_test_android_profile_app
      env:
        USE_ANDROID: "True"
        ANDROID_HOME: $ENGINE_PATH/src/third_party/android_tools/sdk
        GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[3be31b3547bea4e70cff1d46f9a11ad8c6b42c1982a3964d81e437dee2035f674f12e130bde231352421d8de2029c55f]
      compile_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/tools/gn --runtime-mode=profile --no-lto
        autoninja -C out/host_profile
      compile_android_script: |
        cd $ENGINE_PATH/src
        ./flutter/tools/gn --android --runtime-mode=profile --no-lto --android-cpu=arm64
        ninja -C out/android_profile_arm64
      compile_app_script: |
        cd $ENGINE_PATH/src/flutter/testing/scenario_app
        ./compile_android_aot.sh "$ENGINE_PATH/src/out/host_profile" "$ENGINE_PATH/src/out/android_profile_arm64/clang_x64"
        cd android
        ./gradlew assembleDebug
      firebase_test_script: |
         cd $ENGINE_PATH/src
         ./flutter/ci/firebase_testlab.sh "$ENGINE_PATH/src/flutter/testing/scenario_app/android/app/build/outputs/apk/debug/app-debug.apk"
L
liyuqian 已提交
101
    - name: format_and_dart_test
102 103 104 105 106 107
      format_script: |
        cd $ENGINE_PATH/src/flutter
        ./ci/format.sh
      build_script: |
        cd $ENGINE_PATH/src/flutter
        ./ci/build.sh
108
    - name: build_fuchsia_unopt_profile_x64
109 110 111
      compile_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/tools/gn --runtime-mode profile --fuchsia --no-lto --unopt
112
        ninja -C out/fuchsia_profile_unopt_x64
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146

# WINDOWS
task:
  gce_instance:
    image_project: flutter-cirrus
    image_name: flutter-engine-windows-server-2016-core
    zone: us-central1-a
    platform: windows
    cpu: 32
    memory: 32Gb
    disk: 50
  env:
    # Cirrus is somehow not picking up the environment variables set in the VM image.
    PATH: "c:/depot_tools;c:/MinGit/cmd;$PATH"
    DEPOT_TOOLS_WIN_TOOLCHAIN: 0
    GYP_MSVS_OVERRIDE_PATH: "c:/Program Files (x86)/Microsoft Visual Studio/2017/Community"
    ENGINE_PATH: "c:/flutter/engine"
  setup_script: |
    REM robocopy can return 1 for successful copy; suppress its error code.
    REM move somehow doesn't work as it complains that the file is being used by another process.
    robocopy %CIRRUS_WORKING_DIR% %ENGINE_PATH%/src/flutter /MIR| (cmd /s /c exit /b 0)
    cd %ENGINE_PATH%/src
    gclient sync
  matrix:
    - name: build_windows_unopt_debug
      compile_host_script: |
        cd %ENGINE_PATH%/src
        python flutter/tools/gn --runtime-mode debug --unoptimized
        ninja -C out/host_debug_unopt
    - name: build_windows_opt_debug
      compile_host_script: |
        cd %ENGINE_PATH%/src
        python flutter/tools/gn --runtime-mode debug
        ninja -C out/host_debug