-
Notifications
You must be signed in to change notification settings - Fork 60
108 lines (92 loc) · 3.71 KB
/
ci.yaml
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
name: Continuous Integration
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: 'master'
fastdds_python_branch:
description: 'Fast-DDS-Python branch to be used'
required: false
default: 'main'
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
- '4.0.x-devel'
jobs:
ubuntu-build-test:
runs-on: ubuntu-22.04
strategy:
matrix:
fastcdr_version: ${{ fromJson(github.event.inputs.fastcdr_versions || '["1.1.x", "master"]') }}
java_version: ['openjdk-11-jdk', 'openjdk-19-jdk']
steps:
- uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src/fastddsgen
- name: Install apt packages
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: libasio-dev libtinyxml2-dev ${{ matrix.java_version }}
- name: Configure Java to ${{ matrix.java_version }}
shell: bash
run: |
jv=$(echo ${{ matrix.java_version }} | sed -r 's/.*-([0-9]*)-.*/\1/g'); jvs=$(update-alternatives --list java | grep "$jv" | head -1); sudo update-alternatives --set java "$jvs"
jv=$(echo ${{ matrix.java_version }} | sed -r 's/.*-([0-9]*)-.*/\1/g'); jvs=$(update-alternatives --list javac | grep "$jv" | head -1); sudo update-alternatives --set javac "$jvs"
- name: Install python packages
uses: eProsima/eProsima-CI/multiplatform/install_colcon@v0
- uses: ./src/fastddsgen/.github/actions/fetch-fastddsgen-repos
with:
foonathan-memory-vendor-branch: ${{ github.event.inputs.foonathan_memory_vendor_branch || 'master' }}
fastcdr-branch: ${{ matrix.fastcdr_version }}
fastdds-branch: ${{ github.event.inputs.fastdds_branch || 'master' }}
fastdds-python-branch: ${{ github.event.inputs.fastdds_python_branch || 'main' }}
- name: Get minimum supported version of CMake
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 fastddsgen
run: |
cd src/fastddsgen
./gradlew assemble
echo "$(pwd)/scripts" >> ${{ github.path }}
- name: Regenerate IDL files for Fast-DDS and Fast-DDS-python
run: |
cd src/Fast-DDS
./utils/scripts/update_generated_code_from_idl.sh
cd -
cd src/Fast-DDS-python/fastdds_python/test/types
./generate.sh
cd -
cd src/Fast-DDS-python/fastdds_python_examples/HelloWorldExample
fastddsgen -cdr both -python -replace HelloWorld.idl
- name: Build workspace
run: |
cmake --version
colcon build --event-handlers=console_direct+ --mixin rel-with-deb-info ccache --metas src/fastddsgen/.github/fastddsgen.meta
- name: Test fastddsgen with fastcdr v1
if: startsWith(matrix.fastcdr_version, '1')
run: |
source install/local_setup.bash
cd src/fastddsgen
./gradlew test -Dcdr_version=v1 -Dblacklist_tests=external,optional
- name: Test fastddsgen with fastcdr v2
if: ${{ ! startsWith(matrix.fastcdr_version, '1') }}
run: |
source install/local_setup.bash
cd src/fastddsgen
./gradlew test