2
0
Fork 0
mirror of https://github.com/bazelbuild/bazel-skylib synced 2024-11-27 05:43:25 +00:00

Improve CI setup: add tests for Bazel 5.x and 6.x (with and without bzlmod); use Ubuntu 20.04 as main platform

This commit is contained in:
Alexandre Rostovtsev 2024-04-25 10:59:42 -04:00 committed by GitHub
parent 700c9ec92b
commit 18e70d2105
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,142 +1,130 @@
--- ---
matrix:
platform:
- ubuntu1804
- ubuntu2004
- macos
.reusable_build_flags: &reusable_build_flags
? "--incompatible_config_setting_private_default_visibility"
? "--incompatible_disallow_empty_glob"
.reusable_test_flags: &reusable_test_flags
<<: *reusable_build_flags
? "--test_env=PATH"
.reusable_targets: &reusable_targets
? "--"
? "//..."
? "@bazel_skylib_gazelle_plugin//..."
.reusable_config: &reusable_config .reusable_config: &reusable_config
build_targets: build_flags: *reusable_build_flags
- "--" test_flags: *reusable_test_flags
- "//..." build_targets: *reusable_targets
- "@bazel_skylib_gazelle_plugin//..." test_targets: *reusable_targets
test_targets:
- "--"
- "//..."
- "@bazel_skylib_gazelle_plugin//..."
tasks: tasks:
ubuntu1804_latest: ubuntu2004_bazel5:
<<: *reusable_config
name: "Bazel 5.x"
platform: ubuntu2004
bazel: 5.x
ubuntu2004_bazel6:
<<: *reusable_config
name: "Bazel 6.x"
platform: ubuntu2004
bazel: 6.x
build_targets:
<<: *reusable_targets
# rules_pkg fails with --noenable_bzlmod
? "-//distribution/..."
test_targets:
<<: *reusable_targets
# rules_pkg fails with --noenable_bzlmod
? "-//distribution/..."
ubuntu2004_bazel6_enable_bzlmod:
<<: *reusable_config
name: "Bazel 6.x with --enable_bzlmod"
platform: ubuntu2004
bazel: 6.x
build_flags:
<<: *reusable_build_flags
? "--enable_bzlmod"
test_flags:
<<: *reusable_test_flags
? "--enable_bzlmod"
latest:
<<: *reusable_config <<: *reusable_config
name: "Latest Bazel" name: "Latest Bazel"
platform: ubuntu1804 platform: ${{ platform }}
bazel: latest
ubuntu2004_latest_noenable_bzlmod:
<<: *reusable_config
name: "Latest Bazel with --noenable_bzlmod"
platform: ubuntu2004
bazel: latest bazel: latest
build_flags: build_flags:
- "--incompatible_config_setting_private_default_visibility" <<: *reusable_build_flags
- "--incompatible_disallow_empty_glob" ? "--noenable_bzlmod"
test_flags: test_flags:
- "--test_env=PATH" <<: *reusable_test_flags
? "--noenable_bzlmod"
build_targets:
<<: *reusable_targets
# rules_pkg fails with --noenable_bzlmod
? "-//distribution/..."
test_targets:
<<: *reusable_targets
# rules_pkg fails with --noenable_bzlmod
? "-//distribution/..."
ubuntu1604_latest: ubuntu1604_latest:
<<: *reusable_config
name: "Latest Bazel" name: "Latest Bazel"
platform: ubuntu1604 platform: ubuntu1604
bazel: latest bazel: latest
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_disallow_empty_glob"
build_targets: build_targets:
- "--" <<: *reusable_targets
- "//..." # //distribution requires Python >= 3.6 for some rules_pkg scripts; Ubuntu 16.04 has Python 3.5
- "@bazel_skylib_gazelle_plugin//..." ? "-//distribution/..."
# //distribution requires Python >= 3.6 for some rules_pkg scripts; Ubuntu 16.04 has Python 3.5
- "-//distribution/..."
test_flags:
- "--test_env=PATH"
test_targets: test_targets:
- "--" <<: *reusable_targets
- "//..." # //distribution requires Python >= 3.6 for some rules_pkg scripts; Ubuntu 16.04 has Python 3.5
- "@bazel_skylib_gazelle_plugin//..." ? "-//distribution/..."
# //distribution requires Python >= 3.6 for some rules_pkg scripts; Ubuntu 16.04 has Python 3.5
- "-//distribution/..."
macos_latest:
<<: *reusable_config
name: "Latest Bazel"
platform: macos
bazel: latest
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_disallow_empty_glob"
test_flags:
- "--test_env=PATH"
windows_latest: windows_latest:
<<: *reusable_config <<: *reusable_config
name: "Latest Bazel" name: "Latest Bazel"
platform: windows platform: windows
bazel: latest bazel: latest
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_disallow_empty_glob"
test_flags: test_flags:
# TODO(laszlocsomor): remove "--test_env=LOCALAPPDATA" after <<: *reusable_test_flags
# https://github.com/bazelbuild/bazel/issues/7761 is fixed # TODO(laszlocsomor): remove "--test_env=LOCALAPPDATA" after
- "--test_env=LOCALAPPDATA" # https://github.com/bazelbuild/bazel/issues/7761 is fixed
- "--test_tag_filters=-no_windows" ? "--test_env=LOCALAPPDATA"
? "--test_tag_filters=-no_windows"
ubuntu1804_last_green: last_green:
<<: *reusable_config <<: *reusable_config
name: "Last Green Bazel" name: "Last Green Bazel"
platform: ubuntu1804 platform: ${{ platform }}
bazel: last_green bazel: last_green
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_disallow_empty_glob"
test_flags:
- "--test_env=PATH"
ubuntu1604_last_green:
name: "Last Green Bazel"
platform: ubuntu1604
bazel: last_green
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_disallow_empty_glob"
build_targets:
- "--"
- "//..."
- "@bazel_skylib_gazelle_plugin//..."
# //distribution requires Python >= 3.6 for some rules_pkg scripts; Ubuntu 16.04 has Python 3.5
- "-//distribution/..."
test_flags:
- "--test_env=PATH"
test_targets:
- "--"
- "//..."
- "@bazel_skylib_gazelle_plugin//..."
# //distribution requires Python >= 3.6 for some rules_pkg scripts; Ubuntu 16.04 has Python 3.5
- "-//distribution/..."
macos_last_green:
<<: *reusable_config
name: "Last Green Bazel"
platform: macos
bazel: last_green
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_disallow_empty_glob"
test_flags:
- "--test_env=PATH"
windows_last_green: windows_last_green:
<<: *reusable_config <<: *reusable_config
name: "Last Green Bazel" name: "Last Green Bazel"
platform: windows platform: windows
bazel: last_green bazel: last_green
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_disallow_empty_glob"
test_flags: test_flags:
# TODO(laszlocsomor): remove "--test_env=LOCALAPPDATA" after <<: *reusable_test_flags
# https://github.com/bazelbuild/bazel/issues/7761 is fixed # TODO(laszlocsomor): remove "--test_env=LOCALAPPDATA" after
- "--test_env=LOCALAPPDATA" # https://github.com/bazelbuild/bazel/issues/7761 is fixed
- "--test_tag_filters=-no_windows" ? "--test_env=LOCALAPPDATA"
? "--test_tag_filters=-no_windows"
ubuntu1804_last_green_bzlmod:
<<: *reusable_config
name: "Last Green Bazel (with bzlmod)"
platform: ubuntu1804
bazel: last_green
build_flags:
- "--enable_bzlmod"
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_disallow_empty_glob"
test_flags:
- "--enable_bzlmod"
- "--test_env=PATH"
buildifier: latest buildifier: latest