Skip to content

Commit

Permalink
Update nightly builds to compile on Ubuntu 24 (#112)
Browse files Browse the repository at this point in the history
* Add Ubuntu 24.04 and remove Ubuntu 22.04 to fastdds build

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

* Update all actions to target current branch

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

* Add python virtual env

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

* Add setup_python_venv github action

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

* Extract virtual env from action

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

* Updagrade setup tools

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

* Add Ubuntu 24 CI to ddspipe and dev-utils builds

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

* Update ddspipe build to Ubuntu 24

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

* Restore references to main

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

* Apply changes from review

Signed-off-by: Raúl <[email protected]>

* Temporal commit to test the actions in this branch

Signed-off-by: Raúl <[email protected]>

* Add inputs to setup_python_venv action

Signed-off-by: Raúl <[email protected]>

* Integrate setup python venv into install python packages action

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

* Update README

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

* Set action branches back to main

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

* Remove action for Windows OS

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

* Set python3 and pip3 explicitly in python action

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

* Set action branches back to current branch

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

* Use pip module

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

* Update artifact names

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

* Set action branches back to main

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

* Update versions.md

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

* Add new ubuntu action description to versions.md

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

---------

Signed-off-by: Raul Sanchez-Mateos <[email protected]>
Signed-off-by: Raúl <[email protected]>
  • Loading branch information
rsanchez15 authored Jul 15, 2024
1 parent 1ca2a9c commit b31bb51
Show file tree
Hide file tree
Showing 9 changed files with 114 additions and 52 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build_ddspipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
# Finally it takes the install directory generated from colcon build and uploads it as an artifact.
# The result artifact also contains Fast DDS installed project.
# This is done for several OS and cmake built types:
# - ubuntu-22.04 | ubuntu-20.04 | windows-2019 | windows-2022
# - ubuntu-22.04 | ubuntu-24.04 | windows-2019 | windows-2022
# - Debug | Release
#
# ARTIFACT RESULT:
# The artifact generated is called "built_ddspipe_<os>_<cmake_build_type><postfix>"
# - <os> is "ubuntu-20.04", "ubuntu-22.04", "windows-2019", or "windows-2022"
# The artifact generated is called "build_ddspipe_<os>_<cmake_build_type><postfix>"
# - <os> is "ubuntu-22.04", "ubuntu-24.04", "windows-2019", or "windows-2022"
# - <cmake_build_type> is "Debug", or "Release"
# - <postfix> is "_nightly" for schedule runs every night, or is set manually by the user.
#
Expand Down Expand Up @@ -122,7 +122,7 @@ on:
env:
default_configuration_branch: main
default_artifact_postfix: _nightly
artifact_prefix: built_ddspipe
artifact_prefix: build_ddspipe
default_ddspipe_branch: main

jobs:
Expand Down Expand Up @@ -154,8 +154,8 @@ jobs:
- Release
- Debug
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- windows-2019
- windows-2022

Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
- name: Get dev-utils artifact
uses: eProsima/eProsima-CI/external/download-artifact@main
with:
name: built_dev_utils_custom_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
name: build_dev_utils_custom_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
path: install

- name: Get colcon.meta to build artifact
Expand Down Expand Up @@ -232,8 +232,8 @@ jobs:
- Release
- Debug
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- windows-2019
- windows-2022

Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
- name: Get dev-utils artifact
uses: eProsima/eProsima-CI/external/download-artifact@main
with:
name: built_dev_utils_${{ matrix.fastdds_version }}_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
name: build_dev_utils_${{ matrix.fastdds_version }}_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
path: install

- name: Get colcon.meta and .repos files to build artifact
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build_dev_utils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
# Finally it takes the install directory generated from colcon build and uploads it as an artifact.
# The result artifact also contains Fast DDS installed project.
# This is done for several OS and cmake built types:
# - ubuntu-22.04 | ubuntu-20.04 | windows-2019 | windows-2022
# - ubuntu-22.04 | ubuntu-24.04 | windows-2019 | windows-2022
# - Debug | Release
#
# ARTIFACT RESULT:
# The artifact generated is called "built_dev_utils_<os>_<cmake_build_type><postfix>"
# - <os> is "ubuntu-20.04", "ubuntu-22.04", "windows-2019", or "windows-2022"
# The artifact generated is called "build_dev_utils_<os>_<cmake_build_type><postfix>"
# - <os> is "ubuntu-22.04", "ubuntu-24.04", "windows-2019", or "windows-2022"
# - <cmake_build_type> is "Debug", or "Release"
# - <postfix> is "_nightly" for schedule runs every night, or is set manually from user.
#
Expand Down Expand Up @@ -168,7 +168,7 @@ on:
env:
default_configuration_branch: main
default_artifact_postfix: _nightly
artifact_prefix: built_dev_utils
artifact_prefix: build_dev_utils
default_dev_utils_branch: main

jobs:
Expand Down Expand Up @@ -199,8 +199,8 @@ jobs:
- Release
- Debug
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- windows-2019
- windows-2022

Expand All @@ -223,7 +223,7 @@ jobs:
- name: Get Fast DDS artifact
uses: eProsima/eProsima-CI/external/download-artifact@main
with:
name: built_fastdds_custom_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
name: build_fastdds_custom_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
path: install

- name: Get colcon.meta and .repos files to build artifact
Expand Down Expand Up @@ -272,8 +272,8 @@ jobs:
- Release
- Debug
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- windows-2019
- windows-2022

Expand All @@ -296,7 +296,7 @@ jobs:
- name: Get Fast DDS artifact
uses: eProsima/eProsima-CI/external/download-artifact@main
with:
name: built_fastdds_${{ matrix.fastdds_version }}_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
name: build_fastdds_${{ matrix.fastdds_version }}_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }}
path: install

