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

3 4 5 6 7 8 9
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
10

11
task:
12 13
  env:
    CIRRUS_WORKING_DIR: "/tmp/github_repo"
D
Dan Field 已提交
14
    DEPOT_TOOLS_UPDATE: 0
15 16 17
  replace_engine_script: |
    cd $ENGINE_PATH/src
    rm -r flutter
18
    mv $CIRRUS_WORKING_DIR flutter
19 20
    gclient sync

21
  matrix:
22
    - name: build_and_test_host
23 24 25 26
      compile_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/tools/gn --unoptimized
        ninja -C out/host_debug_unopt
27 28 29 30 31 32 33 34 35 36 37 38 39
      test_host_script: cd $ENGINE_PATH/src && ./flutter/testing/run_tests.sh host_debug_unopt
    - name: build_and_test_host_profile
      compile_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/tools/gn --runtime-mode profile --no-lto
        ninja -C out/host_profile
      test_host_script: cd $ENGINE_PATH/src && ./flutter/testing/run_tests.sh host_profile
    - name: build_and_test_host_release
      compile_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/tools/gn --runtime-mode release --no-lto
        ninja -C out/host_release
      test_host_script: cd $ENGINE_PATH/src && ./flutter/testing/run_tests.sh host_release
40
    - name: build_android
41 42 43 44
      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
45 46 47 48
      compile_host_script: |
        cd $ENGINE_PATH/src
        ./flutter/tools/gn --android --unoptimized
        ninja -C out/android_debug_unopt
D
Dan Field 已提交
49 50
        mkdir javadoc_tmp
        ./flutter/tools/gen_javadoc.py --out-dir javadoc_tmp
51

52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
task:
  name: build_ios
  use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
  osx_instance:
    image: high-sierra-xcode-9.4.1
  env:
    CIRRUS_WORKING_DIR: "/tmp/github_repo"
    ENGINE_PATH: "/tmp/engine"
    DEPOT_TOOLS: "/tmp/depot_tools"
    PATH: "$DEPOT_TOOLS:$PATH"
  depot_tools_script:
    git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS
  # jazzy_script:
  #   sudo gem install jazzy@0.9.4
  gclient_sync_script: |
    mkdir -p $ENGINE_PATH/src
68
    echo 'solutions = [{"managed": False,"name": "src/flutter","url": "git@github.com:flutter/engine.git","deps_file": "DEPS", "custom_vars": {"download_android_deps" : False, "download_windows_deps" : False,},},]' > $ENGINE_PATH/.gclient
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
    cd $ENGINE_PATH/src
    rm -rf flutter
    rm -rf out
    mv $CIRRUS_WORKING_DIR flutter
    gclient sync
  compile_host_script: |
    cd $ENGINE_PATH/src
    ./flutter/tools/gn --ios --unoptimized
    ninja -C out/ios_debug_unopt
    # TODO(dnfield): when we can install jazzy properly, we should do this.
    # AFAICT we can't because of Xcode version.
    # mkdir objcdoc_tmp
    # pushd flutter
    # ./tools/gen_objcdoc.sh ../objcdoc_tmp
    # popd

L
liyuqian 已提交
85 86
format_and_dart_test_task:
  container:
87
    image: gcr.io/flutter-cirrus/build-engine-image:latest
L
liyuqian 已提交
88 89 90

  env:
    CIRRUS_WORKING_DIR: "/tmp/github_repo"
D
Dan Field 已提交
91
    DEPOT_TOOLS_UPDATE: 0
L
liyuqian 已提交
92 93 94 95 96 97
  replace_engine_script: |
    cd $ENGINE_PATH/src
    rm -r flutter
    cp $CIRRUS_WORKING_DIR -r ./flutter
    gclient sync

L
liyuqian 已提交
98 99
  format_script: cd $ENGINE_PATH/src/flutter && ./ci/format.sh
  build_script: cd $ENGINE_PATH/src/flutter && ./ci/build.sh