-
Notifications
You must be signed in to change notification settings - Fork 41
97 lines (97 loc) · 3.21 KB
/
test.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
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
93
94
95
96
97
name: ros2_tracing
on:
pull_request:
push:
branches:
- rolling
schedule:
- cron: "0 5 * * *"
jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.build-type == 'binary' }}
strategy:
fail-fast: false
matrix:
include:
# Normal build (binary)
- os: ubuntu-22.04
distro: rolling
build-type: binary
instrumentation: instr-enabled
tracepoints: tp-included
# Normal build (source)
- os: ubuntu-22.04
distro: rolling
build-type: source
instrumentation: instr-enabled
tracepoints: tp-included
# Build with instrumentation disabled
- os: ubuntu-22.04
distro: rolling
build-type: source
instrumentation: instr-disabled
tracepoints: tp-included
# Normal build with tracepoints excluded
- os: ubuntu-22.04
distro: rolling
build-type: source
instrumentation: instr-enabled
tracepoints: tp-excluded
env:
ROS2_REPOS_FILE_URL: 'https://raw.githubusercontent.com/ros2/ros2/${{ matrix.distro }}/ros2.repos'
steps:
- uses: actions/checkout@v3
- uses: ros-tooling/setup-ros@master
with:
required-ros-distributions: ${{ matrix.build-type == 'binary' && matrix.distro || '' }}
use-ros2-testing: true
- uses: ros-tooling/action-ros-ci@master
with:
package-name: >
lttngpy
ros2trace
test_ros2trace
test_tracetools
test_tracetools_launch
tracetools
tracetools_launch
tracetools_read
tracetools_test
tracetools_trace
target-ros2-distro: ${{ matrix.distro }}
vcs-repo-file-url: ${{ matrix.build-type == 'source' && env.ROS2_REPOS_FILE_URL || '' }}
extra-cmake-args: >
${{ endsWith(matrix.instrumentation, '-disabled') && '-DTRACETOOLS_DISABLED=ON' || '' }}
${{ endsWith(matrix.tracepoints, '-excluded') && '-DTRACETOOLS_TRACEPOINTS_EXCLUDED=ON' || '' }}
colcon-defaults: |
{
"build": {
"mixin": [
"coverage-gcc",
"coverage-pytest"
]
},
"test": {
"mixin": [
"coverage-pytest"
],
"executor": "sequential",
"retest-until-pass": 2,
"ctest-args": ["-LE", "xfail"],
"pytest-args": ["-m", "not xfail"]
}
}
- name: Make sure tracing instrumentation is available
run: |
source ros_ws/install/setup.bash
./ros_ws/build/tracetools/status
if: endsWith(matrix.instrumentation, '-enabled') && endsWith(matrix.tracepoints, '-included')
- name: Make sure tracing instrumentation is disabled
run: |
source ros_ws/install/setup.bash
(! ./ros_ws/build/tracetools/status)
if: endsWith(matrix.instrumentation, '-disabled') || endsWith(matrix.tracepoints, '-excluded')
- uses: codecov/codecov-action@v3
with:
files: ros_ws/lcov/total_coverage.info,ros_ws/coveragepy/.coverage