Skip to content

Commit 0c05095

Browse files
committed
add ci config to test 7, 8 and 9 for bcr like setup
1 parent e40b609 commit 0c05095

1 file changed

Lines changed: 50 additions & 108 deletions

File tree

.bazelci/presubmit.yml

Lines changed: 50 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,57 @@ buildifier:
8787
- //tests:version_3_11_test
8888
- //tests:version_3_9_test
8989
- //tests:version_default_test
90+
91+
matrix:
92+
platform:
93+
- ubuntu2204
94+
- macos
95+
- windows
96+
bazel: [7.*, 8.*, 9.*]
97+
bcr_variant:
98+
- examples/bzlmod
99+
- gazelle/examples/bzlmod_build_file_generation
90100
tasks:
101+
# Keep in sync with .bcr/presubmit.yml
102+
bcr_tests:
103+
name: BCR test module
104+
platform: ${{ platform }}
105+
bazel: ${{ bazel }}
106+
working_directory: ${{ bcr_variant }}
107+
platform: ${{ platform }}
108+
bazel: ${{ bazel }}
109+
shell_commands:
110+
- "bazel vendor --vendor_dir=./vendor //..."
111+
- "bazel build --vendor_dir=./vendor //..."
112+
- "rm -rf ./vendor"
113+
coverage_targets: ["//:test"]
114+
test_flags:
115+
- "--keep_going"
116+
# Without these cxxopts, BCR's Mac builds fail
117+
- '--cxxopt=-std=c++14'
118+
- '--host_cxxopt=-std=c++14'
119+
test_targets:
120+
- "//..."
121+
bcr_gazelle_tests:
122+
# Keep in sync with .bcr/gazelle/presubmit.yml
123+
name: BCR gazelle test module
124+
platform: ${{ platform }}
125+
bazel: ${{ bazel }}
126+
working_directory: ${{ bcr_variant }}
127+
# Regenerate the BUILD files for the test module using Gazelle.
128+
# Also verify -repo_config are generated correctly in gazelle.bash
129+
shell_commands:
130+
- "echo 'common --override_module=rules_python=' >> .bazelrc"
131+
- bazel run //:gazelle
132+
batch_commands:
133+
- "echo common --override_module=rules_python= >> .bazelrc"
134+
- bazel run //:gazelle
135+
build_targets:
136+
- "//..."
137+
- ":modules_map"
138+
test_targets:
139+
- "//..."
140+
91141
gazelle_extension_min:
92142
<<: *common_workspace_flags_min_bazel
93143
<<: *minimum_supported_version
@@ -258,114 +308,6 @@ tasks:
258308
working_directory: examples/build_file_generation
259309
platform: windows
260310

