Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[19048] Backport workflows from master #3965

Merged
merged 6 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 45 additions & 6 deletions .github/actions/fetch-fastdds-repos/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,52 @@
name: 'fetch-fastdds-repos'
description: 'Fetch Fast DDS dependencies'
inputs:
target_directory:
description: 'Target directory where the dependencies will be downloaded.'
required: true
default: '.'
googletest:
description: 'Specifies if GoogleTest repository should be downloaded.'
required: false
default: 'false'
discovery_server:
description: 'Specifies if Discovery Server repository should be downloaded.'
required: false
default: 'false'
discovery_server_branch:
description: 'Specifies Discovery Server branch. The final branch is calculated based on the event that triggers
the action. Thus, if the action has been triggered as a result of a Pull Request, the branch will be the source
branch, the target branch, "master", or the branch specified in this parameter.'
required: false
default: 'master'
runs:
using: "composite"
steps:
- id: fetch-fastdds-repos
- name: Fetch eProsima dependencies
run: |
cd src
git clone https://github.com/eProsima/foonathan_memory_vendor.git
git clone https://github.com/eProsima/Fast-CDR.git
git clone https://github.com/google/googletest.git --branch release-1.10.0
cd ..
git clone https://github.com/eProsima/foonathan_memory_vendor.git ${{ inputs.target_directory }}/foonathan_memory_vendor
git clone https://github.com/eProsima/Fast-CDR.git ${{ inputs.target_directory }}/fastcdr
shell: bash

- name: Fetch GoogleTest
if: ${{ inputs.googletest == 'true' }}
run: git clone https://github.com/google/googletest.git --branch release-1.12.1 ${{ inputs.target_directory }}/googletest
shell: bash

- name: Fetch Discovery Server
if: ${{ inputs.discovery_server == 'true' }}
run: |
base_dir=${PWD}
git clone https://github.com/eProsima/Discovery-Server.git ${{ inputs.target_directory }}/discovery_server
cd ${{ inputs.target_directory }}/discovery_server

if [[ $(git rev-parse --verify "${{ github.head_ref }}" 2>/dev/null) ]]; then
git checkout ${{ github.head_ref }}
elif [[ $(git rev-parse --verify "${{ github.base_ref }}" 2>/dev/null) ]]; then
git checkout ${{ github.base_ref }}
else
git checkout ${{ inputs.discovery_server_branch }}
fi

