Example config for using Bazel HEAD on CI
diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml
index bf47e2b..a7089a7 100644
--- a/.bazelci/presubmit.yml
+++ b/.bazelci/presubmit.yml
@@ -1,48 +1,37 @@
---
+x_defaults:
+ # YAML has a feature for "repeated nodes", BazelCI is fine with extra nodes
+ # it doesn't know about; so that is used to avoid repeating common subparts.
+ common: &common
+ # We exclude //examples/... because it can only be built / tested with Bazel HEAD.
+ build_targets:
+ - "//..."
+ - "-//examples/..."
+ test_flags:
+ - "--test_timeout=300"
+ test_targets:
+ - "//..."
+ - "-//examples/..."
+
buildifier:
version: latest
warnings: "all"
-platforms:
+
+tasks:
ubuntu1604:
- run_targets:
- build_targets:
- - "..."
- test_flags:
- - "--test_timeout=300"
- test_targets:
- - "..."
+ <<: *common
ubuntu1804:
- run_targets:
- build_targets:
- - "..."
- test_flags:
- - "--test_timeout=300"
- test_targets:
- - "..."
- ubuntu1804_nojava:
- run_targets:
- build_flags:
- - "--javabase=@openjdk11_linux_archive//:runtime"
- build_targets:
- - "..."
- test_flags:
- - "--test_timeout=300"
- - "--javabase=@openjdk11_linux_archive//:runtime"
- test_targets:
- - "..."
+ <<: *common
macos:
- run_targets:
- build_targets:
- - "..."
- test_flags:
- - "--test_timeout=300"
- test_targets:
- - "..."
+ <<: *common
windows:
- run_targets:
+ <<: *common
+ examples:
+ platform: ubuntu1804
+ bazel: last_green
build_targets:
- - "..."
+ - "//examples/..."
test_flags:
- "--test_timeout=300"
test_targets:
- - "..."
+ - "//examples"