Skip to content

Commit c6969e5

Browse files
[Github][Bazel] Add Workflow to Run Bazel Build (#165071)
This patch adds a job to the bazel checks workflow to run the bazel build/test. This patch only tests a couple projects just to get things going. The plan is to expand to more projects eventually and setup a GCS bucket for caching so jobs complete quickly by using cached artifacts. This should add minimal load to the CI given the low frequency of bazel PRs, and especially when we enable GCS based caching due to bazel's effective use of caching. Google is also sponsoring the Linux Premerge CI and is interested in having premerge bazel builds which is why it makes sense to do premerge testing of this alternative build system using those resources.
1 parent b4d7d3f commit c6969e5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/bazel-checks.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,26 @@ jobs:
3030
- name: Run Buildifier
3131
run: |
3232
buildifier --mode=check $(find ./utils/bazel -name *BUILD*)
33+
34+
bazel-build:
35+
name: "Bazel Build/Test"
36+
runs-on: llvm-premerge-linux-runners
37+
if: github.repository == 'llvm/llvm-project'
38+
steps:
39+
- name: Fetch LLVM sources
40+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
41+
# TODO(boomanaiden154): We should use a purpose built container for this. Move
42+
# over when we have fixed the issues with using custom containers with Github
43+
# ARC in GKE.
44+
- name: Setup System Dependencies
45+
run: |
46+
sudo apt-get update
47+
sudo apt-get install -y libmpfr-dev libpfm4-dev
48+
sudo curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-amd64.deb > /tmp/bazelisk.deb
49+
sudo apt-get install -y /tmp/bazelisk.deb
50+
rm /tmp/bazelisk.deb
51+
- name: Build/Test
52+
working-directory: utils/bazel
53+
run: |
54+
bazelisk test --config=ci --sandbox_base="" \
55+
@llvm-project//llvm/unittests:adt_tests

0 commit comments

Comments
 (0)