cd ${base_dir}
shell: bash
13 changes: 13 additions & 0 deletions .github/actions/install-apt-packages-documentation/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'install-apt-packages-documentation'
description: 'Install necessary apt packages for building documentation'
runs:
using: "composite"
steps:
- id: install-apt-packages-documentation
run: |
sudo apt-get update
sudo apt-get -y install \
doxygen \
imagemagick \
plantuml
shell: bash
13 changes: 7 additions & 6 deletions .github/actions/install-apt-packages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ runs:
steps:
- id: install-apt-packages
run: |
sudo apt -y install \
sudo apt-get update
sudo apt-get -y install \
curl \
grep \
libasio-dev \
libtinyxml2-dev \
python3 \
python3-pip \
software-properties-common \
wget \
libasio-dev \
libtinyxml2-dev \
curl \
grep
wget
shell: bash
14 changes: 0 additions & 14 deletions .github/actions/install-python-packages/action.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/config/asan_colcon.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"names":
{
"fastrtps":
{
"cmake-args":
[
"-DCMAKE_BUILD_TYPE=Debug",
"-DEPROSIMA_BUILD_TESTS=ON",
"-DGTEST_INDIVIDUAL=ON",
"-DRTPS_API_TESTS=ON",
"-DFASTRTPS_API_TESTS=ON",
"-DFASTDDS_PIM_API_TESTS=ON",
"-DPERFORMANCE_TESTS=ON",
"-DSECURITY=ON",
"-DFASTDDS_STATISTICS=ON",
"-DSANITIZER=Address",
"-DCMAKE_CXX_FLAGS='-Werror'"
]
},

"discovery-server":
{
"cmake-args":
[
"-DCMAKE_BUILD_TYPE=Debug",
"-DSANITIZER=Address",
]
}
}
}
25 changes: 25 additions & 0 deletions .github/workflows/config/default_ci.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"names":
{
"fastrtps" :
{
"cmake-args": [
"-DEPROSIMA_BUILD=ON",
"-DINTERNAL_DEBUG=ON",
"-DGTEST_INDIVIDUAL=ON",
"-DFASTRTPS_API_TESTS=OFF",
"-DFASTDDS_PIM_API_TESTS=ON",
"-DPERFORMANCE_TESTS=ON",
"-DNO_TLS=ON",
"-DSECURITY=ON",
"-DMEMORYCHECK_COMMAND_OPTIONS=-q --tool=memcheck --leak-check=yes --show-reachable=yes
--num-callers=50 --log-fd=2 --error-exitcode=1",
"-DMEMORYCHECK_SUPPRESSIONS_FILE=../../src/fastrtps/valgrind.supp"
]
},
"googletest-distribution" :
{
"cmake-args" : ["-Dgtest_force_shared_crt=ON"]
}
}
}
13 changes: 13 additions & 0 deletions .github/workflows/config/default_ci_2.6.x.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repositories:
fastcdr:
type: git
url: https://github.com/eProsima/Fast-CDR.git
version: 1.0.x
foonathan_memory_vendor:
type: git
url: https://github.com/eProsima/foonathan_memory_vendor.git
version: v1.2.1
googletest-distribution:
type: git
url: https://github.com/google/googletest.git
version: release-1.11.0
24 changes: 24 additions & 0 deletions .github/workflows/config/nightly.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"names":
{
"fastrtps" :
{
"cmake-args": [
"-DEPROSIMA_BUILD=ON",
"-DINTERNAL_DEBUG=ON",
"-DGTEST_INDIVIDUAL=ON",
"-DFASTRTPS_API_TESTS=OFF",
"-DFASTDDS_PIM_API_TESTS=ON",
"-DPERFORMANCE_TESTS=ON",
"-DNO_TLS=ON",
"-DMEMORYCHECK_COMMAND_OPTIONS=-q --tool=memcheck --leak-check=yes --show-reachable=yes
--num-callers=50 --log-fd=2 --error-exitcode=1",
"-DMEMORYCHECK_SUPPRESSIONS_FILE=../../src/fastrtps/valgrind.supp"
]
},
"googletest-distribution" :
{
"cmake-args" : ["-Dgtest_force_shared_crt=ON"]
}
}
}
13 changes: 13 additions & 0 deletions .github/workflows/config/nightly_2.6.x.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repositories:
fastcdr:
type: git
url: https://github.com/eProsima/Fast-CDR.git
version: 1.0.x
foonathan_memory_vendor:
type: git
url: https://github.com/eProsima/foonathan_memory_vendor.git
version: v1.2.1
googletest-distribution:
type: git
url: https://github.com/google/googletest.git
version: release-1.11.0
31 changes: 31 additions & 0 deletions .github/workflows/config/tsan_colcon.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"names":
{
"fastcdr":
{
"cmake-args":
[
"-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'",
"-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"
]
},
"fastrtps":
{
"cmake-args":
[
"-DCOMPILE_EXAMPLES=OFF",
"-DEPROSIMA_BUILD_TESTS=ON",
"-DGTEST_INDIVIDUAL=ON",
"-DRTPS_API_TESTS=ON",
"-DFASTRTPS_API_TESTS=OFF",
"-DFASTDDS_PIM_API_TESTS=ON",
"-DPERFORMANCE_TESTS=ON",
"-DSECURITY=ON",
"-DFASTDDS_STATISTICS=ON",
"-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'",
"-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"
]
}

}
}
111 changes: 111 additions & 0 deletions .github/workflows/documentation-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Documentation build and test
on:
workflow_dispatch:
inputs:
optional_documentation_branch:
description: 'Optional Documentation branch name'
required: false
type: string

