Skip to content

Commit

Permalink
Refs #19760. Improve CI
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware committed Nov 14, 2023
1 parent 8100c26 commit 30b0dc0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 12 deletions.
24 changes: 24 additions & 0 deletions .github/actions/fetch-fastdds_python-repos/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'fetch-fastdds_python-repos'
description: 'Fetch Fast DDS Python dependencies'
inputs:
foonathan-memory-vendor-branch:
description: 'foonathan_memory_vendor branch to be used'
required: true
fastcdr-branch:
description: 'Fast-CDR branch to be used'
required: true
fastdds-branch:
description: 'Fast-DDS branch to be used'
required: true
runs:
using: "composite"
steps:
- id: fetch-fastdds_python-repos
shell: bash
run: |
cd src
git clone https://github.com/google/googletest.git --branch release-1.11.0
git clone https://github.com/eProsima/foonathan_memory_vendor.git --branch ${{ inputs.foonathan-memory-vendor-branch }}
git clone https://github.com/eProsima/Fast-CDR.git --branch ${{ inputs.fastcdr-branch }}
git clone https://github.com/eProsima/Fast-DDS.git --branch ${{ inputs.fastdds-branch }}
cd ..
42 changes: 30 additions & 12 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ name: test

on:
workflow_dispatch:
inputs:
foonathan_memory_vendor_branch:
description: 'foonathan_memory_vendor branch to be used'
required: false
default: 'master'
fastcdr_versions:
description: 'Fast-CDR branches to be used'
required: false
default: '["1.1.x", "master"]'
fastdds_branch:
description: 'Fast-DDS branch to be used'
required: false
default: 'master'
pull_request:
push:
branches:
Expand All @@ -12,6 +25,9 @@ on:
jobs:
windows-build-test:
runs-on: windows-2019
strategy:
matrix:
fastcdr_version: ${{ fromJson(github.event.inputs.fastcdr_versions || '["1.1.x", "master"]') }}

env:
CXXFLAGS: /MP
Expand All @@ -31,18 +47,19 @@ jobs:

- uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
with:
packages: pytest pywin32 vcstool
packages: pytest pywin32

- uses: eProsima/eProsima-CI/multiplatform/install_colcon@v0

- uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src/fastdds_python

- name: Fetch repositories
shell: pwsh
run: |
vcs import src --skip-existing --input src/fastdds_python/fastdds_python.repos
- uses: ./src/fastdds_python/.github/actions/fetch-fastdds_python-repos
with:
foonathan-memory-vendor-branch: ${{ github.event.inputs.foonathan_memory_vendor_branch || 'master' }}
fastcdr-branch: ${{ matrix.fastcdr_version }}
fastdds-branch: ${{ github.event.inputs.fastdds_branch || 'master' }}

- uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
Expand Down Expand Up @@ -89,6 +106,9 @@ jobs:

ubuntu-build-test:
runs-on: ubuntu-22.04
strategy:
matrix:
fastcdr_version: ${{ fromJson(github.event.inputs.fastcdr_versions || '["1.1.x", "master"]') }}

steps:
- uses: eProsima/eProsima-CI/external/checkout@v0
Expand All @@ -99,15 +119,13 @@ jobs:
with:
packages: libpython3-dev swig

- uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
with:
packages: vcstool

- uses: eProsima/eProsima-CI/multiplatform/install_colcon@v0

- name: Fetch repositories
run: |
vcs import --skip-existing src < src/fastdds_python/fastdds_python.repos
- uses: ./src/fastdds_python/.github/actions/fetch-fastdds_python-repos
with:
foonathan-memory-vendor-branch: ${{ github.event.inputs.foonathan_memory_vendor_branch || 'master' }}
fastcdr-branch: ${{ matrix.fastcdr_version }}
fastdds-branch: ${{ github.event.inputs.fastdds_branch || 'master' }}

- uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
Expand Down

0 comments on commit 30b0dc0

Please sign in to comment.