Skip to content

Commit

Permalink
Enable CI for DDS Router v3 (#469)
Browse files Browse the repository at this point in the history
* Enable CI for DDS Router v3

Signed-off-by: Raul Sanchez-Mateos <raul@eprosima.com>

* Divide Dockerfile build steps to verify failing layer

Signed-off-by: Raul Sanchez-Mateos <raul@eprosima.com>

* Change back the calculation of ddsrouter branch

Signed-off-by: Raul Sanchez-Mateos <raul@eprosima.com>

* Update devutils branch input name

Signed-off-by: Raul Sanchez-Mateos <raul@eprosima.com>

---------

Signed-off-by: Raul Sanchez-Mateos <raul@eprosima.com>
  • Loading branch information
rsanchez15 authored Sep 13, 2024
1 parent 2845e79 commit 2d8ae69
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/docker/ddsrouter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ WORKDIR /ddsrouter


ARG fastcdr_branch=2.x
ARG fastdds_branch=2.x
ARG devutils_branch=0.x
ARG fastdds_branch=3.x
ARG devutils_branch=main
ARG ddspipe_branch=main
ARG ddsrouter_branch=main

Expand Down
8 changes: 4 additions & 4 deletions .github/docker/vulcanexus/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ RUN echo "Docker Base image used: ${docker_image_base}"
RUN source "/opt/vulcanexus/$VULCANEXUS_DISTRO/setup.bash" && \
apt-get update && \
apt-get install -y \
ros-humble-example-interfaces \
ros-humble-example-interfaces \
ros-humble-demo-nodes-cpp \
ros-humble-demo-nodes-py
ros-$VULCANEXUS_DISTRO-example-interfaces \
ros-$VULCANEXUS_DISTRO-example-interfaces \
ros-$VULCANEXUS_DISTRO-demo-nodes-cpp \
ros-$VULCANEXUS_DISTRO-demo-nodes-py

# Copy and use run.bash as entrypoint
COPY run.bash /root/run.bash
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/docker-reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
default: 'master'
type: string

dev_utils_branch:
devutils_branch:
description: 'Branch or tag of eProsima/dev-utils repository (https://github.com/eProsima/dev-utils)'
required: true
default: 'main'
Expand Down Expand Up @@ -46,6 +46,13 @@ on:
default: '_nightly'
type: string

ref:
description: >
The branch or tag name to checkout.
required: true
type: string
default: 'main'

env:
code_packages_names: 'ddsrouter_test'
docs_packages_names: ''
Expand All @@ -65,6 +72,7 @@ jobs:
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src
ref: ${{ inputs.ref }}

# Build Vulcanexus Docker image
- name: Build custom Vulcanexus Docker image
Expand All @@ -84,7 +92,7 @@ jobs:
--no-cache \
--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 devutils_branch=${{ inputs.devutils_branch }} \
--build-arg ddspipe_branch=${{ inputs.ddspipe_branch }} \
--build-arg ddsrouter_branch=${{ inputs.ddsrouter_branch }} \
-t ${{ env.DDSROUTER_COMPOSE_TEST_DOCKER_IMAGE }} \
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: mirror-branch

on:
push:
branches:
- 'main'

jobs:
mirror_job_main:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
name: Mirror main branch to API & ABI compatible minor version branches
strategy:
fail-fast: false
matrix:
dest_branch:
- '3.x'
steps:
- name: Mirror action step
id: mirror
uses: eProsima/eProsima-CI/external/mirror-branch-action@v0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
source: 'main'
dest: ${{ matrix.dest_branch }}
50 changes: 25 additions & 25 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,42 @@ jobs:
with:
custom_version_build: 'v2'
dependencies_artifact_postfix: '_nightly'
ref: '2.x'
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_tests_v3:
name: reusable_tests_v3
uses: ./.github/workflows/reusable-workflow.yml
with:
custom_version_build: 'v3'
dependencies_artifact_postfix: '_nightly'
ref: 'main'
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'
dev_utils_branch: '0.x'
ddspipe_branch: 'main'
ddsrouter_branch: 'main'
devutils_branch: '0.x'
ddspipe_branch: '0.x'
ddsrouter_branch: '2.x'
custom_version_build: 'v2'
dependencies_artifact_postfix: '_nightly'
ref: '2.x'
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
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'
devutils_branch: '1.x'
ddspipe_branch: '1.x'
custom_version_build: 'v3'
dependencies_artifact_postfix: '_nightly'
ref: 'main'
secrets: inherit

13 changes: 13 additions & 0 deletions .github/workflows/reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ on:
default: '_nightly'
type: string

ref:
description: >
The branch or tag name to checkout.
required: true
type: string
default: 'main'

env:
code_packages_names: 'ddsrouter_core ddsrouter_yaml ddsrouter_tool'
docs_packages_names: 'ddsrouter_docs'
Expand Down Expand Up @@ -88,6 +95,7 @@ jobs:
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand Down Expand Up @@ -129,6 +137,7 @@ jobs:
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand Down Expand Up @@ -166,6 +175,7 @@ jobs:
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand Down Expand Up @@ -203,6 +213,7 @@ jobs:
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand Down Expand Up @@ -233,6 +244,7 @@ jobs:
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand Down Expand Up @@ -263,6 +275,7 @@ jobs:
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
default: 'master'
type: string

dev_utils_branch:
devutils_branch:
description: 'Branch or tag of eProsima/dev-utils repository (https://github.com/eProsima/dev-utils)'
required: true
default: 'main'
Expand Down Expand Up @@ -63,19 +63,21 @@ jobs:
name: reusable_tests
uses: ./.github/workflows/reusable-workflow.yml
with:
custom_version_build: ${{ inputs.custom_version_build || 'v2' }}
custom_version_build: ${{ inputs.custom_version_build || 'v3' }}
dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix || '_nightly' }}
ref: ${{ github.ref }}
secrets: inherit

reusable_docker_tests:
name: reusable_docker_tests
uses: ./.github/workflows/docker-reusable-workflow.yml
with:
fastcdr_branch: ${{ inputs.fastcdr_branch || '2.x' }}
fastdds_branch: ${{ inputs.fastdds_branch || '2.x' }}
dev_utils_branch: ${{ inputs.dev_utils_branch || 'main' }}
ddspipe_branch: ${{ inputs.ddspipe_branch || 'main' }}
fastdds_branch: ${{ inputs.fastdds_branch || '3.x' }}
devutils_branch: ${{ inputs.devutils_branch || '1.x' }}
ddspipe_branch: ${{ inputs.ddspipe_branch || '1.x' }}
ddsrouter_branch: ${{ inputs.ddsrouter_branch || github.head_ref || github.ref_name }}
custom_version_build: ${{ inputs.custom_version_build || 'v2' }}
custom_version_build: ${{ inputs.custom_version_build || 'v3' }}
dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix || '_nightly' }}
ref: ${{ github.ref }}
secrets: inherit

0 comments on commit 2d8ae69

Please sign in to comment.