push:
branches:
- 'master'
JesusPoderoso marked this conversation as resolved.
Show resolved Hide resolved
paths-ignore:
- '**.md'
- '**.txt'
- '!**/CMakeLists.txt'

pull_request:
branches:
- 'master'
paths-ignore:
- '**.md'
- '**.txt'
- '!**/CMakeLists.txt'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
ACTION_BRANCH_NAME: ${{ github.head_ref }}

jobs:
ubuntu-build-and-test-documentation:
name: Documentation build and test

if: ${{ !(contains(github.event.pull_request.labels.*.name, 'no-test') ||
contains(github.event.pull_request.labels.*.name, 'skip-ci')) }}

runs-on: ubuntu-22.04
steps:
- name: Sync eProsima/Fast-DDS repository
uses: actions/checkout@v3
with:
path: src/fastrtps
submodules: true

- name: Install Fast DDS packages
uses: ./src/fastrtps/.github/actions/install-apt-packages

- name: Install documentation packages
uses: ./src/fastrtps/.github/actions/install-apt-packages-documentation

- name: Download FastDDS dependencies
run: |
pip3 install vcstool
vcs import --skip-existing src < ./src/fastrtps/fastrtps.repos

- name: Determine the Fast DDS Documentation branch to be used
run: |
TEMP_BRANCH=${{ inputs.optional_documentation_branch }}
DOC_REPO=https://github.com/eProsima/fast-dds-docs.git
RESPONSE_CODE=$(git ls-remote --heads $DOC_REPO $TEMP_BRANCH | wc -l)
if [[ -z "$TEMP_BRANCH" || ${RESPONSE_CODE} == "0" ]]
then
TEMP_BRANCH=${{ github.head_ref }}
echo "$given '${{ inputs.optional_documentation_branch }}' branch DOES NOT exist, using head '${{ github.head_ref }}'"
RESPONSE_CODE=$(git ls-remote --heads $DOC_REPO $TEMP_BRANCH | wc -l)
if [[ ${RESPONSE_CODE} == "0" ]]
then
TEMP_BRANCH=${{ github.base_ref }}
echo "head '${{ github.head_ref }}' branch DOES NOT exist, using base '${{ github.base_ref }}'"
RESPONSE_CODE=$(git ls-remote --heads $DOC_REPO $TEMP_BRANCH | wc -l)
if [[ ${RESPONSE_CODE} == "0" ]]
then
echo "ACTION_BRANCH_NAME=master" >> $GITHUB_ENV
JesusPoderoso marked this conversation as resolved.
Show resolved Hide resolved
echo "base '${{ github.base_ref }}' branch DOES NOT exist, using 'MASTER'"
else
echo "ACTION_BRANCH_NAME=${{ github.base_ref }}" >> $GITHUB_ENV
fi
else
echo "ACTION_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
fi
else
echo "ACTION_BRANCH_NAME=${{ inputs.optional_documentation_branch }}" >> $GITHUB_ENV
echo "using given '${{ inputs.optional_documentation_branch }}' branch"
fi

- name: Download FastDDS documentation repo
uses: actions/checkout@v3
with:
repository: eProsima/Fast-DDS-docs
path: src/fastdds-docs
ref: ${{ env.ACTION_BRANCH_NAME }}

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

- name: Install 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: Build documentation
run: |
colcon build --event-handlers=console_direct+ --metas

- name: Run documentation tests
run: |
colcon test --event-handlers=console_direct+ --packages-select fastdds-docs --return-code-on-test-failure
17 changes: 0 additions & 17 deletions .github/workflows/mirror.yml

This file was deleted.

Loading
Loading