Fast-CDR-test #866
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
# CI for Fast CDR repository | |
# The Action is triggered with a PR or push and every night at 00:00 | |
# Additionally, it can be also triggered manually | |
name: Fast-CDR-test | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
branches: | |
- master | |
- 2.2.x | |
- 2.1.x | |
- 1.1.x | |
- 1.0.x | |
workflow_dispatch: | |
inputs: | |
cmake_args: | |
description: 'Optional CMake arguments' | |
required: false | |
type: string | |
default: '' | |
ctest_args: | |
description: 'Optional CTest arguments' | |
required: false | |
type: string | |
default: '' | |
pull_request: | |
branches: | |
- master | |
- 2.2.x | |
- 2.1.x | |
- 1.1.x | |
- 1.0.x | |
paths-ignore: | |
- '**.md' | |
- '**.txt' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
name: Colcon build and test | |
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'no-test') || | |
contains(github.event.pull_request.labels.*.name, 'skip-ci')) }} | |
runs-on: ${{ matrix.runner-image }} | |
strategy: | |
fail-fast: false | |
matrix: | |
runner-image: | |
- 'ubuntu-20.04' | |
- 'ubuntu-22.04' | |
- 'windows-2019' | |
- 'macos-13' | |
steps: | |
- name: Sync eProsima/Fast-CDR repository | |
uses: eProsima/eProsima-CI/external/checkout@v0 | |
with: | |
path: src/Fast-CDR | |
- name: Sync GTest | |
uses: eProsima/eProsima-CI/external/checkout@v0 | |
with: | |
path: src/googletest | |
repository: google/googletest | |
ref: 'release-1.12.1' | |
- uses: eProsima/eProsima-CI/external/setup-python@v0 | |
with: | |
python-version: '3.11' | |
- name: Get minimum supported version of CMake | |
uses: eProsima/eProsima-CI/external/get-cmake@v0 | |
with: | |
cmakeVersion: '3.22.6' | |
- name: Install Colcon dependencies | |
uses: eProsima/eProsima-CI/multiplatform/install_colcon@v0 | |
- name: Colcon build | |
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 | |
with: | |
colcon_meta_file: ${{ github.workspace }}/src/Fast-CDR/.github/workflows/config/colcon.meta | |
colcon_build_args_default: --event-handlers=console_direct+ | |
cmake_args: ${{ inputs.cmake_args }} | |
cmake_args_default: -DBUILD_TESTING=ON | |
cmake_build_type: RelWithDebInfo | |
workspace: ${{ github.workspace }} | |
- name: Colcon test | |
id: test | |
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 | |
with: | |
colcon_test_args_default: --event-handlers=console_direct+ --return-code-on-test-failure | |
ctest_args: ${{ inputs.ctest_args }} | |
ctest_args_default: --repeat until-pass:3 --timeout 300 --output-junit junit/junit.xml | |
packages_names: fastcdr | |
workspace: ${{ github.workspace }} | |
- name: Test summary | |
uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0 | |
if: ${{ !cancelled() && !contains(github.event.pull_request.labels.*.name, 'no-test') }} | |
with: | |
junit_reports_dir: ${{ steps.test.outputs.ctest_results_path }} | |
print_summary: 'True' | |
show_failed: 'True' | |
show_disabled: 'False' | |
show_skipped: 'False' | |
- name: Test Report | |
uses: eProsima/eProsima-CI/external/test-reporter@v0 | |
if: ${{ !cancelled() && !contains(github.event.pull_request.labels.*.name, 'no-test') }} | |
with: | |
name: "Report: ${{ matrix.runner-image }}" | |
path: "${{ steps.test.outputs.ctest_results_path }}*.xml" | |
working-directory: 'src/Fast-CDR' | |
path-replace-backslashes: 'true' | |
list-tests: 'failed' | |
- name: Archive Test Results | |
if: always() | |
uses: eProsima/eProsima-CI/external/upload-artifact@v0 | |
with: | |
name: test-results-${{ matrix.runner-image }} | |
path: log/latest_test/fastcdr |