test #850
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
windows-build-test: | |
runs-on: windows-2019 | |
env: | |
CXXFLAGS: /MP | |
OPENSSL64_ROOT: "C:/Program Files/OpenSSL-Win64" | |
steps: | |
- uses: eProsima/eProsima-CI/windows/install_openssl@v0 | |
- name: Install swig | |
shell: pwsh | |
run: choco install swig --allow-downgrade --version=4.0.2.04082020 | |
- uses: eProsima/eProsima-CI/external/setup-python@v0 | |
with: | |
python-version: '3.11' | |
- uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0 | |
with: | |
packages: pytest pywin32 vcstool | |
- 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: eProsima/eProsima-CI/external/get-cmake@v0 | |
with: | |
cmakeVersion: 3.22.6 | |
- name: Setting ninja | |
id: ninja | |
if: github.event.schedule == '' | |
shell: pwsh | |
run: | | |
echo "cmake_generator=ninja" >> $Env:GITHUB_OUTPUT | |
- name: Setup ccache | |
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 | |
with: | |
install_ccache: false | |
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 }} | |
- 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 | |
- name: Upload Logs | |
uses: actions/upload-artifact@v1 | |
with: | |
name: colcon-logs-windows | |
path: log/ | |
if: always() | |
ubuntu-build-test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: eProsima/eProsima-CI/external/checkout@v0 | |
with: | |
path: src/fastdds_python | |
- uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 | |
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: eProsima/eProsima-CI/external/get-cmake@v0 | |
with: | |
cmakeVersion: 3.22.6 | |
- name: Setup ccache | |
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 | |
- 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 | |
- name: Upload Logs | |
uses: actions/upload-artifact@v1 | |
with: | |
name: colcon-logs-ubuntu | |
path: log/ | |
if: always() |