Run Bazel build in Github Actions (#213)

As some clients rely on the Bazel build, add a workflow to verify at
least one Bazel target (linux-x86). Also, perform some minor cleanup to
comments and target branches in our workflow files.
diff --git a/.bazelversion b/.bazelversion
deleted file mode 100644
index 0062ac9..0000000
--- a/.bazelversion
+++ /dev/null
@@ -1 +0,0 @@
-5.0.0
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 06bce12..1407dc2 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -3,7 +3,6 @@
   pull_request:
   push:
     branches:
-      - master
       - main
 
 permissions:
diff --git a/.github/workflows/build_bazel.yml b/.github/workflows/build_bazel.yml
new file mode 100644
index 0000000..8459472
--- /dev/null
+++ b/.github/workflows/build_bazel.yml
@@ -0,0 +1,21 @@
+name: Build using Bazel
+on:
+  pull_request:
+  push:
+    branches:
+      - main
+
+permissions:
+  contents: read
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
+  cancel-in-progress: true
+jobs:
+  bazel-linux-local:
+    runs-on: ubuntu-latest
+    timeout-minutes: 40
+    steps:
+      - uses: actions/checkout@v2
+      - name: Build
+        run: scripts/local-bazel-build.sh
diff --git a/scripts/local-bazel-build.sh b/scripts/local-bazel-build.sh
new file mode 100755
index 0000000..c2aeb32
--- /dev/null
+++ b/scripts/local-bazel-build.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+# Copyright 2024 Google LLC
+
+set -e
+
+BAZEL_ARGS=()
+
+# Bazel-level configuration
+#
+# If editing these flags, make sure `local-build.sh` flags are updated.
+BAZEL_ARGS+=("-c=\"opt\"")
+BAZEL_ARGS+=("-copt=\"fpic\"")
+
+# User-specified Bazel arguments go last to allow overridding defaults
+BAZEL_ARGS+=($@)
+
+# Build all targets
+bazel build :all
diff --git a/scripts/local-build.sh b/scripts/local-build.sh
index 426a13b..2be99e7 100755
--- a/scripts/local-build.sh
+++ b/scripts/local-build.sh
@@ -13,6 +13,8 @@
 CMAKE_ARGS=()
 
 # CMake-level configuration
+#
+# If editing these flags, make sure `local-build-bazel.sh` flags are updated.
 CMAKE_ARGS+=("-DCMAKE_BUILD_TYPE=Release")
 CMAKE_ARGS+=("-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
 
@@ -22,7 +24,7 @@
   CMAKE_ARGS+=("-GNinja")
 fi
 
-# Use-specified CMake arguments go last to allow overridding defaults
+# User-specified CMake arguments go last to allow overridding defaults
 CMAKE_ARGS+=($@)
 
 cd build/local && cmake ../.. \