-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multiple versions of Fast DDS in CI
Signed-off-by: Raul Sanchez-Mateos <[email protected]>
- Loading branch information
1 parent
947abed
commit 255c0c9
Showing
7 changed files
with
572 additions
and
317 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
name: docker-reusable-workflow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
|
||
fastcdr_branch: | ||
description: 'Branch or tag of Fast CDR repository (https://github.com/eProsima/Fast-CDR)' | ||
required: true | ||
default: 'master' | ||
type: string | ||
|
||
fastdds_branch: | ||
description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' | ||
required: true | ||
default: 'master' | ||
type: string | ||
|
||
ddspipe_branch: | ||
description: 'Branch or tag of DDS Pipe repository (https://github.com/eProsima/DDS-Pipe)' | ||
required: true | ||
default: 'main' | ||
type: string | ||
|
||
ddsrouter_branch: | ||
description: 'Branch or tag of DDS Router repository (https://github.com/eProsima/DDS-Router)' | ||
required: true | ||
default: 'main' | ||
type: string | ||
|
||
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 | ||
|
||
env: | ||
code_packages_names: 'ddsrouter_test' | ||
docs_packages_names: '' | ||
|
||
jobs: | ||
docker-test: | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
env: | ||
DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE: "ddsrouter:ci" | ||
DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE: "vulcanexus:ci" | ||
|
||
steps: | ||
|
||
- name: Sync repository | ||
uses: eProsima/eProsima-CI/external/checkout@v0 | ||
with: | ||
path: ${{ github.workspace }}/src | ||
|
||
# Build Vulcanexus Docker image | ||
- name: Build custom Vulcanexus Docker image | ||
run: | | ||
cd ./src/.github/docker/vulcanexus | ||
docker build \ | ||
--no-cache \ | ||
--build-arg docker_image_base=eprosima/vulcanexus:humble-core \ | ||
-t ${{ env.DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE }} \ | ||
-f Dockerfile . | ||
# Build DDS Router Docker image | ||
- name: Build DDS Router Docker image | ||
run: | | ||
cd ./src/.github/docker/ddsrouter | ||
docker build \ | ||
--no-cache \ | ||
--build-arg fastcdr_branch=${{ inputs.fastcdr_branch }} \ | ||
--build-arg fastdds_branch=${{ inputs.fastdds_branch }} \ | ||
--build-arg ddspipe_branch=${{ inputs.ddspipe_branch }} \ | ||
--build-arg ddsrouter_branch=${{ inputs.ddsrouter_branch }} \ | ||
-t ${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }} \ | ||
-f Dockerfile . | ||
# Check Docker images exist | ||
- name: Check if Docker images exist | ||
run: | | ||
[ -n "$(docker images -q ${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }})" ] || echo "DDS Router Docker image does not exists" | ||
[ -n "$(docker images -q ${{ env.DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE }})" ] || echo "Vulcanexus image does not exists" | ||
- name: Download dependencies and install requirements | ||
uses: ./src/.github/actions/project_dependencies | ||
with: | ||
os: ubuntu-22.04 | ||
cmake_build_type: "Release" | ||
custom_version_build: ${{ inputs.custom_version_build }} | ||
dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} | ||
secret_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Compile docker tests | ||
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 | ||
with: | ||
workspace: ${{ github.workspace }} | ||
colcon_build_args: --packages-up-to ddsrouter_test | ||
cmake_args: -DBUILD_COMPOSE_TESTS=ON -DCMAKE_BUILD_TYPE=Release | ||
workspace_dependencies: ${{ github.workspace }}/install | ||
colcon_meta_file: ${{ github.workspace }}/src/.github/workflows/configurations/${{ runner.os }}/colcon.meta | ||
|
||
# Run ddsrouter_test compose tests | ||
- name: Run flaky tests | ||
continue-on-error: true | ||
run: | | ||
export DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE=${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }} | ||
export DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE=${{ env.DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE }} | ||
source ${{ github.workspace }}/install/setup.bash | ||
colcon test \ | ||
--packages-select ddsrouter_test \ | ||
--event-handlers console_direct+ \ | ||
--return-code-on-test-failure \ | ||
--ctest-args \ | ||
--label-regex xfail \ | ||
--timeout 120 | ||
- name: Run tests | ||
run: | | ||
export DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE=${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }} | ||
export DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE=${{ env.DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE }} | ||
source ${{ github.workspace }}/install/setup.bash | ||
colcon test \ | ||
--packages-select ddsrouter_test \ | ||
--event-handlers console_direct+ \ | ||
--return-code-on-test-failure \ | ||
--ctest-args \ | ||
--label-exclude xfail \ | ||
--timeout 120 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Nightly test workflow for DDS Router | ||
name: nightly | ||
|
||
on: | ||
schedule: | ||
- cron: '0 5 * * *' | ||
|
||
jobs: | ||
|
||
reusable_tests_v2: | ||
name: reusable_tests_v2 | ||
uses: ./.github/workflows/reusable-workflow.yml | ||
with: | ||
custom_version_build: 'v2' | ||
dependencies_artifact_postfix: '_nightly' | ||
secrets: inherit | ||
|
||
# Uncomment this block to run the tests for Fast DDS v3 when DDS Router is updated | ||
# Also specify here (and above) the workflow version/branch to use (@v0, @main, etc.) | ||
# reusable_tests_v3: | ||
# name: reusable_tests_v3 | ||
# uses: ./.github/workflows/reusable-workflow.yml | ||
# with: | ||
# custom_version_build: 'v3' | ||
# dependencies_artifact_postfix: '_nightly' | ||
# secrets: inherit | ||
|
||
reusable_docker_tests_v2: | ||
name: reusable_docker_tests_v2 | ||
uses: ./.github/workflows/docker-reusable-workflow.yml | ||
with: | ||
fastcdr_branch: 'master' | ||
fastdds_branch: '2.x' | ||
ddspipe_branch: 'main' | ||
ddsrouter_branch: 'main' | ||
custom_version_build: 'v2' | ||
dependencies_artifact_postfix: '_nightly' | ||
secrets: inherit | ||
|
||
# Uncomment this block to run the tests for Fast DDS v3 when DDS Router is updated | ||
# Also specify here (and above) the workflow version/branch to use (@v0, @main, etc.) | ||
# reusable_docker_tests_v3: | ||
# name: reusable_docker_tests_v3 | ||
# uses: ./.github/workflows/docker-reusable-workflow.yml | ||
# with: | ||
# fastcdr_branch: 'master' | ||
# fastdds_branch: '3.x' | ||
# ddspipe_branch: 'main' | ||
# ddsrouter_branch: 'main' | ||
# custom_version_build: 'v3' | ||
# dependencies_artifact_postfix: '_nightly' | ||
# secrets: inherit | ||
|
Oops, something went wrong.