Skip to content

Commit c48bce3

Browse files
committed
Add a CI to protect main/master branches
1 parent 84a07e0 commit c48bce3

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/main.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Bazel Build and Test
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ${{ matrix.runner }}
12+
strategy:
13+
matrix:
14+
runner:
15+
- ubuntu-24.04 # amd64
16+
- ubuntu-24.04-arm # arm64
17+
fail-fast: false
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Install Bazelisk
24+
run: |
25+
ARCH=$([[ "${{ matrix.runner }}" == "ubuntu-24.04" ]] && echo "amd64" || echo "arm64")
26+
curl -LO "https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-${ARCH}"
27+
chmod +x bazelisk-linux-*
28+
sudo mv bazelisk-linux-* /usr/local/bin/bazel
29+
30+
- name: Cache Bazel
31+
uses: actions/cache@v4
32+
with:
33+
path: |
34+
~/.cache/bazel
35+
~/.cache/bazelisk
36+
key: bazel-${{ matrix.runner }}-${{ hashFiles('WORKSPACE', '**/BUILD', '**/*.bzl') }}
37+
restore-keys: |
38+
bazel-${{ matrix.runner }}-
39+
40+
- name: Run Bazel Build
41+
run: |
42+
ARCH=$([[ "${{ matrix.runner }}" == "ubuntu-24.04" ]] && echo "amd64" || echo "arm64")
43+
bazel build //clusterers:cluster-in-memory_main

0 commit comments

Comments
 (0)