Skip to content

Commit

Permalink
Add Ubuntu weekly ci (#5038)
Browse files Browse the repository at this point in the history
* Refs #21267: Add weekly ubuntu CI to test 2.x branches with CDR 1.1.x

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #21267: Change windows reusable ci to use new merge meta files eProsima CI action

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #21267: move the !(skip_ci) inside the reusable workflows

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #21267: compile fastdds_python package only

Signed-off-by: Mario Dominguez <[email protected]>

* Refs #21267: Apply Jesus suggestions

Signed-off-by: Mario Dominguez <[email protected]>

---------

Signed-off-by: Mario Dominguez <[email protected]>
(cherry picked from commit e6773fb)

# Conflicts:
#	.github/workflows/nightly-ubuntu-ci.yml
#	.github/workflows/reusable-ubuntu-ci.yml
#	.github/workflows/reusable-windows-ci.yml
#	.github/workflows/weekly-ubuntu-ci.yml
  • Loading branch information
Mario-DL authored and mergify[bot] committed Jul 11, 2024
1 parent 0e4e234 commit 89e0ba0
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 4 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/nightly-ubuntu-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Fast DDS Ubuntu CI (nightly)

on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'

jobs:
nightly-ubuntu-ci-master:
strategy:
fail-fast: false
matrix:
os-image:
- 'ubuntu-22.04'
security:
- true
- false
uses: eProsima/Fast-DDS/.github/workflows/reusable-ubuntu-ci.yml@master
with:
os-image: ${{ matrix.os-image }}
label: '${{ matrix.os-image }}-nightly-sec-${{ matrix.security }}-ubuntu-ci-master'
ctest-args: "-LE xfail"
fastdds-branch: 'master'
security: ${{ matrix.security }}
run-build: true
run-tests: true
use-ccache: false

nightly-ubuntu-ci-2_14_x:
strategy:
fail-fast: false
matrix:
os-image:
- 'ubuntu-22.04'
security:
- true
- false
uses: eProsima/Fast-DDS/.github/workflows/[email protected]
with:
os-image: ${{ matrix.os-image }}
label: '${{ matrix.os-image }}-nightly-sec-${{ matrix.security }}-ubuntu-ci-2.14.x'
ctest-args: "-LE xfail"
fastdds-branch: '2.14.x'
security: ${{ matrix.security }}
run-build: true
run-tests: true
use-ccache: false

nightly-ubuntu-ci-2_13_x:
strategy:
fail-fast: false
matrix:
os-image:
- 'ubuntu-22.04'
security:
- true
- false
uses: eProsima/Fast-DDS/.github/workflows/[email protected]
with:
os-image: ${{ matrix.os-image }}
label: '${{ matrix.os-image }}-nightly-sec-${{ matrix.security }}-ubuntu-ci-2.13.x'
ctest-args: "-LE xfail"
fastdds-branch: '2.13.x'
security: ${{ matrix.security }}
run-build: true
run-tests: true
use-ccache: false

nightly-ubuntu-ci-2_10_x:
strategy:
fail-fast: false
matrix:
os-image:
- 'ubuntu-22.04'
security:
- true
- false
uses: eProsima/Fast-DDS/.github/workflows/[email protected]
with:
os-image: ${{ matrix.os-image }}
label: '${{ matrix.os-image }}-nightly-sec-${{ matrix.security }}-ubuntu-ci-2.10.x'
ctest-args: "-LE xfail"
fastdds-branch: '2.10.x'
security: ${{ matrix.security }}
run-build: true
run-tests: true
use-ccache: false

31 changes: 31 additions & 0 deletions .github/workflows/reusable-ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,21 @@ on:
description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)'
required: true
type: string
fastcdr-branch:
description: 'Branch or tag of Fast CDR repository (https://github.com/eProsima/Fast-CDR)'
required: false
type: string
default: 'master'
security:
description: 'Enable security features'
required: false
type: boolean
default: true
run-build:
description: 'Build Fast DDS (CI skipped otherwise)'
required: false
type: boolean
default: true
run-tests:
description: 'Run test suite of Fast DDS, Fast DDS python, and Fast DDS Discovery Server'
required: false
Expand All @@ -53,6 +63,7 @@ defaults:
jobs:
fastdds_build:
runs-on: ${{ inputs.os-image }}
if: ${{ inputs.run-build == true }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -105,6 +116,20 @@ jobs:
with:
api_token: ${{ secrets.GITHUB_TOKEN }}

- name: Get Fast CDR branch
id: get_fastcdr_branch
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
with:
remote_repository: eProsima/Fast-CDR
fallback_branch: ${{ inputs.fastcdr-branch }}

- name: Download Fast CDR
uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-CDR
path: ${{ github.workspace }}/src/fastcdr
ref: ${{ steps.get_fastcdr_branch.outputs.deduced_branch }}

- name: Fetch Fast DDS dependencies
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
Expand Down Expand Up @@ -295,11 +320,17 @@ jobs:
continue-on-error: false
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
<<<<<<< HEAD
colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta
colcon_build_args: ${{ inputs.colcon-args }}
=======
colcon_meta_file: ${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_build.meta
colcon_build_args: ${{ inputs.colcon-args }} --packages-select fastdds_python
>>>>>>> e6773fb0b (Add Ubuntu weekly ci (#5038))
cmake_args: '${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}'
cmake_args_default: ''
cmake_build_type: ${{ matrix.cmake-build-type }}
workspace_dependencies: ${{ github.workspace }}/install
workspace: ${{ github.workspace }}

- name: Upload python build artifacts
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/reusable-windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
skip_existing: 'true'

- name: Prepare build meta file
<<<<<<< HEAD
run: |
$build_meta_file = '${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_build.meta'
$test_meta_file = '${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_test.meta'
Expand All @@ -158,6 +159,12 @@ jobs:
# Write the combined content to the build test meta file
$combined_content | Out-File -FilePath $build_test_meta_file -Encoding UTF8
=======
uses: eProsima/eProsima-CI/windows/merge_yaml_metas@v0
with:
metas: "@('${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_build.meta', '${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_test.meta')"
path: '${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_build_test.meta'
>>>>>>> e6773fb0b (Add Ubuntu weekly ci (#5038))

- name: Build
id: build
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ concurrency:
jobs:
ubuntu-ci:

if: ${{ (
!contains(github.event.pull_request.labels.*.name, 'skip-ci') &&
!contains(github.event.pull_request.labels.*.name, 'conflicts')
) }}
if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }}
uses: ./.github/workflows/reusable-ubuntu-ci.yml
with:
# It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket:
Expand All @@ -69,5 +66,6 @@ jobs:
ctest-args: ${{ inputs.ctest-args || '-LE xfail' }}
fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.10.x' }}
security: ${{ ((inputs.security == true) && true) || github.event_name == 'pull_request' }}
run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) }}
use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }}
48 changes: 48 additions & 0 deletions .github/workflows/weekly-ubuntu-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Fast DDS Ubuntu CI (weekly)

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1' # Run at minute 0 on Monday

jobs:

weekly-ubuntu-ci-2_14_x:
strategy:
fail-fast: false
matrix:
fastcdr-branch:
- '1.1.x'
- '2.x'
security:
- true
- false
uses: eProsima/Fast-DDS/.github/workflows/[email protected]
with:
os-image: 'ubuntu-22.04'
label: 'weekly-sec-${{ matrix.security }}-fastcdr-${{ matrix.fastcdr-branch }}-ubuntu-ci-2.14.x'
ctest-args: "-LE xfail"
fastdds-branch: '2.14.x'
fastcdr-branch: ${{ matrix.fastcdr-branch }}
security: ${{ matrix.security }}
run-build: true
run-tests: true
use-ccache: false

weekly-ubuntu-ci-2_6_x:
strategy:
fail-fast: false
matrix:
security:
- true
- false
uses: eProsima/Fast-DDS/.github/workflows/[email protected]
with:
os-image: 'ubuntu-20.04'
label: 'weekly-sec-${{ matrix.security }}-ubuntu-ci-2.6.x'
ctest-args: "-LE xfail"
fastdds-branch: '2.6.x'
security: ${{ matrix.security }}
run-build: true
run-tests: true
use-ccache: false

0 comments on commit 89e0ba0

Please sign in to comment.