-
Notifications
You must be signed in to change notification settings - Fork 7
138 lines (124 loc) · 5.62 KB
/
Copy pathdownstream-ci.yml
File metadata and controls
138 lines (124 loc) · 5.62 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: downstream-ci
on:
workflow_dispatch:
inputs:
custom_version_build:
description: 'Fast DDS build version from eProsima-CI.'
required: true
type: choice
default: 'v3'
options:
- custom
- v2
- v3
dependencies_artifact_postfix:
description: 'Postfix to download a specific dependencies artifact from eProsima-CI.'
required: true
default: '_nightly'
downstream_ref:
description: 'Branch or tag to checkout on every downstream tool.'
required: true
default: 'main'
pull_request:
push:
branches:
- main
concurrency:
group: downstream-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
downstream-tests:
name: ${{ matrix.tool.name }}-${{ matrix.os }}-${{ matrix.cmake_build_type }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
- windows-2022
cmake_build_type:
- Release
- Debug
tool:
- name: ddsrouter
repository: eProsima/DDS-Router
packages: 'ddsrouter_core ddsrouter_yaml ddsrouter_tool'
- name: ddsrecordreplay
repository: eProsima/DDS-Record-Replay
packages: 'ddsrecorder_participants ddsrecorder_yaml ddsrecorder_tool ddsreplayer_tool'
- name: fastddsspy
repository: eProsima/Fast-DDS-Spy
packages: 'fastddsspy_participants fastddsspy_yaml fastddsspy_tool'
- name: ddsenabler
repository: eProsima/DDS-Enabler
packages: 'ddsenabler ddsenabler_yaml ddsenabler_participants'
steps:
# Checkout DDS Pipe at the ref that triggered this workflow (the PR / branch under test)
- name: Checkout DDS Pipe (under test)
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src/ddspipe
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref_name }}
# Checkout the downstream tool that consumes DDS Pipe
- name: Checkout downstream tool
uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: ${{ matrix.tool.repository }}
path: src/${{ matrix.tool.name }}
ref: ${{ inputs.downstream_ref || 'main' }}
- name: Install Fast DDS dependencies
uses: eProsima/eProsima-CI/multiplatform/install_fastdds_dependencies@v0
with:
cmake_build_type: ${{ matrix.cmake_build_type }}
- name: Install yaml cpp dependency
uses: eProsima/eProsima-CI/multiplatform/install_yamlcpp@v0
with:
cmake_build_type: ${{ matrix.cmake_build_type }}
# DDS Record Replay needs lz4 and zstd for MCAP compression (installed via
# apt on Linux and vcpkg on Windows). No other downstream tool requires them.
- name: Install MCAP dependencies (lz4, zstd)
if: matrix.tool.name == 'ddsrecordreplay'
uses: ./src/ddsrecordreplay/.github/actions/install_mcap_dependencies
with:
cmake_build_type: ${{ matrix.cmake_build_type }}
# On Windows the mcap action installs lz4/zstd through vcpkg; expose that
# prefix so CMake's find_package(lz4)/find_package(zstd) can locate them.
- name: Expose vcpkg packages to CMake (Windows)
if: matrix.tool.name == 'ddsrecordreplay' && runner.os == 'Windows'
shell: pwsh
run: |
"CMAKE_PREFIX_PATH=$env:vcpkg_install_path;$env:CMAKE_PREFIX_PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# Prebuilt Fast DDS + dev-utils. DDS Pipe itself is built from source (checked out above),
# so this run reflects the DDS Pipe changes, not the nightly artifact
- name: Download Fast DDS + dev-utils artifact
uses: eProsima/eProsima-CI/multiplatform/download_dependency@v0
with:
artifact_name: build_dev_utils_${{ inputs.custom_version_build || 'v3' }}_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.dependencies_artifact_postfix || '_nightly' }}
workflow_source: build_dev_utils.yml
workflow_source_repository: eProsima/eProsima-CI
target_workspace: ${{ github.workspace }}/install
secret_token: ${{ secrets.GITHUB_TOKEN }}
workflow_conclusion: completed
# Build DDS Pipe (from source) as a dependency of the downstream tool, but only
# execute the downstream tool test suites in this workflow
- name: Compile and run downstream tests
id: compile_and_test
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
with:
packages_names: ${{ matrix.tool.packages }}
workspace_dependencies: install
cmake_args: -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
ctest_args: --label-exclude "xfail"
colcon_meta_file: src/ddspipe/.github/workflows/configurations/${{ runner.os }}/colcon.meta
test_report_artifact: test_report_downstream_${{ matrix.tool.name }}_${{ matrix.os }}_${{ matrix.cmake_build_type }}
- name: Test Report
uses: eProsima/eProsima-CI/external/test-reporter@v0
if: success() || failure()
with:
name: "Downstream: ${{ matrix.tool.name }} | ${{ matrix.os }} | ${{ matrix.cmake_build_type }}"
path: "${{ steps.compile_and_test.outputs.ctest_results_path }}*.xml"
working-directory: 'src/ddspipe'
path-replace-backslashes: ${{ runner.os == 'Windows' && 'true' || 'false' }}
list-tests: 'failed'
list-suites: 'failed'