Leopold | eb2fb7b | 2022-06-08 13:18:51 +0200 | [diff] [blame] | 1 | # Enable strict_action_env (use static PATH and do not inherit environment variables). |
| 2 | # This avoids unnecessary cache invalidations. |
| 3 | build --incompatible_strict_action_env=true |
| 4 | |
| 5 | # Build resources |
Leopold Schabel | 5c80aca | 2019-10-22 15:48:58 +0200 | [diff] [blame] | 6 | startup --batch_cpu_scheduling --io_nice_level 7 |
Leopold Schabel | 3dba532 | 2020-04-28 12:23:04 +0200 | [diff] [blame] | 7 | build --jobs 12 --local_ram_resources=HOST_RAM*0.5 |
Leopold Schabel | 8c8e677 | 2020-03-12 20:24:13 +0100 | [diff] [blame] | 8 | test --jobs 12 --test_output=errors |
Lorenz Brun | 5d7d2a4 | 2020-04-06 14:11:02 +0200 | [diff] [blame] | 9 | |
Leopold | 96b03c7 | 2022-06-08 12:59:58 +0200 | [diff] [blame] | 10 | # selinux: |
| 11 | # build with SELinux (containerd, kubelet) |
| 12 | # no_zfs,no_aufs,no_devicemapper: |
| 13 | # disable containerd features we don't need |
| 14 | # providerless,dockerless: |
| 15 | # build k8s without cloud provider and docker support |
Lorenz Brun | d13c1c6 | 2022-03-30 19:58:58 +0200 | [diff] [blame] | 16 | build --define gotags=selinux,seccomp,no_zfs,no_aufs,no_devicemapper,providerless,dockerless |
Serge Bazanski | bb7db92 | 2020-04-30 12:43:10 +0200 | [diff] [blame] | 17 | |
| 18 | # Build with C++17. |
| 19 | build --cxxopt=-std=c++17 |
| 20 | |
Lorenz Brun | f640211 | 2020-05-04 16:50:31 +0200 | [diff] [blame] | 21 | # Set workspace status file and stamp |
| 22 | build --stamp --workspace_status_command=./build/print-workspace-status.sh |
Serge Bazanski | 385c12f | 2020-06-17 12:12:42 +0200 | [diff] [blame] | 23 | |
| 24 | # Use our custom-configured host C++ toolchain. |
| 25 | build --crosstool_top=//build/toolchain:host_cc_suite |
| 26 | build --cpu=k8 |
| 27 | |
| 28 | # Use the default Bazel C++ toolchain to build the tools used during the |
| 29 | # build. |
| 30 | build --host_crosstool_top=@bazel_tools//tools/cpp:toolchain |
Serge Bazanski | c3ad846 | 2021-01-08 16:45:51 +0100 | [diff] [blame] | 31 | |
| 32 | # Load CI bazelrc if present. |
| 33 | try-import %workspace%/ci.bazelrc |
Leopold | 3154587 | 2022-06-08 13:22:32 +0200 | [diff] [blame^] | 34 | |
| 35 | # Load custom per-user settings. |
| 36 | try-import %workspace%/.bazelrc.user |