261-
integration_test_bzlmod_ubuntu_min:
262-
<<: *minimum_supported_version
263-
<<: *reusable_build_test_all
264-
coverage_targets: ["//:test"]
265-
name: "examples/bzlmod: Ubuntu, minimum Bazel"
266-
working_directory: examples/bzlmod
267-
platform: ubuntu2204
268-
bazel: 7.x
269-
integration_test_bzlmod_ubuntu:
270-
<<: *reusable_build_test_all
271-
<<: *coverage_targets_example_bzlmod
272-
name: "examples/bzlmod: Ubuntu"
273-
working_directory: examples/bzlmod
274-
platform: ubuntu2204
275-
bazel: 7.x
276-
integration_test_bzlmod_ubuntu_upcoming:
277-
<<: *reusable_build_test_all
278-
<<: *coverage_targets_example_bzlmod
279-
name: "examples/bzlmod: Ubuntu, upcoming Bazel"
280-
working_directory: examples/bzlmod
281-
platform: ubuntu2204
282-
bazel: last_rc
283-
integration_test_bzlmod_debian:
284-
<<: *reusable_build_test_all
285-
<<: *coverage_targets_example_bzlmod
286-
name: "examples/bzlmod: Debian"
287-
working_directory: examples/bzlmod
288-
platform: debian11
289-
bazel: 7.x
290-
integration_test_bzlmod_ubuntu_vendor:
291-
<<: *reusable_build_test_all
292-
name: "examples/bzlmod: bazel vendor"
293-
working_directory: examples/bzlmod
294-
platform: ubuntu2204
295-
shell_commands:
296-
- "bazel vendor --vendor_dir=./vendor //..."
297-
- "bazel build --vendor_dir=./vendor //..."
298-
- "rm -rf ./vendor"
299-
integration_test_bzlmod_macos:
300-
<<: *reusable_build_test_all
301-
<<: *coverage_targets_example_bzlmod
302-
name: "examples/bzlmod: macOS"
303-
working_directory: examples/bzlmod
304-
platform: macos
305-
bazel: 7.x
306-
integration_test_bzlmod_macos_upcoming:
307-
<<: *reusable_build_test_all
308-
<<: *coverage_targets_example_bzlmod
309-
name: "examples/bzlmod: macOS, upcoming Bazel"
310-
working_directory: examples/bzlmod
311-
platform: macos
312-
bazel: last_rc
313-
integration_test_bzlmod_windows:
314-
<<: *reusable_build_test_all
315-
# coverage is not supported on Windows
316-
name: "examples/bzlmod: Windows"
317-
working_directory: examples/bzlmod
318-
platform: windows
319-
bazel: 7.x
320-
integration_test_bzlmod_windows_upcoming:
321-
<<: *reusable_build_test_all
322-
# coverage is not supported on Windows
323-
name: "examples/bzlmod: Windows, upcoming Bazel"
324-
working_directory: examples/bzlmod
325-
platform: windows
326-
bazel: last_rc
327-
328-
integration_test_bzlmod_generate_build_file_generation_ubuntu_min:
329-
<<: *minimum_supported_version
330-
<<: *reusable_build_test_all
331-
<<: *coverage_targets_example_bzlmod_build_file_generation
332-
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu, minimum Bazel"
333-
working_directory: gazelle/examples/bzlmod_build_file_generation
334-
platform: ubuntu2204
335-
bazel: 7.x
336-
integration_test_bzlmod_generation_build_files_ubuntu:
337-
<<: *reusable_build_test_all
338-
<<: *coverage_targets_example_bzlmod_build_file_generation
339-
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu"
340-
working_directory: gazelle/examples/bzlmod_build_file_generation
341-
platform: ubuntu2204
342-
integration_test_bzlmod_generation_build_files_ubuntu_run:
343-
<<: *reusable_build_test_all
344-
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu, Gazelle and pip"
345-
working_directory: gazelle/examples/bzlmod_build_file_generation
346-
platform: ubuntu2204
347-
shell_commands:
348-
- "bazel run //:gazelle_python_manifest.update"
349-
- "bazel run //:gazelle -- update"
350-
integration_test_bzlmod_build_file_generation_debian:
351-
<<: *reusable_build_test_all
352-
<<: *coverage_targets_example_bzlmod_build_file_generation
353-
name: "gazelle/examples/bzlmod_build_file_generation: Debian"
354-
working_directory: gazelle/examples/bzlmod_build_file_generation
355-
platform: debian11
356-
integration_test_bzlmod_build_file_generation_macos:
357-
<<: *reusable_build_test_all
358-
<<: *coverage_targets_example_bzlmod_build_file_generation
359-
name: "gazelle/examples/bzlmod_build_file_generation: MacOS"
360-
working_directory: gazelle/examples/bzlmod_build_file_generation
361-
platform: macos
362-
integration_test_bzlmod_build_file_generation_windows:
363-
<<: *reusable_build_test_all
364-
# coverage is not supported on Windows
365-
name: "gazelle/examples/bzlmod_build_file_generation: Windows"
366-
working_directory: gazelle/examples/bzlmod_build_file_generation
367-
platform: windows
368-
369311
integration_test_multi_python_versions_ubuntu_workspace:
370312
<<: *reusable_build_test_all
371313
<<: *common_workspace_flags

0 commit comments

Comments
 (0)