Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple versions of Fast DDS in CI #449

Merged
merged 6 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/actions/project_dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ inputs:
description: Specify cmake_build_type option to download specific artifact
required: true

custom_version_build:
description: >
Use the custom version build from eProsima-CI.
If set to false, the workflow will run the tests for Fast DDS v2 and v3.
required: true
default: 'custom'

dependencies_artifact_postfix:
description: Specify artifact postfix in case it wants to use a manual one
required: false
Expand Down Expand Up @@ -47,7 +54,7 @@ runs:
- name: Download dependencies artifact
uses: eProsima/eProsima-CI/multiplatform/download_dependency@v0
with:
artifact_name: built_ddspipe_${{ inputs.os }}_${{ inputs.cmake_build_type }}${{ inputs.dependencies_artifact_postfix }}
artifact_name: built_ddspipe_${{ inputs.custom_version_build }}_${{ inputs.os }}_${{ inputs.cmake_build_type }}${{ inputs.dependencies_artifact_postfix }}
workflow_source: build_ddspipe.yml
workflow_source_repository: eProsima/eProsima-CI
target_workspace: ${{ inputs.target_workspace }}
Expand Down
4 changes: 2 additions & 2 deletions .github/docker/ddsrouter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ RUN pip3 install \
WORKDIR /ddsrouter


ARG fastcdr_branch=master
ARG fastdds_branch=master
ARG fastcdr_branch=2.x
ARG fastdds_branch=2.x
ARG devutils_branch=main
ARG ddspipe_branch=main
ARG ddsrouter_branch=main
Expand Down
2 changes: 1 addition & 1 deletion .github/docker/vulcanexus/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG docker_image_base
FROM $docker_image_base

LABEL author=javierparis@eprosima.com
LABEL author=raul@eprosima.com

# Avoid interactuation with installation of some package that needs the locale.
ENV TZ=Europe/Madrid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,61 @@
name: ddsrouter-docker-tests
name: docker-reusable-workflow

on:
workflow_dispatch:
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'
devutils_branch:
description: 'Branch or tag of dev-utils repository (https://github.com/eProsima/dev-utils)'
type: string

dev_utils_branch:
description: 'Branch or tag of eProsima/dev-utils repository (https://github.com/eProsima/dev-utils)'
required: true
default: 'main'
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'
pull_request:
push:
branches:
- main
schedule:
- cron: '0 0 * * *'
type: string

env:
code_packages_names: 'ddsrouter_test'
docs_packages_names: ''
default_dependencies_artifact_postfix: '_nightly'

jobs:
docker-test:

runs-on: ubuntu-22.04

env:
DEFAULT_FASTCDR_BRANCH: 'master'
DEFAULT_FASTDDS_BRANCH: 'master'
DEFAULT_DEVUTILS_BRANCH: 'main'
DEFAULT_DDSPIPE_BRANCH: 'main'
DEFAULT_DDSROUTER_BRANCH: 'main'
DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE: "ddsrouter:ci"
DDSROUTER_COMPOSE_TEST_ROS2_DOCKER_IMAGE: "vulcanexus:ci"

Expand All @@ -60,24 +66,6 @@ jobs:
with:
path: ${{ github.workspace }}/src

# Echo Env Var to debug workflow
- name: Echo env variables
run: |
echo "--- Input Variables ---"
echo "github.event.inputs.fastcdr_branch: ${{ github.event.inputs.fastcdr_branch }}"
echo "github.event.inputs.fastdds_branch: ${{ github.event.inputs.fastdds_branch }}"
echo "github.event.inputs.devutils_branch: ${{ github.event.inputs.devutils_branch }}"
echo "github.event.inputs.ddspipe_branch: ${{ github.event.inputs.ddspipe_branch }}"
echo "github.event.inputs.ddsrouter_branch: ${{ github.event.inputs.ddsrouter_branch }}"
echo "--- Github Environment Variables ---"
echo "github.head_ref: ${{ github.head_ref }}"
echo "--- Environment Variables ---"
echo "DEFAULT_FASTCDR_BRANCH: ${{ env.DEFAULT_FASTCDR_BRANCH }}"
echo "DEFAULT_FASTDDS_BRANCH: ${{ env.DEFAULT_FASTDDS_BRANCH }}"
echo "DEFAULT_DEVUTILS_BRANCH: ${{ env.DEFAULT_DEVUTILS_BRANCH }}"
echo "DEFAULT_DDSPIPE_BRANCH: ${{ env.DEFAULT_DDSPIPE_BRANCH }}"
echo "DEFAULT_DDSROUTER_BRANCH: ${{ env.DEFAULT_DDSROUTER_BRANCH }}"

# Build Vulcanexus Docker image
- name: Build custom Vulcanexus Docker image
run: |
Expand All @@ -94,14 +82,13 @@ jobs:
cd ./src/.github/docker/ddsrouter
docker build \
--no-cache \
--build-arg fastcdr_branch=${{ github.event.inputs.fastcdr_branch || env.DEFAULT_FASTCDR_BRANCH }} \
--build-arg fastdds_branch=${{ github.event.inputs.fastdds_branch || env.DEFAULT_FASTDDS_BRANCH }} \
--build-arg devutils_branch=${{ github.event.inputs.devutils_branch || env.DEFAULT_DEVUTILS_BRANCH }} \
--build-arg ddspipe_branch=${{ github.event.inputs.ddspipe_branch || env.DEFAULT_DDSPIPE_BRANCH }} \
--build-arg ddsrouter_branch=${{ github.event.inputs.ddsrouter_branch || github.head_ref || env.DEFAULT_DDSROUTER_BRANCH }} \
--build-arg fastcdr_branch=${{ inputs.fastcdr_branch }} \
--build-arg fastdds_branch=${{ inputs.fastdds_branch }} \
--build-arg dev_utils_branch=${{ inputs.dev_utils_branch }} \
--build-arg ddspipe_branch=${{ inputs.ddspipe_branch }} \
--build-arg ddsrouter_branch=${{ inputs.ddsrouter_branch }} \
-t ${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }} \
-f Dockerfile .
echo "DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE: ${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }}"

# Check Docker images exist
- name: Check if Docker images exist
Expand All @@ -114,7 +101,8 @@ jobs:
with:
os: ubuntu-22.04
cmake_build_type: "Release"
dependencies_artifact_postfix: ${{ github.event.inputs.dependencies_artifact_postfix || env.default_dependencies_artifact_postfix }}
custom_version_build: ${{ inputs.custom_version_build }}
dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }}
secret_token: ${{ secrets.GITHUB_TOKEN }}

- name: Compile docker tests
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/nightly.yml
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: '2.x'
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: '2.x'
# fastdds_branch: '3.x'
# ddspipe_branch: 'main'
# ddsrouter_branch: 'main'
# custom_version_build: 'v3'
# dependencies_artifact_postfix: '_nightly'
# secrets: inherit

Loading
Loading