Continuous Integration #527
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
workflow_dispatch: | |
inputs: | |
foonathan_memory_vendor_branch: | |
description: 'foonathan_memory_vendor branch to be used' | |
required: false | |
default: 'master' | |
fastcdr_branch: | |
description: 'Fast-CDR branch to be used' | |
required: false | |
default: '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: | |
jobs: | |
ubuntu-build-test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
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: ${{ github.event.inputs.fastcdr_branch || 'master' }} | |
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 -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 | |
run: | | |
source install/local_setup.bash | |
cd src/fastddsgen | |
./gradlew test |