Skip to content

Commit 98a964f

Browse files
committed
basic github ci actions
1 parent 67f15a8 commit 98a964f

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/postsubmit.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Postsubmit
2+
run-name: Postsubmit run
3+
on: push
4+
jobs:
5+
bazel-build-test:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v4
10+
with:
11+
fetch-depth: 0
12+
submodules: recursive
13+
- name: Get Bazel
14+
uses: bazel-contrib/setup-bazel@0.8.1
15+
with:
16+
# Avoid downloading Bazel every time.
17+
bazelisk-cache: true
18+
# Store build cache per workflow.
19+
disk-cache: ${{ github.workflow }}
20+
# Share repository cache between workflows.
21+
repository-cache: true
22+
- name: Build All
23+
run: bazel build //...
24+
- name: Test All
25+
run: bazel test //...

.github/workflows/presubmit.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: presubmit
2+
run-name: Presubmit run triggered by ${{ github.actor }}
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
jobs:
7+
bazel-build-test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
submodules: recursive
15+
- name: Get Bazel
16+
uses: bazel-contrib/setup-bazel@0.8.1
17+
with:
18+
# Avoid downloading Bazel every time.
19+
bazelisk-cache: true
20+
# Store build cache per workflow.
21+
disk-cache: ${{ github.workflow }}
22+
# Share repository cache between workflows.
23+
repository-cache: true
24+
- name: Build All
25+
run: bazel build //...
26+
- name: Test All
27+
run: bazel test //...

0 commit comments

Comments
 (0)