Skip to content

Commit f655a6d

Browse files
committed
TO REMOVE
Signed-off-by: Miguel Company <[email protected]>
1 parent dd2e468 commit f655a6d

File tree

1 file changed

+10
-172
lines changed

1 file changed

+10
-172
lines changed

.github/workflows/reusable-ubuntu-ci.yml

Lines changed: 10 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,14 @@ on:
5959
required: false
6060
type: boolean
6161
default: false
62+
blacklist_idls:
63+
description: 'Comma-separated list of tests to be blacklisted'
64+
required: false
65+
type: string
66+
default: 'interfaces,interfaces_2'
6267
env:
63-
blacklist_tests: 'interfaces,interfaces_2'
68+
blacklist_tests: ${{ inputs.run-tests && inputs.blacklist_idls }}
69+
gradle-test-flags: ${{ inputs.blacklist_idls && '-Dblacklist_tests=${{ inputs.blacklist_idls }}' }}
6470
defaults:
6571
run:
6672
shell: bash
@@ -75,176 +81,8 @@ jobs:
7581
cmake-build-type:
7682
- 'RelWithDebInfo'
7783
steps:
78-
- name: Add ci-pending label if PR
79-
if: ${{ github.event_name == 'pull_request' && inputs.add-label == true }}
80-
uses: eProsima/eProsima-CI/external/add_labels@v0
81-
with:
82-
labels: ci-pending
83-
number: ${{ github.event.number }}
84-
repo: eProsima/Fast-DDS-Gen
85-
86-
- name: Sync eProsima/Fast-DDS-Gen repository
87-
uses: eProsima/eProsima-CI/external/checkout@v0
88-
with:
89-
path: ${{ github.workspace }}/src/fastddsgen
90-
ref: ${{ inputs.fastddsgen-branch }}
91-
92-
- name: Install Fix Python version
93-
uses: eProsima/eProsima-CI/external/setup-python@v0
94-
with:
95-
python-version: '3.11'
96-
97-
- name: Get minimum supported version of CMake
98-
uses: eProsima/eProsima-CI/external/get-cmake@v0
99-
with:
100-
cmakeVersion: 3.22.6
101-
102-
- name: Install apt packages
103-
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
104-
with:
105-
packages: libasio-dev libtinyxml2-dev libssl-dev swig ${{ inputs.java-version }}
106-
107-
- name: Configure Java to ${{ inputs.java-version }}
108-
shell: bash
84+
- name: Debug print env variables
10985
run: |
110-
jv=$(echo ${{ inputs.java-version }} | sed -r 's/.*-([0-9]*)-.*/\1/g'); jvs=$(update-alternatives --list java | grep "$jv" | head -1); sudo update-alternatives --set java "$jvs"
111-
jv=$(echo ${{ inputs.java-version }} | sed -r 's/.*-([0-9]*)-.*/\1/g'); jvs=$(update-alternatives --list javac | grep "$jv" | head -1); sudo update-alternatives --set javac "$jvs"
112-
113-
- name: Install colcon
114-
uses: eProsima/eProsima-CI/multiplatform/install_colcon@v0
86+
echo "Blacklisted tests: ${{ env.blacklist_tests }}"
87+
echo "Gradle test flags: ${{ env.gradle-test-flags }}"
11588
116-
- name: Install Python dependencies
117-
uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
118-
with:
119-
packages: vcstool xmlschema xmltodict==0.13.0 jsondiff==2.0.0 pandas==1.5.2
120-
upgrade: false
121-
122-
- name: Setup CCache
123-
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
124-
if: ${{ inputs.use-ccache == true }}
125-
with:
126-
api_token: ${{ secrets.GITHUB_TOKEN }}
127-
128-
- name: Get Fast DDS branch
129-
id: get_fastdds_branch
130-
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
131-
with:
132-
remote_repository: eProsima/Fast-DDS
133-
fallback_branch: ${{ inputs.fastdds-branch }}
134-
skip_base: true
135-
136-
- name: Get Fast CDR branch
137-
id: get_fastcdr_branch
138-
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
139-
with:
140-
remote_repository: eProsima/Fast-CDR
141-
fallback_branch: ${{ inputs.fastcdr-branch }}
142-
skip_base: true
143-
144-
- name: Get Fast DDS Python branch
145-
id: get_fastdds_python_branch
146-
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
147-
with:
148-
remote_repository: eProsima/Fast-DDS-python
149-
fallback_branch: ${{ inputs.fastdds-python-branch }}
150-
skip_base: true
151-
152-
- name: Get Discovery Server branch
153-
id: get_discovery_server_branch
154-
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
155-
with:
156-
remote_repository: eProsima/Discovery-Server
157-
fallback_branch: ${{ inputs.discovery-server-branch }}
158-
skip_base: true
159-
160-
- name: Download Fast CDR, Fast DDS Python, and Discovery Server
161-
run: |
162-
cd src
163-
git clone -b ${{ steps.get_fastcdr_branch.outputs.deduced_branch }} https://github.com/eProsima/Fast-CDR.git fastcdr
164-
git clone -b ${{ steps.get_fastdds_python_branch.outputs.deduced_branch }} https://github.com/eProsima/Fast-DDS-python.git fastdds_python
165-
git clone -b ${{ steps.get_discovery_server_branch.outputs.deduced_branch }} https://github.com/eProsima/Discovery-Server.git discovery_server
166-
cd ..
167-
shell: bash
168-
169-
- name: Download Fast DDS repo
170-
uses: eProsima/eProsima-CI/external/checkout@v0
171-
with:
172-
repository: eProsima/Fast-DDS
173-
path: ${{ github.workspace }}/src/fastdds
174-
ref: ${{ steps.get_fastdds_branch.outputs.deduced_branch }}
175-
176-
- name: Fetch Fast DDS dependencies
177-
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
178-
with:
179-
vcs_repos_file: ${{ github.workspace }}/src/fastdds/fastdds.repos
180-
destination_workspace: src
181-
skip_existing: 'true'
182-
183-
- name: Build fastddsgen
184-
run: |
185-
cd ${{ github.workspace }}/src/fastddsgen
186-
./gradlew assemble
187-
echo "$(pwd)/scripts" >> ${{ github.path }}
188-
189-
- name: Regenerate IDL files for Fast DDS, Fast DDS Python, and Discovery Server
190-
run: |
191-
cd ${{ github.workspace }}/src/fastdds
192-
./utils/scripts/update_generated_code_from_idl.sh
193-
cd -
194-
195-
cd ${{ github.workspace }}/src/fastdds_python
196-
./utils/scripts/update_generated_code_from_idl.sh
197-
cd -
198-
199-
cd ${{ github.workspace }}/src/discovery_server
200-
./utils/scripts/update_generated_code_from_idl.sh
201-
cd -
202-
203-
- name: Fetch Fast DDS Gen CI dependencies
204-
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
205-
if: ${{ inputs.run-tests == true }}
206-
with:
207-
vcs_repos_file: ${{ github.workspace }}/src/fastddsgen/.github/workflows/config/test.repos
208-
destination_workspace: src
209-
skip_existing: 'true'
210-
211-
- name: Colcon build
212-
continue-on-error: false
213-
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
214-
with:
215-
colcon_meta_file: ${{ github.workspace }}/src/fastddsgen/.github/workflows/config/build.meta
216-
colcon_build_args_default: '--event-handlers=console_direct+'
217-
cmake_build_type: ${{ matrix.cmake-build-type }}
218-
workspace: ${{ github.workspace }}
219-
220-
- name: Test fastddsgen
221-
if: ${{ inputs.run-tests == true }}
222-
env:
223-
gradle-test-flags: ${{ env.blacklist_tests && '-Dblacklist_tests=${{ env.blacklist_tests }}' }}
224-
run: |
225-
source ${{ github.workspace }}/install/local_setup.bash
226-
cd ${{ github.workspace }}/src/fastddsgen
227-
./gradlew test ${{ env.gradle-test-flags }}
228-
229-
- name: Test fastddsgen with python arg
230-
if: ${{ inputs.run-tests == true }}
231-
run: |
232-
source ${{ github.workspace }}/install/local_setup.bash
233-
cd ${{ github.workspace }}/src/fastddsgen/thirdparty/dds-types-test/IDL
234-
# Example: blacklist_tests='file1,file1'
235-
IFS=',' read -r -a BL <<< "${{ env.blacklist_tests }}"
236-
237-
# Build exclusion: ! ( -name file1.idl -o -name file2.idl )
238-
EXCL=()
239-
for f in "${BL[@]}"; do
240-
[[ -n "$f" ]] && EXCL+=(-name "${f}.idl" -o)
241-
done
242-
# Drop trailing -o if present
243-
((${#EXCL[@]})) && unset 'EXCL[${#EXCL[@]}-1]'
244-
245-
# Run find: match *.idl files, exclude blacklist, and batch fastddsgen calls
246-
if ((${#EXCL[@]})); then
247-
find . -type f -name '*.idl' ! \( "${EXCL[@]}" \) -exec fastddsgen -python {} +
248-
else
249-
find . -type f -name '*.idl' -exec fastddsgen -python {} +
250-
fi

0 commit comments

Comments
 (0)