diff --git a/.github/actions/fetch-fastdds_python-repos/action.yml b/.github/actions/fetch-fastdds_python-repos/action.yml new file mode 100644 index 00000000..d1496589 --- /dev/null +++ b/.github/actions/fetch-fastdds_python-repos/action.yml @@ -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 .. diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index fe6725d1..bae4bef8 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -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: @@ -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 @@ -31,7 +47,7 @@ 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 @@ -39,10 +55,11 @@ jobs: 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: @@ -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 @@ -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: