mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
79 lines
2.9 KiB
Plaintext
79 lines
2.9 KiB
Plaintext
# Common bazel settings between open source community repository and the monorepo
|
|
|
|
### Profiles ###
|
|
|
|
# ci — configuration tailored for CI
|
|
|
|
### --- ###
|
|
|
|
common --@rules_jvm//:jvm-builder=@community//:monorepo-jvm-builder
|
|
common --@rules_jvm//:default-kotlinc-opts=@community//:k17
|
|
common --@rules_jvm//:resource-packager=@rules_jvm//src/misc:worker-jvm
|
|
common --@rules_jvm//:koltin_inc_threshold=0 --@rules_jvm//:java_inc_threshold=0
|
|
|
|
# configure resources
|
|
common --local_resources=memory=HOST_RAM*.77 --local_resources=cpu=HOST_CPUS*1.2
|
|
common --jobs=HOST_CPUS*1.2 --worker_max_multiplex_instances=JvmCompile=HOST_CPUS*1.2
|
|
|
|
# hide Java 8 deprecation warnings
|
|
common --javacopt=-Xlint:-options
|
|
|
|
# https://bazel.build/docs/bazel-and-java#hermetic-testing
|
|
# The code is compiled for, executed, and tested on this JVM.
|
|
common --java_language_version=17
|
|
common --java_runtime_version=remotejdk_21
|
|
|
|
# see https://bazel.build/external/lockfile
|
|
# use `bazel mod deps --lockfile_mode=refresh` to update lock file
|
|
common --lockfile_mode=error
|
|
common:windows --lockfile_mode=off # todo: https://youtrack.jetbrains.com/issue/DPE-59
|
|
|
|
common --noenable_workspace
|
|
|
|
common --nolegacy_external_runfiles --experimental_sibling_repository_layout
|
|
|
|
# https://bazel.build/docs/bazel-and-java#config-build-tools-java
|
|
# A second pair of JDK and JVM used to build and execute tools, which are used in the build process, but are not in the build results.
|
|
# That JDK and JVM are controlled using --tool_java_language_version and --tool_java_runtime_version
|
|
common --tool_java_language_version=17
|
|
# Java runtime the tools should use
|
|
common --tool_java_runtime_version=remotejdk_17
|
|
|
|
# make sure you don't need to open file to read compilation errors
|
|
common --experimental_ui_max_stdouterr_bytes=-1
|
|
|
|
# IDEA do not handle symlinks efficiently (freeze due to modal non-cancellable dialog) and no way to exclude directories by pattern bazel-
|
|
common --symlink_prefix=out/bazel-
|
|
|
|
# FS Watch
|
|
build --watchfs
|
|
#build --experimental_windows_watchfs
|
|
build:linux --nowatchfs
|
|
build:ci --nowatchfs
|
|
|
|
common --enable_platform_specific_config
|
|
common --incompatible_strict_action_env=true
|
|
|
|
# Do not depend on external environment
|
|
build --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
|
|
|
|
# Generally good remote cache tweaks
|
|
# on CI, set remote_cache_async to false! set to false for local runs also, to investigate https://github.com/bazelbuild/bazel/issues/19273
|
|
common --remote_cache_async=false --remote_cache_compression=true
|
|
common:ci --remote_cache_async=false
|
|
|
|
# https://www.buildbuddy.io/blog/debugging-slow-bazel-builds/
|
|
# check if `--remote_download_outputs=minimal` makes sense for CI or some local builds
|
|
build --remote_build_event_upload=minimal
|
|
build --nolegacy_important_outputs
|
|
|
|
# protobuf
|
|
common --incompatible_enable_proto_toolchain_resolution
|
|
|
|
# More debug on CI
|
|
common:ci --announce_rc
|
|
common:ci --show_progress_rate_limit=30
|
|
|
|
# avoid creating a runfiles tree for binaries or tests until it is needed
|
|
build --nobuild_runfile_links
|