Skip to content

Commit

Permalink
Add mirror CI workflow (#118)
Browse files Browse the repository at this point in the history
* Bump CI to test with Fast DDS v3

Signed-off-by: Raul Sanchez-Mateos <[email protected]>

* Update artifact names

Signed-off-by: Raul Sanchez-Mateos <[email protected]>

* Use gcc-12 in tsan job

Signed-off-by: Raul Sanchez-Mateos <[email protected]>

---------

Signed-off-by: Raul Sanchez-Mateos <[email protected]>
  • Loading branch information
rsanchez15 authored Jun 4, 2024
1 parent c3a4a5d commit c8fa514
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 24 deletions.
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:
- '0.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 }}
6 changes: 3 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Nightly test workflow for DDS Pipe
name: nightly_test
name: nightly-ddspipe

on:
schedule:
Expand All @@ -13,14 +13,14 @@ jobs:
with:
custom_version_build: 'v2'
dependencies_artifact_postfix: '_nightly'
ref: '0.x'
secrets: inherit

# Uncomment this block to run the tests for Fast DDS v3 when DDS Pipe 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'
# ref: 'main'
# secrets: inherit
74 changes: 54 additions & 20 deletions .github/workflows/reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,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: 'ddspipe_core ddspipe_yaml ddspipe_participants'

Expand All @@ -84,14 +91,15 @@ jobs:
- windows-2019
- windows-2022
env:
workspace_dependencies: '${{ github.workspace }}/install'
workspace_dependencies: 'install'

steps:

- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: ${{ github.workspace }}/src
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand All @@ -106,7 +114,7 @@ jobs:
- name: Compile with colcon
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/.github/workflows/configurations/${{ runner.os }}/colcon.meta
colcon_meta_file: src/.github/workflows/configurations/${{ runner.os }}/colcon.meta
colcon_build_args: '--packages-up-to ${{ env.code_packages_names }}'
cmake_args: ' -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}'
workspace: '${{ github.workspace }}'
Expand Down Expand Up @@ -154,7 +162,8 @@ jobs:
- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: ${{ github.workspace }}/src
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand All @@ -170,9 +179,10 @@ jobs:
with:
packages_names: ${{ env.code_packages_names }}
cmake_args: -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
workspace_dependencies: ${{ github.workspace }}/install
workspace_dependencies: install
ctest_args: --label-exclude "xfail"
colcon_meta_file: ${{ github.workspace }}/src/.github/workflows/configurations/${{ runner.os }}/colcon.meta
colcon_meta_file: src/.github/workflows/configurations/${{ runner.os }}/colcon.meta
test_report_artifact: test_report${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}_${{ matrix.os }}_${{ matrix.cmake_build_type }}


#####################################################################
Expand All @@ -185,7 +195,8 @@ jobs:
- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: ${{ github.workspace }}/src
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand All @@ -197,10 +208,14 @@ jobs:
secret_token: ${{ secrets.GITHUB_TOKEN }}

- name: Compile and run tests
uses: eProsima/eProsima-CI/multiplatform/asan_build_test@v0
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
with:
packages_names: ${{ env.code_packages_names }}
workspace_dependencies: ${{ github.workspace }}/install
cmake_args: -DBUILD_TESTS=ON -DASAN_BUILD=ON
ctest_args: --label-exclude "xfail|xasan"
workspace_dependencies: install
cmake_build_type: Debug
test_report_artifact: test_report_asan${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}


#####################################################################
Expand All @@ -213,7 +228,8 @@ jobs:
- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: ${{ github.workspace }}/src
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand All @@ -225,10 +241,19 @@ jobs:
secret_token: ${{ secrets.GITHUB_TOKEN }}

- name: Compile and run tests
uses: eProsima/eProsima-CI/multiplatform/tsan_build_test@v0
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
env:
# GCC 11.3 (Ubuntu Jammy default) produces several false positives regarding timed synchronization protocols
# These issues were fixed in GCC 12 so we upgrade to that version.
CC: gcc-12
CXX: g++-12
with:
packages_names: ${{ env.code_packages_names }}
workspace_dependencies: ${{ github.workspace }}/install
cmake_args: -DBUILD_TESTS=ON -DTSAN_BUILD=ON
ctest_args: --label-exclude "xfail|xtsan"
workspace_dependencies: install
cmake_build_type: Debug
test_report_artifact: test_report_tsan${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}


#####################################################################
Expand All @@ -241,7 +266,8 @@ jobs:
- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: ${{ github.workspace }}/src
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand All @@ -256,7 +282,7 @@ jobs:
uses: eProsima/eProsima-CI/multiplatform/clang_build_test@v0
with:
packages_names: ${{ env.code_packages_names }}
workspace_dependencies: ${{ github.workspace }}/install
workspace_dependencies: install


#####################################################################
Expand All @@ -271,7 +297,8 @@ jobs:
- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: ${{ github.workspace }}/src
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand All @@ -286,9 +313,10 @@ jobs:
uses: eProsima/eProsima-CI/ubuntu/coverage_build_test_upload@v0
with:
packages_names: ${{ env.code_packages_names }}
workspace_dependencies: ${{ github.workspace }}/install
workspace_dependencies: install
test_report_artifact: test_report_coverage${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}
codecov_fix_file_path: ${{ github.workspace }}/src/codecov.yml
codecov_fix_file_path: src/codecov.yml


#####################################################################
Expand All @@ -301,7 +329,8 @@ jobs:
- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: ${{ github.workspace }}/src
path: src
ref: ${{ inputs.ref }}

- name: Download dependencies and install requirements
uses: ./src/.github/actions/project_dependencies
Expand All @@ -313,10 +342,15 @@ jobs:
secret_token: ${{ secrets.GITHUB_TOKEN }}

- name: Compile and run tests
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test_flaky@v0
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
with:
packages_names: ${{ env.code_packages_names }}
workspace_dependencies: ${{ github.workspace }}/install
cmake_args: -DBUILD_TESTS=ON
cmake_build_type: Release
workspace_dependencies: install
ctest_args: --label-regex "xfail"
colcon_meta_file: ./src/.github/workflows/configurations/${{ runner.os }}/colcon.meta
test_report_artifact: test_report_flaky${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}


#####################################################################
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ on:
- v3

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.'
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'

Expand All @@ -35,4 +37,5 @@ jobs:
with:
custom_version_build: ${{ github.event.inputs.custom_version_build || 'v2' }}
dependencies_artifact_postfix: ${{ github.event.inputs.dependencies_artifact_postfix || '_nightly' }}
ref: ${{ github.ref }}
secrets: inherit

0 comments on commit c8fa514

Please sign in to comment.