Skip to content

Commit

Permalink
pass target framework that should be used for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmann-stefan committed Apr 15, 2023
1 parent 44d23d0 commit f067e6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ jobs:
os: ['ubuntu-20.04', 'ubuntu-22.04']
include:
- os: ubuntu-20.04
test_target_framework: netcoreapp2.0
ros_distribution: foxy
ros_version: 2
- os: ubuntu-22.04
test_target_framework: net6
ros_distribution: humble
ros_version: 2

runs-on: ${{ matrix.os }}
env:
RCLDOTNET_TEST_TARGET_FRAMEWORK: ${{ matrix.test_target_framework }}

steps:
- name: Checkout source
Expand Down
5 changes: 5 additions & 0 deletions rcldotnet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ if(BUILD_TESTING)
${builtin_interfaces_ASSEMBLIES_DLL}
)

# Used by CI to test the different target frameworks in a matrix.
if(DEFINED ENV{RCLDOTNET_TEST_TARGET_FRAMEWORK})
set(CSHARP_TARGET_FRAMEWORK ENV{RCLDOTNET_TEST_TARGET_FRAMEWORK})
endif()

add_dotnet_test(test_messages
${CS_SOURCES}
test/test_messages.cs
Expand Down

0 comments on commit f067e6e

Please sign in to comment.