- name: Get colcon.meta to build artifact
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build_fastdds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# Then uses the colcon.meta files in "./.github/workflows/configurations/metas/<os>/colcon.meta" to the build projects.
# Finally it takes the install directory generated from colcon build and uploads it as an artifact.
# This is done for several OS and cmake built types:
# - ubuntu-22.04 | ubuntu-20.04 | windows-2019 | windows-2022
# - ubuntu-22.04 | ubuntu-24.04 | windows-2019 | windows-2022
# - Debug | Release
#
# ARTIFACT RESULT:
# The artifact generated is called "built_fastdds_<os>_<cmake_build_type><postfix>"
# - <os> is "ubuntu-20.04", "ubuntu-22.04", "windows-2019", or "windows-2022"
# The artifact generated is called "build_fastdds_<os>_<cmake_build_type><postfix>"
# - <os> is "ubuntu-22.04", "ubuntu-24.04", "windows-2019", or "windows-2022"
# - <cmake_build_type> is "Debug", or "Release"
# - <postfix> is "_nightly" for scheduled runs every night, or is set manually by the user.
#
Expand Down Expand Up @@ -152,7 +152,7 @@ on:
env:
default_configuration_branch: main
default_artifact_postfix: _nightly
artifact_prefix: built_fastdds
artifact_prefix: build_fastdds
default_foonathan_memory_vendor_branch: master
default_fastcdr_branch: master
default_fastdds_branch: master
Expand All @@ -171,8 +171,8 @@ jobs:
- Release
- Debug
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- windows-2019
- windows-2022

