Skip to content

Commit

Permalink
Add macOS to gihub actions testing (#197)
Browse files Browse the repository at this point in the history
* Refs #20091: Add macOS to gihub actions testing

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20091: Fix python version

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20091: Build Gtest in macos

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20091: Cleanup workflow

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20091: Add colcon.meta for googletest

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20091: Set eProsima-CI actions to v0

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

---------

Signed-off-by: EduPonz <eduardoponz@eprosima.com>
  • Loading branch information
EduPonz committed Feb 20, 2024
1 parent 7417ff1 commit 835500b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/config/colcon.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
names:
googletest-distribution:
cmake-args:
- "-Dgtest_force_shared_crt=ON"
- "-DBUILD_SHARED_LIBS=ON"
- "-DBUILD_GMOCK=ON"
34 changes: 18 additions & 16 deletions .github/workflows/fastcdr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
push:
branches:
- master
- 1.1.x
- 1.0.x

workflow_dispatch:
Expand All @@ -30,6 +31,7 @@ on:
pull_request:
branches:
- master
- 1.1.x
- 1.0.x
paths-ignore:
- '**.md'
Expand All @@ -54,12 +56,24 @@ jobs:
- '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
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
Expand All @@ -69,22 +83,10 @@ jobs:
- name: Install Colcon dependencies
uses: eProsima/eProsima-CI/multiplatform/install_colcon@v0

# Temporal step as this platform will be discontinued soon
- name: Install Gtest Backwards Compatibility
if: ${{ matrix.runner-image == 'ubuntu-20.04' }}
run: |
git clone --branch release-1.12.1 https://github.com/google/googletest.git && \
colcon build \
--event-handlers=console_direct+ \
--packages-select googletest-distribution
- name: Install Gtest
if: ${{ matrix.runner-image != 'ubuntu-20.04' }}
uses: eProsima/eProsima-CI/multiplatform/install_gtest@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
Expand All @@ -105,7 +107,7 @@ jobs:
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 }}"
junit_reports_dir: ${{ steps.test.outputs.ctest_results_path }}
print_summary: 'True'
show_failed: 'True'
show_disabled: 'False'
Expand All @@ -123,7 +125,7 @@ jobs:

- name: Archive Test Results
if: always()
uses: actions/upload-artifact@v1
uses: eProsima/eProsima-CI/external/upload-artifact@v0
with:
name: test-results-${{ matrix.runner-image }}
path: log/latest_test/fastcdr

0 comments on commit 835500b

Please sign in to comment.