Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
Signed-off-by: EduPonz <[email protected]>
  • Loading branch information
EduPonz committed Dec 13, 2023
1 parent 8c440a0 commit 4cce2f2
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 63 deletions.
23 changes: 0 additions & 23 deletions .github/actions/fetch-fastdds_python-repos/action.yml

This file was deleted.

101 changes: 61 additions & 40 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
fastdds_branch:
description: 'Fast-DDS branch to be used'
required: false
default: 'master'
default: '2.12.x'
pull_request:
push:
branches:
Expand Down Expand Up @@ -47,7 +47,6 @@ jobs:
Set-Item -Force -Path "env:PATH" -Value "C:\ProgramData\chocolatey\lib\asio;C:\ProgramData\chocolatey\lib\tinyxml2;C:\ProgramData\chocolatey\lib\tinyxml2\lib;$env:PATH"
echo "PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install swig
shell: pwsh
run: choco install swig --allow-downgrade --version=4.0.2.04082020
Expand All @@ -66,11 +65,23 @@ jobs:
with:
path: src/fastdds_python

- uses: ./src/fastdds_python/.github/actions/fetch-fastdds_python-repos
- uses: eProsima/eProsima-CI/external/checkout@v0
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' }}
repository: eProsima/foonathan_memory_vendor
path: src/foonathan_memory_vendor
ref: ${{ github.event.inputs.foonathan_memory_vendor_branch }}

- uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-CDR
path: src/fastcdr
ref: ${{ github.event.inputs.foonathan_memory_vendor_branch }}

- uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-DDS
path: src/fastdds
ref: ${{ github.event.inputs.fastdds_branch }}

- uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
Expand All @@ -89,23 +100,22 @@ jobs:
windows_compile_environment: msvc

- name: Build workspace
shell: pwsh
run: |
$installpath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"
$modulepath = "$installpath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Import-Module $modulepath
Enter-VsDevShell -SetDefaultWindowTitle -InstallPath $installpath `
-StartInPath (pwd) -DevCmdArguments '/arch=x64 /host_arch=x64';
cmake --version
colcon build --executor parallel --event-handlers console_direct+ desktop_notification- `
--metas ./src/fastdds_python/.github/workflows/test.meta `
--mixin rel-with-deb-info ccache ${{ steps.ninja.outputs.cmake_generator }}
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ./src/fastdds_python/.github/workflows/test.meta
colcon_build_args: --executor parallel desktop_notification- --mixin ccache ${{ steps.ninja.outputs.cmake_generator }}
colcon_build_args_default: --event-handlers=console_direct+
cmake_build_type: RelWithDebInfo
workspace: ${{ github.workspace }}

- name: Run tests
shell: pwsh
run: |
colcon test --packages-select fastdds_python --event-handlers console_direct+ desktop_notification- `
--return-code-on-test-failure --ctest-args --timeout 60
id: test
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
colcon_test_args: ${{ inputs.colcon-args }}
colcon_test_args_default: --packages-select fastdds_python --event-handlers console_direct+ desktop_notification- --return-code-on-test-failure
ctest_args_default: --timeout 60
workspace: ${{ github.workspace }}

- name: Upload Logs
uses: actions/upload-artifact@v1
Expand All @@ -131,11 +141,23 @@ jobs:

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

- uses: ./src/fastdds_python/.github/actions/fetch-fastdds_python-repos
- uses: eProsima/eProsima-CI/external/checkout@v0
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' }}
repository: eProsima/foonathan_memory_vendor
path: src/foonathan_memory_vendor
ref: ${{ github.event.inputs.foonathan_memory_vendor_branch }}

- uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-CDR
path: src/fastcdr
ref: ${{ github.event.inputs.foonathan_memory_vendor_branch }}

- uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-DDS
path: src/fastdds
ref: ${{ github.event.inputs.fastdds_branch }}

- uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
Expand All @@ -145,23 +167,22 @@ jobs:
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0

- name: Build workspace
run: |
cmake --version
colcon build \
--event-handlers=console_direct+ \
--metas ./src/fastdds_python/.github/workflows/test.meta \
--mixin rel-with-deb-info ccache
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ./src/fastdds_python/.github/workflows/test.meta
colcon_build_args: --executor parallel desktop_notification- --mixin ccache
colcon_build_args_default: --event-handlers=console_direct+
cmake_build_type: RelWithDebInfo
workspace: ${{ github.workspace }}

- name: Run tests
run: |
source install/setup.bash && \
colcon test \
--packages-select fastdds_python \
--event-handlers=console_direct+ \
--return-code-on-test-failure \
--ctest-args \
--output-on-failure \
--timeout 60
id: test
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
colcon_test_args: ${{ inputs.colcon-args }}
colcon_test_args_default: --packages-select fastdds_python --event-handlers console_direct+ desktop_notification- --return-code-on-test-failure
ctest_args_default: --timeout 60
workspace: ${{ github.workspace }}

- name: Upload Logs
uses: actions/upload-artifact@v1
Expand Down

0 comments on commit 4cce2f2

Please sign in to comment.