-
-
Notifications
You must be signed in to change notification settings - Fork 163
55 lines (48 loc) · 1.38 KB
/
linux-bazel-build.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
49
50
51
52
53
54
55
name: bazel
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'LICENSE'
workflow_dispatch:
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'
- 'LICENSE'
jobs:
bazel:
name: ci-ubuntu-24.04-gcc-bazel
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install ccache
uses: hendrikmuhs/[email protected]
- name: Cache Bazel
id: cache-bazel
uses: actions/[email protected]
env:
cache-name: cache-bazel-data
with:
path: /home/runner/.cache/bazel/_bazel_runner
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('MODULE.bazel') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Build faker-cxx library
run: bazel build //:faker-cxx
- name: Build faker-cxx examples and run
run: |
bazel build //examples:faker-cxx-basic-example
bazel build //examples:faker-cxx-person-example
bazel-bin/examples/faker-cxx-person-example
bazel-bin/examples/faker-cxx-basic-example
- name: Build faker-cxx tests and validate
run: |
bazel build //tests:faker-cxx-ut
bazel-bin/tests/faker-cxx-ut