-
Notifications
You must be signed in to change notification settings - Fork 14
192 lines (160 loc) · 6.59 KB
/
build_and_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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
name: test
on:
workflow_dispatch:
inputs:
foonathan_memory_vendor_branch:
description: 'foonathan_memory_vendor branch to be used'
required: false
default: 'master'
fastcdr_versions:
description: 'Fast-CDR branches to be used'
required: false
default: '["1.1.x", "master"]'
fastdds_branch:
description: 'Fast-DDS branch to be used'
required: false
default: '2.12.x'
pull_request:
push:
branches:
- main
schedule:
- cron: '0 0 * * *'
jobs:
windows-build-test:
runs-on: windows-2019
strategy:
matrix:
fastcdr_version: ${{ fromJson(github.event.inputs.fastcdr_versions || '["1.1.x", "master"]') }}
env:
CXXFLAGS: /MP
OPENSSL64_ROOT: "C:/Program Files/OpenSSL-Win64"
steps:
- uses: eProsima/eProsima-CI/windows/install_openssl@v0
- name: Install Asio and TinyXML2
shell: pwsh
run: |
mkdir "$pwdpath/choco_packages"
Invoke-WebRequest -Uri https://github.com/ros2/choco-packages/releases/download/2020-02-24/asio.1.12.1.nupkg -OutFile "$pwdpath/choco_packages/asio.1.12.1.nupkg"
Invoke-WebRequest -Uri https://github.com/ros2/choco-packages/releases/download/2020-02-24/tinyxml2.6.0.0.nupkg -OutFile "$pwdpath/choco_packages/tinyxml2.6.0.0.nupkg"
choco install -y -s "$pwdpath/choco_packages" asio tinyxml2
Set-Item -Force -Path "env:PATH" -Value "C:\ProgramData\chocolatey\lib\asio;C:\ProgramData\chocolatey\lib\tinyxml2;C:\ProgramData\chocolatey\lib\tinyxml2\lib;$env:PATH"
echo "PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install swig
shell: pwsh
run: choco install swig --allow-downgrade --version=4.0.2.04082020
- uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'
- uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
with:
packages: pytest pywin32
- uses: eProsima/eProsima-CI/multiplatform/install_colcon@v0
- uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src/fastdds_python
- uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/foonathan_memory_vendor
path: src/foonathan_memory_vendor
ref: ${{ github.event.inputs.foonathan_memory_vendor_branch }}
- uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-CDR
path: src/fastcdr
ref: ${{ github.event.inputs.foonathan_memory_vendor_branch }}
- uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-DDS
path: src/fastdds
ref: ${{ github.event.inputs.fastdds_branch }}
- uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: 3.22.6
- name: Setting ninja
id: ninja
if: github.event.schedule == ''
shell: pwsh
run: |
echo "cmake_generator=ninja" >> $Env:GITHUB_OUTPUT
- name: Setup ccache
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
with:
windows_compile_environment: msvc
- name: Build workspace
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ./src/fastdds_python/.github/workflows/test.meta
colcon_build_args: --executor parallel desktop_notification- --mixin ccache ${{ steps.ninja.outputs.cmake_generator }}
colcon_build_args_default: --event-handlers=console_direct+
cmake_build_type: RelWithDebInfo
workspace: ${{ github.workspace }}
- name: Run tests
id: test
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
colcon_test_args: ${{ inputs.colcon-args }}
colcon_test_args_default: --packages-select fastdds_python --event-handlers console_direct+ desktop_notification- --return-code-on-test-failure
ctest_args_default: --timeout 60
workspace: ${{ github.workspace }}
- name: Upload Logs
uses: actions/upload-artifact@v1
with:
name: colcon-logs-windows
path: log/
if: always()
ubuntu-build-test:
runs-on: ubuntu-22.04
strategy:
matrix:
fastcdr_version: ${{ fromJson(github.event.inputs.fastcdr_versions || '["1.1.x", "master"]') }}
steps:
- uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src/fastdds_python
- uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: libasio-dev libtinyxml2-dev libpython3-dev swig
- uses: eProsima/eProsima-CI/multiplatform/install_colcon@v0
- uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/foonathan_memory_vendor
path: src/foonathan_memory_vendor
ref: ${{ github.event.inputs.foonathan_memory_vendor_branch }}
- uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-CDR
path: src/fastcdr
ref: ${{ github.event.inputs.foonathan_memory_vendor_branch }}
- uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-DDS
path: src/fastdds
ref: ${{ github.event.inputs.fastdds_branch }}
- uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: 3.22.6
- name: Setup ccache
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
- name: Build workspace
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ./src/fastdds_python/.github/workflows/test.meta
colcon_build_args: --executor parallel desktop_notification- --mixin ccache
colcon_build_args_default: --event-handlers=console_direct+
cmake_build_type: RelWithDebInfo
workspace: ${{ github.workspace }}
- name: Run tests
id: test
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
colcon_test_args: ${{ inputs.colcon-args }}
colcon_test_args_default: --packages-select fastdds_python --event-handlers console_direct+ desktop_notification- --return-code-on-test-failure
ctest_args_default: --timeout 60
workspace: ${{ github.workspace }}
- name: Upload Logs
uses: actions/upload-artifact@v1
with:
name: colcon-logs-ubuntu
path: log/
if: always()