Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ platform_properties:
}

targets:
### Linux-host tasks ###
### Linux-host general tasks ###
- name: Linux repo_tools_tests
recipe: packages/packages
timeout: 30
Expand All @@ -79,6 +79,42 @@ targets:
channel: master
version_file: flutter_master.version

- name: Linux analyze master
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
target_file: analyze.yaml
channel: master
version_file: flutter_master.version

- name: Linux analyze stable
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
target_file: analyze.yaml
channel: stable
version_file: flutter_stable.version

- name: Linux analyze_downgraded master
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
target_file: analyze_downgraded.yaml
channel: master
version_file: flutter_master.version

- name: Linux analyze_downgraded stable
bringup: true # New target
recipe: packages/packages
timeout: 30
properties:
target_file: analyze_downgraded.yaml
channel: stable
version_file: flutter_stable.version

### Web tasks ###
- name: Linux_web web_build_all_packages master
bringup: true # New target
Expand Down
8 changes: 8 additions & 0 deletions .ci/scripts/analyze_repo_tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e

cd script/tool
dart analyze --fatal-infos
17 changes: 17 additions & 0 deletions .ci/scripts/pathified_analyze.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e

# Pathify the dependencies on changed packages (excluding major version
# changes, which won't affect clients).
./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates
# This uses --run-on-dirty-packages rather than --packages-for-branch
# since only the packages changed by 'make-deps-path-based' need to be
# re-checked.
dart ./script/tool/bin/flutter_plugin_tools.dart analyze --run-on-dirty-packages \
--log-timing --custom-analysis=script/configs/custom_analysis.yaml
# Restore the tree to a clean state, to avoid accidental issues if
# other script steps are added to the enclosing task.
git checkout .
15 changes: 15 additions & 0 deletions .ci/targets/analyze.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
- name: analyze repo tools
script: .ci/scripts/analyze_repo_tools.sh
- name: analyze
script: script/tool_runner.sh
# DO NOT change the custom-analysis argument here without changing the Dart repo.
# See the comment in script/configs/custom_analysis.yaml for details.
args: ["analyze", "--custom-analysis=script/configs/custom_analysis.yaml"]
# Re-run analysis with path-based dependencies to ensure that publishing
# the changes won't break analysis of other packages in the respository
# that depend on it.
- name: analyze - pathified
script: .ci/scripts/pathified_analyze.sh
10 changes: 10 additions & 0 deletions .ci/targets/analyze_downgraded.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
# Does a sanity check that packages pass analysis with the lowest possible
# versions of all dependencies. This is to catch cases where we add use of
# new APIs but forget to update minimum versions of dependencies to where
# those APIs are introduced.
- name: analyze - downgraded
script: script/tool_runner.sh
args: ["analyze", "--downgrade", "--custom-analysis=script/configs/custom_analysis.yaml"]