Skip to content

Commit 20590bf

Browse files
[ci] Add LUCI version of the analyze tasks (flutter#4253)
Add LUCI versions of the analyze, pathified analyze, and downgraded analayze tasks. Does not include legacy analyze (N-1 and N-2 stable Flutter versions) since there are open questions about how to structure those in LUCI. Part of flutter#114373
1 parent 700c40a commit 20590bf

File tree

5 files changed

+87
-1
lines changed

5 files changed

+87
-1
lines changed

.ci.yaml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ platform_properties:
6969
}
7070
7171
targets:
72-
### Linux-host tasks ###
72+
### Linux-host general tasks ###
7373
- name: Linux repo_tools_tests
7474
recipe: packages/packages
7575
timeout: 30
@@ -79,6 +79,42 @@ targets:
7979
channel: master
8080
version_file: flutter_master.version
8181

82+
- name: Linux analyze master
83+
bringup: true # New target
84+
recipe: packages/packages
85+
timeout: 30
86+
properties:
87+
target_file: analyze.yaml
88+
channel: master
89+
version_file: flutter_master.version
90+
91+
- name: Linux analyze stable
92+
bringup: true # New target
93+
recipe: packages/packages
94+
timeout: 30
95+
properties:
96+
target_file: analyze.yaml
97+
channel: stable
98+
version_file: flutter_stable.version
99+
100+
- name: Linux analyze_downgraded master
101+
bringup: true # New target
102+
recipe: packages/packages
103+
timeout: 30
104+
properties:
105+
target_file: analyze_downgraded.yaml
106+
channel: master
107+
version_file: flutter_master.version
108+
109+
- name: Linux analyze_downgraded stable
110+
bringup: true # New target
111+
recipe: packages/packages
112+
timeout: 30
113+
properties:
114+
target_file: analyze_downgraded.yaml
115+
channel: stable
116+
version_file: flutter_stable.version
117+
82118
### Web tasks ###
83119
- name: Linux_web web_build_all_packages master
84120
recipe: packages/packages

.ci/scripts/analyze_repo_tools.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
# Copyright 2013 The Flutter Authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
set -e
6+
7+
cd script/tool
8+
dart analyze --fatal-infos

.ci/scripts/pathified_analyze.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# Copyright 2013 The Flutter Authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
set -e
6+
7+
# Pathify the dependencies on changed packages (excluding major version
8+
# changes, which won't affect clients).
9+
./script/tool_runner.sh make-deps-path-based --target-dependencies-with-non-breaking-updates
10+
# This uses --run-on-dirty-packages rather than --packages-for-branch
11+
# since only the packages changed by 'make-deps-path-based' need to be
12+
# re-checked.
13+
dart ./script/tool/bin/flutter_plugin_tools.dart analyze --run-on-dirty-packages \
14+
--log-timing --custom-analysis=script/configs/custom_analysis.yaml
15+
# Restore the tree to a clean state, to avoid accidental issues if
16+
# other script steps are added to the enclosing task.
17+
git checkout .

.ci/targets/analyze.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
tasks:
2+
- name: prepare tool
3+
script: .ci/scripts/prepare_tool.sh
4+
- name: analyze repo tools
5+
script: .ci/scripts/analyze_repo_tools.sh
6+
- name: analyze
7+
script: script/tool_runner.sh
8+
# DO NOT change the custom-analysis argument here without changing the Dart repo.
9+
# See the comment in script/configs/custom_analysis.yaml for details.
10+
args: ["analyze", "--custom-analysis=script/configs/custom_analysis.yaml"]
11+
# Re-run analysis with path-based dependencies to ensure that publishing
12+
# the changes won't break analysis of other packages in the respository
13+
# that depend on it.
14+
- name: analyze - pathified
15+
script: .ci/scripts/pathified_analyze.sh
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
tasks:
2+
- name: prepare tool
3+
script: .ci/scripts/prepare_tool.sh
4+
# Does a sanity check that packages pass analysis with the lowest possible
5+
# versions of all dependencies. This is to catch cases where we add use of
6+
# new APIs but forget to update minimum versions of dependencies to where
7+
# those APIs are introduced.
8+
- name: analyze - downgraded
9+
script: script/tool_runner.sh
10+
args: ["analyze", "--downgrade", "--custom-analysis=script/configs/custom_analysis.yaml"]

0 commit comments

Comments
 (0)