-
Notifications
You must be signed in to change notification settings - Fork 388
42 lines (36 loc) · 1.25 KB
/
bazel.yml
File metadata and controls
42 lines (36 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Bazel
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Fix expired p4lang GPG key
run: |
sudo sed -i "s|deb http://download.opensuse.org/repositories/home:/p4lang/xUbuntu_22.04/|deb [trusted=yes] http://download.opensuse.org/repositories/home:/p4lang/xUbuntu_22.04/|g" install_deps_ubuntu_22.04.sh
sudo sed -i '/curl -fsSL https:\/\/download.opensuse.org\/repositories\/home:\/p4lang/d' install_deps_ubuntu_22.04.sh
- name: Install dependencies
run: sudo ./install_deps_ubuntu_22.04.sh
- name: Cache Bazel
uses: actions/cache@v3
with:
path: |
~/.cache/bazel
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-
- name: Build simple_switch_grpc
run: |
bazel build //targets/simple_switch_grpc:simple_switch_grpc
- name: Run simple_switch_grpc tests
run: |
bazel test //targets/simple_switch_grpc/tests/...