-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (29 loc) · 921 Bytes
/
ci.yaml
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
name: ci
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Mount bazel cache
uses: actions/cache@v3
with:
path: "/home/runner/.cache/bazel"
key: bazel
- name: Build
run: |
bazel build //...
- name: Test
run: |
bazel test //...
- name: Run examples
run: |
# Don't run the example based on binaries for now, because the binaries are not
# available to download.
EXAMPLES="$(find examples -type d -maxdepth 1 -mindepth 1 | grep -v use-binaries)"
for f in $EXAMPLES; do
echo "Running example $f"
(cd "$f" && bazel run snapshots -- collect)
echo "Running example $f (with bzlmod enabled)"
(cd "$f" && bazel run --enable_bzlmod snapshots -- collect)
done