Skip to content

Commit

Permalink
Refs #21256: Apply rev suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
  • Loading branch information
JesusPoderoso committed Jul 1, 2024
1 parent 9d88d4b commit f733f31
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 85 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/nightly-ubuntu-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Fast DDS Docs Ubuntu CI (nightly)

on:
Expand All @@ -10,9 +9,10 @@ jobs:
nightly-ubuntu-ci-master:
uses: eProsima/Fast-DDS-docs/.github/workflows/reusable-ubuntu-ci.yml@master
with:
# It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket:
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
os-image: 'ubuntu-22.04'
label: 'nightly-ubuntu-ci-master'
ctest-args: "-LE xfail"
fastdds-docs-branch: 'master'
fastdds-branch: 'master'
fastdds-python-branch: 'main'
Expand All @@ -23,9 +23,10 @@ jobs:
nightly-ubuntu-ci-2_14_x:
uses: eProsima/Fast-DDS-docs/.github/workflows/reusable-ubuntu-ci.yml@2.14.x
with:
# It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket:
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
os-image: 'ubuntu-22.04'
label: '-nightly-ubuntu-ci-2.14.x'
ctest-args: "-LE xfail"
fastdds-docs-branch: '2.14.x'
fastdds-branch: '2.14.x'
fastdds-python-branch: '1.4.x'
Expand All @@ -36,9 +37,10 @@ jobs:
nightly-ubuntu-ci-2_13_x:
uses: eProsima/Fast-DDS-docs/.github/workflows/reusable-ubuntu-ci.yml@2.13.x
with:
# It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket:
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
os-image: 'ubuntu-22.04'
label: '-nightly-ubuntu-ci-2.13.x'
ctest-args: "-LE xfail"
fastdds-docs-branch: '2.13.x'
fastdds-branch: '2.13.x'
fastdds-python-branch: '1.4.x'
Expand All @@ -49,9 +51,10 @@ jobs:
nightly-ubuntu-ci-2_10_x:
uses: eProsima/Fast-DDS-docs/.github/workflows/reusable-ubuntu-ci.yml@2.10.x
with:
# It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket:
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
os-image: 'ubuntu-22.04'
label: '-nightly-ubuntu-ci-2.10.x'
ctest-args: "-LE xfail"
fastdds-docs-branch: '2.10.x'
fastdds-branch: '2.10.x'
fastdds-python-branch: '1.2.x'
Expand All @@ -62,9 +65,10 @@ jobs:
nightly-ubuntu-ci-2_6_x:
uses: eProsima/Fast-DDS-docs/.github/workflows/reusable-ubuntu-ci.yml@2.6.x
with:
# It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket:
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
os-image: 'ubuntu-20.04'
label: '-nightly-ubuntu-ci-2.6.x'
ctest-args: "-LE xfail"
fastdds-docs-branch: '2.6.x'
fastdds-branch: '2.6.x'
fastdds-python-branch: '1.0.x'
Expand Down
81 changes: 7 additions & 74 deletions .github/workflows/reusable-ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ on:
required: false
type: boolean
default: false

env:
build-meta: ${{ inputs.run-tests == true && './src/fastdds-docs/.github/workflows/config/build.meta ./src/fastdds-docs/.github/workflows/config/test.meta' || './src/fastdds-docs/.github/workflows/config/build.meta' }}
defaults:
run:
shell: bash

jobs:
fastdds_docs_build:
reusable-ubuntu-ci:
runs-on: ${{ inputs.os-version }}
if: ${{ inputs.run-build == true }}
strategy:
Expand Down Expand Up @@ -162,77 +163,8 @@ jobs:
destination_workspace: src
skip_existing: 'true'

- name: Colcon build
continue-on-error: false
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastdds-docs/.github/workflows/config/build.meta
colcon_build_args: ${{ inputs.colcon-args }}
cmake_args: ${{ inputs.cmake-args }}
cmake_build_type: ${{ matrix.cmake-build-type }}
workspace: ${{ github.workspace }}

- name: Upload build artifacts
uses: eProsima/eProsima-CI/external/upload-artifact@v0
with:
name: fastdds_docs_build_${{ inputs.label }}
path: ${{ github.workspace }}

fastdds_docs_test:
needs: fastdds_docs_build
runs-on: ${{ inputs.os-version }}
if: ${{ inputs.run-tests == true }}
strategy:
fail-fast: false
matrix:
cmake-build-type:
- 'RelWithDebInfo'
steps:
- name: Download build artifacts
uses: eProsima/eProsima-CI/external/download-artifact@v0
with:
name: fastdds_docs_build_${{ inputs.label }}
path: ${{ github.workspace }}

- name: Install Fix Python version
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'

- name: Get minimum supported version of CMake
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: '3.22.6'

- name: Install apt dependencies
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: libasio-dev libtinyxml2-dev libssl-dev swig doxygen imagemagick plantuml
update: false
upgrade: false

- name: Install colcon
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0

- name: Install Python dependencies
uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
with:
packages: vcstool xmlschema
upgrade: false

- name: Install Fast DDS Docs required python packages
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
upgrade: false
requirements_file_name: src/fastdds-docs/docs/requirements.txt

- name: Setup CCache
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
if: ${{ inputs.use-ccache == true }}
with:
api_token: ${{ secrets.GITHUB_TOKEN }}

- name: Fetch Fast DDS Docs CI dependencies
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/fastdds-docs/.github/workflows/config/test.repos
Expand All @@ -243,13 +175,14 @@ jobs:
continue-on-error: false
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastdds-docs/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastdds-docs/.github/workflows/config/test.meta
colcon_meta_file: ${{ env.build-meta }}
colcon_build_args: ${{ inputs.colcon-args }}
cmake_args: ${{ inputs.cmake-args }}
cmake_build_type: ${{ matrix.cmake-build-type }}
workspace: ${{ github.workspace }}

- name: Colcon test
if: ${{ inputs.run-tests == true }}
id: fastdds_docs_test
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
Expand All @@ -264,7 +197,7 @@ jobs:

- name: Fast DDS Docs test summary
uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0
if: ${{ !cancelled() }}
if: ${{ !cancelled() && inputs.run-tests == true }}
with:
junit_reports_dir: "${{ steps.fastdds_docs_test.outputs.ctest_results_path }}"
print_summary: 'True'
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ on:
required: true
type: string
run-tests:
description: 'Run test suite of Fast DDS python'
description: 'Run test suite of Fast DDS Docs'
required: false
type: boolean
default: true
Expand All @@ -58,16 +58,19 @@ concurrency:

jobs:
ubuntu-ci:
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:
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
os-version: ${{ inputs.os-version || 'ubuntu-22.04' }}
label: 'ubuntu-ci'
label: 'ubuntu-ci-master-main'
colcon-args: ${{ inputs.colcon-args }}
cmake-args: ${{ inputs.cmake-args }}
ctest-args: ${{ inputs.ctest-args }}
fastdds-docs-branch: ${{ inputs.fastdds-docs-branch || github.ref || 'master' }}
fastdds-docs-branch: ${{ inputs.fastdds-docs-branch || github.ref }}
fastdds-branch: ${{ inputs.fastdds-branch || 'master' }}
fastdds-python-branch: ${{ inputs.fastdds-python-branch || 'main' }}
run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci') && !contains(github.event.pull_request.labels.*.name, 'conflicts')) && true || false }}
run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) && true || false }}
run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }}
use-ccache: ${{ inputs.use-ccache || false }}

0 comments on commit f733f31

Please sign in to comment.