-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.38 KB
/
ci.yml
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
43
44
45
46
47
48
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jidicula/clang-format-action@v4.9.0
with: { clang-format-version: "15" }
test-windows:
runs-on: windows-latest
steps:
- uses: actions/cache@v3
with:
path: |
/Users/runneradmin/AppData/Local/bazelisk
/Users/runneradmin/.cache/bazel-disk-cache
key: ${{runner.os}}-bazel-cache
- uses: actions/checkout@v3
- run: bazel --bazelrc=.bazelrc --bazelrc=.github/workflows/ci-windows.bazelrc test //...
test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Mount bazel caches
uses: actions/cache@v3
with:
path: |
"~/.cache/bazel"
"~/.cache/bazel-repo"
key: bazel-cache-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE') }}
restore-keys: bazel-cache-
- name: bazel test //...
env:
# Bazelisk will download bazel to here, ensure it is cached between runs.
XDG_CACHE_HOME: ~/.cache/bazel-repo
run: bazel --bazelrc=.bazelrc --bazelrc=$GITHUB_WORKSPACE/.github/workflows/ci.bazelrc test //...