blob: 109175fa66f56f999513d15b5d323b763b70d77d [file] [log] [blame] [edit]
---
bazel: 4.1.0
# Note, this will tell the user to do the wrong thing (manually run buildifer)
# See https://github.com/bazelbuild/continuous-integration/issues/1161
buildifier:
version: 4.0.1
# Keep this in sync with the list in .pre-commit-config.yaml
# https://github.com/bazelbuild/buildtools/issues/479 should fix this by giving us a config file
warnings: "-bzl-visibility,-function-docstring-args,-function-docstring-return,-print,-unnamed-macro,-provider-params,-function-docstring-header,-no-effect,-uninitialized,-rule-impl-return"
# Note, we ought to be able to exclude third_party from this check, but currently cannot:
# https://github.com/bazelbuild/continuous-integration/issues/1162
tasks:
ubuntu1804:
name: ubuntu1804
platform: ubuntu1804
run_targets:
- "@nodejs//:yarn_node_repositories"
- "@nodejs//:yarn"
# Regression test for #1493
- "//packages/create:npm_package.pack"
- "//internal/node/test:no_deps"
- "//internal/node/test:has_deps_legacy"
- "//internal/node/test:has_deps"
- "//internal/node/test:has_deps_hybrid"
- "//internal/npm_install/test:index"
# Disabled due to https://github.com/bazelbuild/rules_nodejs/issues/1486
#- "@fine_grained_deps_yarn//typescript/bin:tsc"
build_targets:
- "//..."
build_flags:
# TODO(gregmagolan): figure out how to install missing shared libs
# Without this filter the @cypress external repository will be built and that build will fail due to missing shared libs.
- "--build_tag_filters=-cypress"
test_flags:
# Both chrome & firefox are missing shared libs on bazelci ubuntu.
# On circleci we have the same issue but we can work around it using apt-get.
# on bazelci apt-get fails with permission denied and there is no sudo
# command to switch to root.
# TODO(gregmagolan): figure out how to install missing shared libs
- "--test_tag_filters=-e2e,-examples,-manual,-browser:chromium-local,-browser:firefox-local,-browser:custom_chrome,-cypress"
test_targets:
- "//..."
# //internal/node/test:nodejs_toolchain_linux_amd64_test is a "manual" test that must be run
# explicitly; it should pass when running on Linux with no --platform set.
- "//internal/node/test:nodejs_toolchain_linux_amd64_test"
ubuntu1804_debug:
name: ubuntu1804_debug
platform: ubuntu1804
build_flags:
# TODO(gregmagolan): figure out how to install missing shared libs
# Without this filter the @cypress external repository will be built and that build will fail due to missing shared libs.
- "--build_tag_filters=-cypress"
test_flags:
- "--compilation_mode=dbg"
- "--define=VERBOSE_LOGS=1"
# Both chrome & firefox are missing shared libs on bazelci ubuntu.
# On circleci we have the same issue but we can work around it using apt-get.
# on bazelci apt-get fails with permission denied and there is no sudo
# command to switch to root.
# TODO(gregmagolan): figure out how to install missing shared libs
- "--test_tag_filters=-e2e,-examples,-manual,-browser:chromium-local,-browser:firefox-local,-browser:custom_chrome,-cypress"
test_targets:
- "//..."
ubuntu1804_e2e:
name: ubuntu1804_e2e
platform: ubuntu1804
# We need to reduce the memory & CPU usage of the top-level
# bazel process for bazel-in-bazel tests to not
# deplete the system memory completely.
# - startup JVM memory reduced
# - top-level bazel process should use as little memory as possible and only 1 core
# - nested bazel process should use a limited number of cores
shell_commands:
- echo 'startup --host_jvm_args=-Xms256m --host_jvm_args=-Xmx1536m' >> .bazelrc
build_flags:
- "--build_tag_filters=e2e,-cypress"
build_targets:
- "//..."
# We control Bazel version in integration tests, so we don't need USE_BAZEL_VERSION for tests.
skip_use_bazel_version_for_test: true
test_flags:
- "--test_tag_filters=e2e"
- "--local_ram_resources=792"
# test_args will be passed to the nested bazel process
- "--test_arg=--local_ram_resources=13288"
- "--test_arg=--local_cpu_resources=7"
# Both chrome & firefox are missing shared libs on bazelci ubuntu.
# On circleci we have the same issue but we can work around it using apt-get.
# on bazelci apt-get fails with permission denied and there is no sudo
# command to switch to root.
# TODO(gregmagolan): figure out how to install missing shared libs
- "--test_arg=--test_tag_filters=-manual,-browser:chromium-local,-browser:firefox-local,-cypress"
test_targets:
- "//..."
ubuntu1804_examples:
name: ubuntu1804_examples
platform: ubuntu1804
# We need to reduce the memory & CPU usage of the top-level
# bazel process for bazel-in-bazel tests to not
# deplete the system memory completely.
# - startup JVM memory reduced
# - top-level bazel process should use as little memory as possible and only 1 core
# - nested bazel process should use a limited number of cores
shell_commands:
- echo 'startup --host_jvm_args=-Xms256m --host_jvm_args=-Xmx1536m' >> .bazelrc
build_flags:
- "--build_tag_filters=examples,-cypress"
build_targets:
- "//..."
# We control Bazel version in integration tests, so we don't need USE_BAZEL_VERSION for tests.
skip_use_bazel_version_for_test: true
test_flags:
- "--test_tag_filters=examples,-cypress"
- "--local_ram_resources=792"
# test_args will be passed to the nested bazel process
- "--test_arg=--local_ram_resources=13288"
- "--test_arg=--local_cpu_resources=7"
# Both chrome & firefox are missing shared libs on bazelci ubuntu.
# On circleci we have the same issue but we can work around it using apt-get.
# on bazelci apt-get fails with permission denied and there is no sudo
# command to switch to root.
# TODO(gregmagolan): figure out how to install missing shared libs
- "--test_arg=--test_tag_filters=-manual,-browser:chromium-local,-browser:firefox-local,-cypress"
test_targets:
- "//..."
# The following examples only works on linux as it downloads the linux node distribution
# It is tagged "manual" so we run it explicitly here
# TODO(gregmagolan): make node_repositories acccept different archives for different platforms
- "//examples:examples_vendored_node"
- "//examples:examples_vendored_node_and_yarn"
ubuntu1804_cross_compile_darwin:
name: ubuntu1804_cross_compile_darwin
platform: ubuntu1804
# Build on linux with the node --platform set to darwin
build_flags:
- "--platforms=@build_bazel_rules_nodejs//toolchains/node:darwin_amd64"
# TODO(gregmagolan): figure out how to install missing shared libs
# Without this filter the @cypress external repository will be built and that build will fail due to missing shared libs.
- "--build_tag_filters=-cypress"
build_targets:
- "//internal/..."
test_flags:
- "--platforms=@build_bazel_rules_nodejs//toolchains/node:darwin_amd64"
test_targets:
# //internal/node/test:nodejs_toolchain_darwin_amd64_test is a "manual" test that must be run
# explicitly with --platforms=@build_bazel_rules_nodejs//toolchains/node:darwin_amd64 set
- "//internal/node/test:nodejs_toolchain_darwin_amd64_test"
ubuntu1804_cross_compile_windows:
name: ubuntu1804_cross_compile_windows
platform: ubuntu1804
# Build on linux with the node --platform set to Windows
build_flags:
- "--platforms=@build_bazel_rules_nodejs//toolchains/node:windows_amd64"
# TODO(gregmagolan): figure out how to install missing shared libs
# Without this filter the @cypress external repository will be built and that build will fail due to missing shared libs.
- "--build_tag_filters=-cypress"
build_targets:
- "//internal/..."
test_flags:
- "--platforms=@build_bazel_rules_nodejs//toolchains/node:windows_amd64"
test_targets:
# //internal/node/test:nodejs_toolchain_windows_amd64_test is a "manual" test that must be run
# explicitly with --platforms=@build_bazel_rules_nodejs//toolchains/node:windows_amd64 set
- "//internal/node/test:nodejs_toolchain_windows_amd64_test"
macos:
name: macos
platform: macos
run_targets:
- "@nodejs//:yarn_node_repositories"
- "@nodejs//:yarn"
# Regression test for #1493
- "//packages/create:npm_package.pack"
- "//internal/node/test:no_deps"
- "//internal/node/test:has_deps_legacy"
- "//internal/node/test:has_deps"
- "//internal/node/test:has_deps_hybrid"
- "//internal/npm_install/test:index"
# Disabled due to https://github.com/bazelbuild/rules_nodejs/issues/1486
#- "@fine_grained_deps_yarn//typescript/bin:tsc"
build_targets:
- "//..."
test_flags:
# Firefox are missing shared libs on bazelci mac
# TODO(gregmagolan): figure out how to install missing shared libs
- "--test_tag_filters=-e2e,-examples,-manual,-browser:firefox-local"
test_targets:
- "//..."
# //internal/node/test:nodejs_toolchain_darwin_amd64_test is a "manual" test that must be run
# explicitly; it should pass when running on OSX with no --platform set.
- "//internal/node/test:nodejs_toolchain_darwin_amd64_test"
macos_e2e:
name: macos_e2e
platform: macos
# We need to reduce the memory & CPU usage of the top-level
# bazel process for bazel-in-bazel tests to not
# deplete the system memory completely.
# - startup JVM memory reduced
# - top-level bazel process should use as little memory as possible and only 1 core
# - nested bazel process should use a limited number of cores
shell_commands:
- echo 'startup --host_jvm_args=-Xms256m --host_jvm_args=-Xmx1536m' >> .bazelrc
build_flags:
- "--build_tag_filters=e2e"
build_targets:
- "//..."
# We control Bazel version in integration tests, so we don't need USE_BAZEL_VERSION for tests.
skip_use_bazel_version_for_test: true
test_flags:
- "--test_tag_filters=e2e,-no-bazelci-mac"
- "--local_ram_resources=792"
# test_args will be passed to the nested bazel process
# TODO(gregmagolan): fix frequent flake with multiple cores in nested bazel (osx buildkite & local)
- "--test_arg=--local_ram_resources=13288"
# Firefox are missing shared libs on bazelci mac
# TODO(gregmagolan): figure out how to install missing shared libs
- "--test_arg=--test_tag_filters=-manual,-browser:firefox-local"
test_targets:
- "//..."
macos_examples:
name: macos_examples
platform: macos
# We need to reduce the memory & CPU usage of the top-level
# bazel process for bazel-in-bazel tests to not
# deplete the system memory completely.
# - startup JVM memory reduced
# - top-level bazel process should use as little memory as possible and only 1 core
# - nested bazel process should use a limited number of cores
shell_commands:
- echo 'startup --host_jvm_args=-Xms256m --host_jvm_args=-Xmx1536m' >> .bazelrc
build_flags:
- "--build_tag_filters=examples"
build_targets:
- "//..."
# We control Bazel version in integration tests, so we don't need USE_BAZEL_VERSION for tests.
skip_use_bazel_version_for_test: true
test_flags:
- "--test_tag_filters=examples,-manual"
- "--local_ram_resources=792"
# test_args will be passed to the nested bazel process
# TODO(gregmagolan): fix frequent flake with multiple cores in nested bazel (osx buildkite & local)
- "--test_arg=--local_ram_resources=13288"
# Firefox are missing shared libs on bazelci mac
# TODO(gregmagolan): figure out how to install missing shared libs
- "--test_arg=--test_tag_filters=-no-bazelci-mac,-manual,-browser:firefox-local"
test_targets:
- "//..."
macos_cross_compile_linux:
name: macos_cross_compile_linux
platform: macos
# Build on mac with the node --platform set to linux
build_flags:
- "--platforms=@build_bazel_rules_nodejs//toolchains/node:linux_amd64"
build_targets:
- "//internal/..."
test_flags:
- "--platforms=@build_bazel_rules_nodejs//toolchains/node:linux_amd64"
test_targets:
# //internal/node/test:nodejs_toolchain_linux_amd64_test is a "manual" test that must be run
# explicitly with --platforms=@build_bazel_rules_nodejs//toolchains/node:linux_amd64 set
- "//internal/node/test:nodejs_toolchain_linux_amd64_test"
# TODO(gregmagolan): fix platform configuraiton for this test job for Bazel 2.0
# macos_fake_rbe:
# name: macos_fake_rbe
# platform: macos
# shell_commands:
# # Reproduce https://github.com/bazelbuild/rules_nodejs/issues/1305
# # TODO: switch to use real mac cross-platform RBE on CI when
# # https://github.com/bazelbuild/continuous-integration/pull/749
# # lands on bazelci master.
# - echo 'build --platforms=@rbe_default//config:platform' >> .bazelrc
# run_targets:
# - "//internal/node/test:no_deps"
windows:
name: windows
platform: windows
run_targets:
- "@nodejs//:yarn_node_repositories"
- "@nodejs//:yarn"
- "//internal/node/test:no_deps"
- "//internal/node/test:has_deps_legacy"
- "//internal/node/test:has_deps"
- "//internal/node/test:has_deps_hybrid"
- "//internal/npm_install/test:index"
# Disabled due to https://github.com/bazelbuild/rules_nodejs/issues/1486
#- "@fine_grained_deps_yarn//typescript/bin:tsc"
build_flags:
- "--build_tag_filters=-e2e,-examples,-manual,-fix-windows,-no-bazelci-windows,-requires-runfiles"
build_targets:
- "//..."
test_flags:
# Firefox not supported on Windows with rules_webtesting (if run it exit with success)
# See https://github.com/bazelbuild/rules_webtesting/blob/0.3.3/browsers/BUILD.bazel#L66.
- "--test_tag_filters=-e2e,-examples,-fix-windows,-no-bazelci-windows,-requires-runfiles,-manual,-browser:firefox-local,-cypress"
test_targets:
- "//..."
# //internal/node/test:nodejs_toolchain_windows_amd64_test is a "manual" test that must be run
# explicitly; it should pass when running on Windows with no --platform set.
- "//internal/node/test:nodejs_toolchain_windows_amd64_test"
windows_runfiles_enabled:
name: windows_runfiles_enabled
platform: windows
test_flags:
- "--test_tag_filters=requires-runfiles"
- "--enable_runfiles"
test_targets:
- "//..."
windows_e2e:
name: windows_e2e
platform: windows
build_flags:
- "--build_tag_filters=e2e,-fix-windows,-no-bazelci-windows,-requires-runfiles"
build_targets:
- "//..."
# We control Bazel version in integration tests, so we don't need USE_BAZEL_VERSION for tests.
skip_use_bazel_version_for_test: true
test_flags:
- "--test_tag_filters=e2e,-fix-windows,-no-bazelci-windows,-requires-runfiles"
- "--local_ram_resources=792"
# test_args will be passed to the nested bazel process
- "--test_arg=--local_ram_resources=13288"
# Firefox not supported on Windows with rules_webtesting (if run it exit with success)
# See https://github.com/bazelbuild/rules_webtesting/blob/0.3.3/browsers/BUILD.bazel#L66.
# Chrome fails to launch on Windows inside bazel-in-bazel with: [17:12:04] E/launcher -
# spawn D:\...\external\io_bazel_rules_webtesting\third_party\chromedriver\chromedriver.out\chromedriver_win32\chromedriver.exe ENOENT
- "--test_arg=--test_tag_filters=-fix-windows,-no-bazelci-windows,-requires-runfiles,-manual,-browser:chromium-local,-browser:firefox-local"
test_targets:
- "//..."
windows_examples:
name: windows_examples
platform: windows
build_flags:
- "--build_tag_filters=examples,-fix-windows,-no-bazelci-windows,-requires-runfiles"
build_targets:
- "//..."
# We control Bazel version in integration tests, so we don't need USE_BAZEL_VERSION for tests.
skip_use_bazel_version_for_test: true
test_flags:
- "--test_tag_filters=examples,-manual,-fix-windows,-no-bazelci-windows,-requires-runfiles,-cypress"
- "--local_ram_resources=792"
# test_args will be passed to the nested bazel process
- "--test_arg=--local_ram_resources=13288"
# Firefox not supported on Windows with rules_webtesting (if run it exit with success)
# See https://github.com/bazelbuild/rules_webtesting/blob/0.3.3/browsers/BUILD.bazel#L66.
# Chrome fails to launch on Windows inside bazel-in-bazel with: [17:12:04] E/launcher -
# spawn D:\...\external\io_bazel_rules_webtesting\third_party\chromedriver\chromedriver.out\chromedriver_win32\chromedriver.exe ENOENT
- "--test_arg=--test_tag_filters=-fix-windows,-no-bazelci-windows,-requires-runfiles,-manual,-browser:chromium-local,-browser:firefox-local,-cypress"
test_targets:
- "//..."
windows_cross_compile_linux:
name: windows_cross_compile_linux
platform: windows
build_flags:
- "--build_tag_filters=-fix-windows,-no-bazelci-windows,-requires-runfiles"
# Build on windows with the node --platform set to linux
- "--platforms=@build_bazel_rules_nodejs//toolchains/node:linux_amd64"
build_targets:
- "//internal/..."
rbe_ubuntu1604:
name: rbe_ubuntu1604
platform: rbe_ubuntu1604
build_targets:
- "//..."
build_flags:
# filter flags:
# -cypress: without this filter the @cypress external repository will be built and that build will fail due to missing shared libs.
# -e2e & -examples: these are bazel-in-bazel tests tagged exclusive and will not run on RBE
# -browser:*: browser tests require shared libs install
# -no-rbe: disable for some other reason on a case-by-case basis
# TODO(gregmagolan): figure out how to install missing shared libs
- "--build_tag_filters=-cypress,-examples,-e2e,-no-rbe,-browser:chromium-local,-browser:firefox-local"
test_flags:
- "--test_tag_filters=-cypress,-examples,-e2e,-no-rbe,-browser:chromium-local,-browser:firefox-local"
test_targets:
- "//..."