Expand Down Expand Up @@ -236,8 +236,8 @@ jobs:
- Release
- Debug
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- windows-2019
- windows-2022
# Not cancel workflow if any matrix job fails
Expand Down
57 changes: 30 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ For more information about versioning handle of this project, check following [f
- [setup_cmake](ubuntu/setup_cmake/action.yml)
- Set a specific CMake version

- [setup_python_venv](ubuntu/setup_python_venv/action.yml)
- Setup a Python virtual environment and add it to the PATH.

### Windows

- [merge_yaml_metas](windows/merge_yaml_metas/action.yml)
Expand Down Expand Up @@ -184,42 +187,42 @@ So far, the following workflows are running to upload artifacts:
These are the artifacts that are generated every night with the latest versions of each project:

- Fast DDS
- built_fastdds_ubuntu-20.04_Debug_nightly
- built_fastdds_ubuntu-20.04_Release_nightly
- built_fastdds_ubuntu-22.04_Debug_nightly
- built_fastdds_ubuntu-22.04_Release_nightly
- built_fastdds_windows-2019_Debug_nightly
- built_fastdds_windows-2019_Release_nightly
- built_fastdds_windows-2022_Debug_nightly
- built_fastdds_windows-2022_Release_nightly
- build_fastdds_ubuntu-22.04_Debug_nightly
- build_fastdds_ubuntu-22.04_Release_nightly
- build_fastdds_ubuntu-24.04_Debug_nightly
- build_fastdds_ubuntu-24.04_Release_nightly
- build_fastdds_windows-2019_Debug_nightly
- build_fastdds_windows-2019_Release_nightly
- build_fastdds_windows-2022_Debug_nightly
- build_fastdds_windows-2022_Release_nightly

- dev-utils
- built_dev_utils_ubuntu-20.04_Debug_nightly
- built_dev_utils_ubuntu-20.04_Release_nightly
- built_dev_utils_ubuntu-22.04_Debug_nightly
- built_dev_utils_ubuntu-22.04_Release_nightly
- built_dev_utils_windows-2019_Debug_nightly
- built_dev_utils_windows-2019_Release_nightly
- built_dev_utils_windows-2022_Debug_nightly
- built_dev_utils_windows-2022_Release_nightly
- build_dev_utils_ubuntu-22.04_Debug_nightly
- build_dev_utils_ubuntu-22.04_Release_nightly
- build_dev_utils_ubuntu-24.04_Debug_nightly
- build_dev_utils_ubuntu-24.04_Release_nightly
- build_dev_utils_windows-2019_Debug_nightly
- build_dev_utils_windows-2019_Release_nightly
- build_dev_utils_windows-2022_Debug_nightly
- build_dev_utils_windows-2022_Release_nightly

- DDS Pipe
- built_ddspipe_ubuntu-20.04_Debug_nightly
- built_ddspipe_ubuntu-20.04_Release_nightly
- built_ddspipe_ubuntu-22.04_Debug_nightly
- built_ddspipe_ubuntu-22.04_Release_nightly
- built_ddspipe_windows-2019_Debug_nightly
- built_ddspipe_windows-2019_Release_nightly
- built_ddspipe_windows-2022_Debug_nightly
- built_ddspipe_windows-2022_Release_nightly
- build_ddspipe_ubuntu-22.04_Debug_nightly
- build_ddspipe_ubuntu-22.04_Release_nightly
- build_ddspipe_ubuntu-24.04_Debug_nightly
- build_ddspipe_ubuntu-24.04_Release_nightly
- build_ddspipe_windows-2019_Debug_nightly
- build_ddspipe_windows-2019_Release_nightly
- build_ddspipe_windows-2022_Debug_nightly
- build_ddspipe_windows-2022_Release_nightly

In order to use one of these artifacts, use the following action as a step:

```yml
- name: Get fastdds artifact
uses: eProsima/eProsima-CI/multiplatform/download_dependency@main
with:
artifact_name: built_fastdds_ubuntu-20.04_Debug_nightly
artifact_name: build_fastdds_ubuntu-20.04_Debug_nightly
workflow_source: build_fastdds.yml
workflow_source_repository: eProsima/eProsima-CI
# Path where to download the installs from the artifact
Expand All @@ -238,7 +241,7 @@ set [dependencies.repos](.github/workflows/configurations/<artifact>/dependencie
In order to change CMake options when building the artifact, set files in files in `.github/workflows/configurations/metas`.
Run the `manual_build` workflow with these arguments:

- `built_configuration_branch`: Branch created with `.repos` and `colcon.meta` files.
- `build_configuration_branch`: Branch created with `.repos` and `colcon.meta` files.
- `artifacts_name_postfix`: Postfix of the name of the artifact used to download and link, and also postfix of the name of the generated artifact.

> :warning: Do not generate custom artifacts with postfix `_nightly`, as this is the main name other repos will use.
Expand All @@ -250,7 +253,7 @@ In order to run this workflow, create a branch in this repository,
set [dependencies.repos](.github/workflows/configurations/manual/dependencies.repos) file with the repositories needed to build the project and set `colcon.meta` files in `.github/workflows/configurations/metas`.
Then, run the `manual_build` workflow with these arguments:

- `built_configuration_branch`: Branch created with `.repos` and `colcon.meta` files.
- `build_configuration_branch`: Branch created with `.repos` and `colcon.meta` files.
- `artifacts_name_prefix`: Prefix of the name of the artifact to generate.
- `artifacts_name_postfix`: Postfix of the name of the artifact to generate.

Expand Down
23 changes: 21 additions & 2 deletions ubuntu/install_python_packages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,26 @@ inputs:
required: false
default: ''

path:
description: 'Path to virtual environment'
required: false
default: '.venv'

activate_global:
description: 'Activate the virtual environment globally'
required: false
default: true

runs:
using: composite
steps:

- name: setup_python_venv
uses: eProsima/eProsima-CI/ubuntu/setup_python_venv@main
with:
path: ${{ inputs.path }}
activate_global: ${{ inputs.activate_global }}

- name: install_python_packages
run: |
Expand All @@ -36,16 +52,19 @@ runs:
# Install python packages if any
if [[ ! -z "${{ inputs.packages }}" ]] ; then
pip3 install ${UPGRADE_FLAG} --user \
pip3 install ${UPGRADE_FLAG} \
${{ inputs.packages }}
fi
# Install requirements file if any
if [[ ! -z "${{ inputs.requirements_file_name }}" ]] ; then
pip3 install ${UPGRADE_FLAG} --user \
pip3 install ${UPGRADE_FLAG} \
-r ${{ inputs.requirements_file_name }}
fi
python3 -m ensurepip --upgrade
python3 -m pip install --upgrade setuptools
echo "::endgroup::"
shell: bash
35 changes: 35 additions & 0 deletions ubuntu/setup_python_venv/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'setup_python_venv'
description: 'Setup a Python virtual environment and add it to the PATH'

inputs:

path:
description: 'Path to virtual environment'
required: false
default: '.venv'

activate_global:
description: 'Activate the virtual environment globally'
required: false
default: true

runs:
using: composite
steps:

- name: 'setup_python_venv'
run: |
echo "::group::Setup Python virtual environment"
# Create a virtual environment
python3 -m venv ${{ inputs.path }}
source .venv/bin/activate
if [ "${{ inputs.activate_global }}" = "true" ]; then
echo PATH=$PATH >> $GITHUB_ENV
fi
echo "::endgroup::"
shell: bash
2 changes: 1 addition & 1 deletion ubuntu/sphinx_docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ runs:
- name: Download cmake_utils artifact
uses: eProsima/eProsima-CI/multiplatform/download_dependency@main
with:
artifact_name: built_dev_utils_ubuntu-22.04_Release_nightly
artifact_name: build_dev_utils_ubuntu-22.04_Release_nightly
workflow_source: build_dev_utils.yml
workflow_source_repository: eProsima/eProsima-CI
target_workspace: '${{ github.workspace }}/install'
Expand Down
5 changes: 5 additions & 0 deletions versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ The [Forthcoming](#forthcoming) section includes those features added in `main`

The upcoming release will include the following **features**:

- Update nightly builds to compile on Ubuntu 24.04.
- Remove nightly builds for Ubuntu 20.04.
- Extended the action for installing python packages to setup a virtual environment.
- Added new Ubuntu action (`setup_python_venv`) for setting up a python virtual environment.

## v0.21.0

- Add external (multi-platform) action to install doxygen.
Expand Down

0 comments on commit b31bb51

Please sign in to comment.