-
Notifications
You must be signed in to change notification settings - Fork 2.2k
51 lines (42 loc) · 1.23 KB
/
ci-test-cpp.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
# Github action definitions for C++ unit-tests with PRs.
name: tf-serving-cpp-unit-tests
on:
pull_request:
branches: [ master ]
paths-ignore:
- '**.md'
- 'docs/**'
workflow_dispatch:
# Remove `push` trigger before merge
push:
env:
USE_BAZEL_VERSION: "6.5.0"
# Changed to match tensorflow
# https://github.com/tensorflow/tensorflow/blob/master/.bazelversion
jobs:
tests:
if: github.actor != 'copybara-service[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Bazel
uses: bazel-contrib/[email protected]
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}-${{ hashFiles('.github/workflows/ci-test.yml') }}
# Share repository cache between workflows.
repository-cache: true
- name: Build unit tests
shell: bash
run: |
bazel build //tensorflow_serving/...
- name: Clean unit test artifacts
shell: bash
run: |
bazel clean --expunge
- name: Run unit tests
shell: bash
run: |
bazel test //tensorflow_serving/... --test_output=errors