Add a UBSan builder to CI and CQ

Fixed: 572
Change-Id: Ib10c3e7c8265bab1c191fb0b26a56f124487d772
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/57689
Reviewed-by: Bob Beck <bbe@google.com>
diff --git a/generated/commit-queue.cfg b/generated/commit-queue.cfg
index 7500489..31a0581 100644
--- a/generated/commit-queue.cfg
+++ b/generated/commit-queue.cfg
@@ -106,6 +106,9 @@
         includable_only: true
       }
       builders {
+        name: "boringssl/try/linux_clang_ubsan"
+      }
+      builders {
         name: "boringssl/try/linux_fips"
       }
       builders {
diff --git a/generated/cr-buildbucket.cfg b/generated/cr-buildbucket.cfg
index eafe2cb..1392f03 100644
--- a/generated/cr-buildbucket.cfg
+++ b/generated/cr-buildbucket.cfg
@@ -717,6 +717,44 @@
       }
     }
     builders {
+      name: "linux_clang_ubsan"
+      swarming_host: "chromium-swarm.appspot.com"
+      dimensions: "cpu:x86-64"
+      dimensions: "os:Ubuntu-18.04"
+      dimensions: "pool:luci.flex.ci"
+      exe {
+        cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"
+        cipd_version: "refs/heads/main"
+        cmd: "luciexe"
+      }
+      properties:
+        '{'
+        '  "$gatekeeper": {'
+        '    "group": "client.boringssl"'
+        '  },'
+        '  "clang": true,'
+        '  "cmake_args": {'
+        '    "CMAKE_BUILD_TYPE": "RelWithAsserts",'
+        '    "UBSAN": "1"'
+        '  },'
+        '  "recipe": "boringssl"'
+        '}'
+      execution_timeout_secs: 1800
+      caches {
+        name: "gocache"
+        path: "gocache"
+      }
+      caches {
+        name: "gopath"
+        path: "gopath"
+      }
+      service_account: "boringssl-ci-builder@chops-service-accounts.iam.gserviceaccount.com"
+      experiments {
+        key: "luci.recipes.use_python3"
+        value: 100
+      }
+    }
+    builders {
       name: "linux_fips"
       swarming_host: "chromium-swarm.appspot.com"
       dimensions: "cpu:x86-64"
@@ -2572,6 +2610,33 @@
       }
     }
     builders {
+      name: "linux_clang_ubsan"
+      swarming_host: "chromium-swarm.appspot.com"
+      dimensions: "cpu:x86-64"
+      dimensions: "os:Ubuntu-18.04"
+      dimensions: "pool:luci.flex.try"
+      exe {
+        cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build"
+        cipd_version: "refs/heads/main"
+        cmd: "luciexe"
+      }
+      properties:
+        '{'
+        '  "clang": true,'
+        '  "cmake_args": {'
+        '    "CMAKE_BUILD_TYPE": "RelWithAsserts",'
+        '    "UBSAN": "1"'
+        '  },'
+        '  "recipe": "boringssl"'
+        '}'
+      execution_timeout_secs: 1800
+      service_account: "boringssl-try-builder@chops-service-accounts.iam.gserviceaccount.com"
+      experiments {
+        key: "luci.recipes.use_python3"
+        value: 100
+      }
+    }
+    builders {
       name: "linux_fips"
       swarming_host: "chromium-swarm.appspot.com"
       dimensions: "cpu:x86-64"
diff --git a/generated/luci-milo.cfg b/generated/luci-milo.cfg
index cfee38a..81c02e4 100644
--- a/generated/luci-milo.cfg
+++ b/generated/luci-milo.cfg
@@ -105,6 +105,11 @@
     short_name: "tsan"
   }
   builders {
+    name: "buildbucket/luci.boringssl.ci/linux_clang_ubsan"
+    category: "linux|clang"
+    short_name: "ubsan"
+  }
+  builders {
     name: "buildbucket/luci.boringssl.ci/linux_fips"
     category: "linux|fips"
     short_name: "dbg"
diff --git a/generated/luci-notify.cfg b/generated/luci-notify.cfg
index beebc6a..daa26f0 100644
--- a/generated/luci-notify.cfg
+++ b/generated/luci-notify.cfg
@@ -285,6 +285,21 @@
   }
   builders {
     bucket: "ci"
+    name: "linux_clang_ubsan"
+    repository: "https://boringssl.googlesource.com/boringssl"
+  }
+}
+notifiers {
+  notifications {
+    on_occurrence: FAILURE
+    on_occurrence: INFRA_FAILURE
+    on_new_status: SUCCESS
+    email {
+      recipients: "boringssl@google.com"
+    }
+  }
+  builders {
+    bucket: "ci"
     name: "linux_fips"
     repository: "https://boringssl.googlesource.com/boringssl"
   }
diff --git a/generated/luci-scheduler.cfg b/generated/luci-scheduler.cfg
index b87bb50..12fa431 100644
--- a/generated/luci-scheduler.cfg
+++ b/generated/luci-scheduler.cfg
@@ -185,6 +185,16 @@
   }
 }
 job {
+  id: "linux_clang_ubsan"
+  realm: "ci"
+  acl_sets: "ci"
+  buildbucket {
+    server: "cr-buildbucket.appspot.com"
+    bucket: "ci"
+    builder: "linux_clang_ubsan"
+  }
+}
+job {
   id: "linux_fips"
   realm: "ci"
   acl_sets: "ci"
@@ -506,6 +516,7 @@
   triggers: "linux_clang_rel"
   triggers: "linux_clang_rel_msan"
   triggers: "linux_clang_rel_tsan"
+  triggers: "linux_clang_ubsan"
   triggers: "linux_fips"
   triggers: "linux_fips_clang"
   triggers: "linux_fips_clang_rel"
diff --git a/main.star b/main.star
index 3f75581..48a81c3 100755
--- a/main.star
+++ b/main.star
@@ -580,6 +580,20 @@
     },
 )
 both_builders(
+    "linux_clang_ubsan",
+    LINUX_HOST,
+    category = "linux|clang",
+    short_name = "ubsan",
+    cq_enabled = True,
+    properties = {
+        "clang": True,
+        "cmake_args": {
+            "CMAKE_BUILD_TYPE": "RelWithAsserts",
+            "UBSAN": "1",
+        },
+    },
+)
+both_builders(
     "linux_fips",
     LINUX_HOST,
     category = "linux|fips",