-
Notifications
You must be signed in to change notification settings - Fork 16
86 lines (71 loc) · 2.64 KB
/
reusable-workflow.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
# Reusable workflow to run the following jobs:
#
# - multiplatform-tests
# - [ Debug | Release ]
# - execute tests in different versions of ubuntu with different build types
#
name: reusable-workflow
on:
workflow_call:
inputs:
custom_version_build:
description: >
Version of Fast DDS build from eProsima-CI.
required: true
type: string
dependencies_artifact_postfix:
description: >
Postfix name to add to artifact name to download dependencies.
This is use to download a specific artifact version from eProsima-CI.
required: true
default: '_nightly'
type: string
ref:
description: >
The branch or tag name to checkout.
required: true
type: string
default: 'main'
os:
description: 'Specify runs-on machine to download specific artifact'
required: true
type: string
env:
# TODO: controller is not tested as it has no tests
code_packages_names: 'ddsrecorder_participants ddsrecorder_yaml ddsrecorder_tool ddsreplayer_tool'
docs_packages_names: 'ddsrecorder_docs'
jobs:
#####################################################################
# TEST
multiplatform-tests:
name: ${{ inputs.os }}-ci-${{ matrix.cmake_build_type }}
runs-on: ${{ inputs.os }}
strategy:
fail-fast: false
matrix:
cmake_build_type:
- Release
- Debug
steps:
- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src
ref: ${{ inputs.ref }}
- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
with:
os: ${{ inputs.os }}
cmake_build_type: ${{ matrix.cmake_build_type }}
custom_version_build: ${{ inputs.custom_version_build }}
dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }}
secret_token: ${{ secrets.GITHUB_TOKEN }}
- name: Compile and run tests
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
with:
packages_names: ${{ env.code_packages_names }}
cmake_args: -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
workspace_dependencies: './install'
ctest_args: --label-exclude "xfail"
colcon_meta_file: ./src/.github/workflows/configurations/${{ runner.os }}/colcon.meta
test_report_artifact: test_report${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}_${{ inputs.os }}_${{ matrix.cmake_build_type }}