-
Notifications
You must be signed in to change notification settings - Fork 4
92 lines (80 loc) · 2.37 KB
/
c_test.yaml
File metadata and controls
92 lines (80 loc) · 2.37 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: C/C++ Tests
on:
push:
branches:
- main
paths:
- "src/**"
- "bzl/**"
- "BUILD.bazel"
- ".bazelrc"
- ".github/workflows/*.yaml"
pull_request:
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
outputs:
should_test: ${{ github.event_name != 'pull_request' || steps.filter.outputs.test == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
test:
- 'src/**'
- 'bzl/**'
- 'BUILD.bazel'
- '.bazelrc'
- '.github/workflows/*.yaml'
Unit-Tests:
needs: changes
if: ${{ needs.changes.outputs.should_test == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-unit
repository-cache: true
- name: Run unit tests
run: bazel test //src/... --test_output=errors
- name: Archive unit test visualization logs
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-test-viz-logs
path: |
bazel-testlogs/**/test.outputs/*.json
FSM-Integration:
needs: changes
if: ${{ needs.changes.outputs.should_test == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-fsm
repository-cache: true
- name: FSM test (debug)
run: bazel test //src/scheduler:fsm_test_debug --test_output=errors
- name: FSM test (flight)
run: bazel test //src/scheduler:fsm_test_flight --config=fsm-flight --test_output=errors
- name: FSM test (bringup)
run: bazel test //src/scheduler:fsm_test_bringup --config=fsm-bringup --test_output=errors
- name: Archive FSM visualization logs
if: always()
uses: actions/upload-artifact@v4
with:
name: fsm-viz-logs
path: |
bazel-testlogs/**/test.outputs/fsm_viz_*.json