-
-
Notifications
You must be signed in to change notification settings - Fork 291
Expand file tree
/
Copy pathpresubmit.yml
More file actions
189 lines (187 loc) · 6.66 KB
/
Copy pathpresubmit.yml
File metadata and controls
189 lines (187 loc) · 6.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
---
validate_config: 1
matrix:
bcr_platform: ["debian10", "macos", "ubuntu2004", "windows"]
bcr_bazel: [7.x, 8.x, 9.x, rolling, last_green]
tasks:
analyze_all:
# Loading + analysis of the whole repo (no execution). This is the cheap
# tripwire for wildcard-only breakages (e.g. a visibility/alias regression)
# that never surface when CI only builds //test/..., since a plain
# `bazel build //...` is not otherwise exercised anywhere. test_expect_failure/
# is excluded: its targets are negative tests meant to fail (some already at
# analysis) and are exercised explicitly by the shell scripts instead.
name: "bazel build //... --nobuild"
platform: ubuntu2004
build_flags:
- "--nobuild"
build_targets:
- "//..."
- "-//test_expect_failure/..."
ubuntu2004:
name: "bazel test //..."
platform: ubuntu2004
build_targets:
# Build everything buildable, not just //test/.... The only wildcard
# exclusion is test_expect_failure/, whose targets are negative tests
# meant to fail compilation (exercised explicitly by the shell scripts).
# Other conditional targets (manual_test/*, test_statsfile empty-stats
# genrule) are tagged "manual" and thus already skipped by wildcards.
- "//..."
- "-//test_expect_failure/..."
test_targets:
# Mirror build_targets: run every test except the test_expect_failure/
# negative tests (exercised explicitly by the shell scripts). Beyond
# //test/... this also covers e.g. //third_party/dependency_analyzer/...,
# the //src/java worker/compileoptions unit tests and //tools:lint_check.
- "//..."
- "-//test_expect_failure/..."
macos:
name: "bazel test //..."
platform: macos
build_targets:
- "//..."
- "-//test_expect_failure/..."
test_targets:
- "//..."
- "-//test_expect_failure/..."
test_rules_scala_linux:
name: "./test_rules_scala"
platform: ubuntu2004
shell_commands:
# Install xmllint
- sudo apt update && sudo apt install --reinstall libxml2-utils -y
- "./test_rules_scala.sh"
test_rules_scala_linux_last_green:
name: "./test_rules_scala (last_green Bazel)"
platform: ubuntu2004
bazel: last_green
shell_commands:
# Install xmllint
- sudo apt update && sudo apt install --reinstall libxml2-utils -y
- echo "common --lockfile_mode=update" >>.bazelrc
# The nested-Bazel tests (expect_build_failure_test etc.) shell out to
# `bazel` from inside a test action. bazelisk prepends the dir holding the
# resolved binary (here the downloaded last_green build) to PATH so nested
# invocations reuse it -- but last_green's Bazel uses a static action PATH
# by default, which drops that dir and makes the nested `bazel` unresolvable
# (`env: 'bazel': No such file`). Forward the client PATH into test actions
# so the nested calls find last_green, as released-Bazel steps already do.
- echo "test --test_env=PATH" >>.bazelrc
# Downstream consumer tests aren't expected to build against an
# unreleased Bazel; skip them so a green here means an actual
# last_green regression, not third-party noise.
- echo "test --test_tag_filters=-no-last-green" >>.bazelrc
- "./test_rules_scala.sh"
soft_fail:
- exit_status: "*"
test_rules_scala_macos:
name: "./test_rules_scala"
platform: macos
shell_commands:
- "./test_rules_scala.sh"
test_rules_scala_win:
name: "./test_rules_scala"
platform: windows
environment:
MSYS2_ARG_CONV_EXCL: "*"
batch_commands:
- "set PATH=/usr/bin;%PATH%" #Make sure bash uses msys commands over windows commands. (i.e. find).
- 'bash -lc "pacman --noconfirm --needed -S libxml2"' #tests require xmllint
- "bash test_rules_scala.sh"
test_coverage_linux:
name: "./test_coverage"
platform: ubuntu2004
shell_commands:
- "./test_coverage.sh"
test_coverage_macos:
name: "./test_coverage"
platform: macos
shell_commands:
- "./test_coverage.sh"
test_reproducibility_linux:
name: "./test_reproducibility.sh"
platform: ubuntu1804
shell_commands:
- "./test_reproducibility.sh"
test_reproducibility_macos:
name: "./test_reproducibility.sh"
platform: macos
shell_commands:
- "./test_reproducibility.sh"
versions_linux:
name: "./test_version.sh"
platform: ubuntu2004
shell_commands:
- "./test_version.sh"
versions_macos:
name: "./test_version.sh"
platform: macos
shell_commands:
- "./test_version.sh"
thirdparty_version_linux:
name: "./test_thirdparty_version.sh"
platform: ubuntu2204_java17
shell_commands:
- "./test_thirdparty_version.sh"
examples_linux:
name: "./test_examples"
platform: ubuntu2004
shell_commands:
- "./test_examples.sh"
cross_build_linux:
name: "./test_cross_build"
platform: ubuntu2004
shell_commands:
- "./test_cross_build.sh"
lint_linux:
name: "./test_lint.sh"
platform: ubuntu2004
shell_commands:
- "./test_lint.sh"
test_rules_scala_jdk21:
name: "./test_rules_scala with jdk21"
platform: ubuntu2004
shell_commands:
- sudo apt update && sudo apt install -y libxml2-utils
- echo "build --java_language_version=21" >> .bazelrc
- echo "build --java_runtime_version=21" >> .bazelrc
- echo "build --tool_java_language_version=21" >> .bazelrc
- echo "build --tool_java_runtime_version=21" >> .bazelrc
- "./test_rules_scala.sh"
dt_patches_linux:
name: "dt_patches/dt_patch_test"
platform: ubuntu2004
shell_commands:
- "dt_patches/dt_patch_test.sh"
dependency_versions_linux:
name: "./test_dependency_versions"
platform: ubuntu2004
shell_commands:
- "./test_dependency_versions.sh"
dependency_versions_macos:
name: "./test_dependency_versions"
platform: macos
shell_commands:
- "./test_dependency_versions.sh"
dependency_versions_windows:
name: "./test_dependency_versions"
platform: windows
environment:
MSYS2_ARG_CONV_EXCL: "*"
batch_commands:
- "set PATH=/usr/bin;%PATH%" #Make sure bash uses msys commands over windows commands. (i.e. find).
- 'bash -lc "pacman --noconfirm --needed -S libxml2"' #tests require xmllint
- "bash ./test_dependency_versions.sh" # script removes ./ from BASH_SOURCE
bcr_presubmit:
# Keep in sync with .bcr/presubmit.yml.
name: "BCR {bcr_bazel}"
working_directory: "examples/crossbuild"
platform: ${{ bcr_platform }}
bazel: ${{ bcr_bazel }}
build_targets:
- "//..."
test_targets:
- "//..."
soft_fail:
- exit_status: "*"