bazel: Explicitly build some targets in presubmit
This will prevent skipping them due to accidental incompatibility
(https://pigweed.dev/bazel_compatibility.html#asserting-compatibility).
Test: bazelisk build --config=presubmit
Change-Id: I0a52e55f315d7a2607911fed82f5e896964470ba
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/quickstart/bazel/+/217134
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Ted Pudlik <tpudlik@google.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Reviewed-by: Erik Gilling <konkers@google.com>
diff --git a/.bazelignore b/.bazelignore
new file mode 100644
index 0000000..912eacc
--- /dev/null
+++ b/.bazelignore
@@ -0,0 +1 @@
+third_party
diff --git a/.bazelrc b/.bazelrc
index 052f08b..64fb386 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -22,6 +22,12 @@
# Required for new toolchain resolution API.
build --incompatible_enable_cc_toolchain_resolution
+# Default targets to build when running:
+# bazel build --config=presubmit
+build:presubmit -- \
+ //... \
+ //src:echo.elf
+
# Use the remote cache. This will only work for users who have permission to access it.
common:remote_cache --remote_cache=grpcs://remotebuildexecution.googleapis.com
common:remote_cache --google_default_credentials=true
diff --git a/pigweed.json b/pigweed.json
index ffae59c..ea9b21d 100644
--- a/pigweed.json
+++ b/pigweed.json
@@ -5,7 +5,7 @@
"upload_local_results": true,
"programs": {
"default": [
- ["build", "//..."],
+ ["build", "--config=presubmit"],
["test", "//..."]
]
}