From 371f6863768c2cef0e02790a11bdbdc0a39f09fb Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Mon, 10 Jun 2019 10:23:33 -0700 Subject: [PATCH] Use yaml anchors, aliases, and merge to avoid repetition. RELNOTES: None. PiperOrigin-RevId: 252430973 --- .bazelci/presubmit.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index c4c3967..2463212 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -1,34 +1,32 @@ --- -tasks: - macos_latest: - name: "Latest Bazel" +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 platform: macos - bazel: latest build_targets: - "//..." test_targets: - "//..." +tasks: + macos_latest: + name: "Latest Bazel" + bazel: latest + <<: *common + macos_last_green: name: "Last Green Bazel" - platform: macos bazel: last_green - build_targets: - - "//..." - test_targets: - - "//..." + <<: *common macos_latest_head_deps: name: "Latest Bazel with Head Deps" - platform: macos bazel: latest shell_commands: # Update the WORKSPACE to use head versions of some deps to ensure nothing # has landed on them breaking this project. - .bazelci/update_workspace_to_deps_heads.sh - build_targets: - - "//..." - test_targets: - - "//..." + <<: *common buildifier: latest