Skip to content

Commit 5644a49

Browse files
MiguelCompanymergify[bot]
authored andcommitted
Upgrade to macOS Sequoia (#6070)
* Refs #23750. Change runner in CI. Signed-off-by: Miguel Company <[email protected]> * Refs #23750. Update platform support. Signed-off-by: Miguel Company <[email protected]> * Refs #23750. Apply suggestion. Signed-off-by: Miguel Company <[email protected]> * Refs #23750. Update to macos-15. Signed-off-by: Miguel Company <[email protected]> * Refs #23750. Do not build IPv6 blackbox tests in Mac. Signed-off-by: Miguel Company <[email protected]> * Refs #23750. Exclude whitelist tests. Signed-off-by: Miguel Company <[email protected]> * Refs #23750. Fix DataWriterTests. Signed-off-by: Miguel Company <[email protected]> * Refs #23750. Change blacklisting of IPv6 test. Signed-off-by: Miguel Company <[email protected]> * Refs #23750. Remove multicast from DDSPersistenceTests. Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]> (cherry picked from commit 9ecbd27) # Conflicts: # .github/workflows/reusable-mac-ci.yml # PLATFORM_SUPPORT.md # test/blackbox/common/DDSBlackboxTestsPersistence.cpp # test/unittest/dds/publisher/DataWriterTests.cpp
1 parent ced3b6f commit 5644a49

File tree

4 files changed

+202
-21
lines changed

4 files changed

+202
-21
lines changed

.github/workflows/reusable-mac-ci.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ on:
2929
type: boolean
3030
default: false
3131

32+
env:
33+
test_blocklist: 'InterfaceWhitelist|send_to_allowed_interface|v6'
34+
3235
defaults:
3336
run:
3437
shell: bash
3538

3639
jobs:
40+
<<<<<<< HEAD
3741
reusable-mac-ci:
3842
# As explained in https://github.com/actions/runner-images/tree/main?tab=readme-ov-file#available-images,
3943
# *-latest images are not always the latest available versions. The minimum version of the macOS image
@@ -42,6 +46,10 @@ jobs:
4246
# so we'll use that one for now, as clang 15 is the supported compiler for Fast DDS in macOS.
4347
# (see https://github.com/eProsima/Fast-DDS/blob/master/PLATFORM_SUPPORT.md#compilers)
4448
runs-on: macos-13
49+
=======
50+
fastdds_build:
51+
runs-on: macos-15-intel
52+
>>>>>>> 9ecbd27a8 (Upgrade to macOS Sequoia (#6070))
4553
strategy:
4654
fail-fast: false
4755
matrix:
@@ -86,6 +94,116 @@ jobs:
8694
with:
8795
api_token: ${{ secrets.GITHUB_TOKEN }}
8896

97+
<<<<<<< HEAD
98+
=======
99+
# TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group,
100+
# which entails logout/login or rebooting the machine. This is not feasible in a CI environment.
101+
102+
- name: Get Fast CDR branch
103+
id: get_fastcdr_branch
104+
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
105+
with:
106+
remote_repository: eProsima/Fast-CDR
107+
fallback_branch: ${{ inputs.fastcdr_branch }}
108+
109+
- name: Download Fast CDR
110+
uses: eProsima/eProsima-CI/external/checkout@v0
111+
with:
112+
repository: eProsima/Fast-CDR
113+
path: ${{ github.workspace }}/src/fastcdr
114+
ref: ${{ steps.get_fastcdr_branch.outputs.deduced_branch }}
115+
116+
- name: Fetch Fast DDS dependencies
117+
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
118+
with:
119+
vcs_repos_file: ${{ github.workspace }}/src/fastdds/fastdds.repos
120+
destination_workspace: src
121+
skip_existing: 'true'
122+
123+
- name: Fetch Fast DDS CI dependencies
124+
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
125+
with:
126+
vcs_repos_file: ${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_test.repos
127+
destination_workspace: src
128+
skip_existing: 'true'
129+
130+
# TODO(eduponz): There is a warning in clang >= 16 regarding enum-constexpr-conversion:
131+
# - Issue: https://github.com/boostorg/mpl/issues/69.
132+
# We are disabling the warning for now, as the proposed solution does not fix the issue:
133+
# - Not working solution: https://github.com/macports/macports-ports/pull/21839/files
134+
- name: Colcon build
135+
continue-on-error: false
136+
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
137+
with:
138+
colcon_meta_file: ${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_build.meta ${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_test.meta
139+
colcon_build_args: ${{ inputs.colcon-args }}
140+
cmake_args: ${{ inputs.cmake-args }}
141+
cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall -Wno-enum-constexpr-conversion"
142+
cmake_build_type: ${{ matrix.cmake-build-type }}
143+
workspace: ${{ github.workspace }}
144+
145+
- name: Upload build artifacts
146+
if: ${{ inputs.run-tests == true }}
147+
uses: eProsima/eProsima-CI/external/upload-artifact@v0
148+
with:
149+
name: fastdds_build_${{ inputs.label }}
150+
path: ${{ github.workspace }}
151+
152+
fastdds_test:
153+
needs: fastdds_build
154+
name: fastdds_test (${{ matrix.cmake_build_type }})
155+
runs-on: macos-15-intel
156+
strategy:
157+
fail-fast: false
158+
matrix:
159+
cmake-build-type:
160+
- 'RelWithDebInfo'
161+
steps:
162+
- name: Download build artifacts
163+
if: ${{ inputs.run-tests == true }}
164+
uses: eProsima/eProsima-CI/external/download-artifact@v0
165+
with:
166+
name: fastdds_build_${{ inputs.label }}
167+
path: ${{ github.workspace }}
168+
169+
- name: Fix permissions after downloading build artifacts
170+
if: ${{ inputs.run-tests == true }}
171+
run: |
172+
find ${{ github.workspace }}/build -type f -name "*" -exec chmod +x {} \;
173+
find ${{ github.workspace }}/install -type f -name "*" -exec chmod +x {} \;
174+
175+
- name: Install Fix Python version
176+
if: ${{ inputs.run-tests == true }}
177+
uses: eProsima/eProsima-CI/external/setup-python@v0
178+
with:
179+
python-version: '3.11'
180+
181+
- name: Get minimum supported version of CMake
182+
if: ${{ inputs.run-tests == true }}
183+
uses: eProsima/eProsima-CI/external/get-cmake@v0
184+
with:
185+
cmakeVersion: '3.22.6'
186+
187+
- name: Install brew dependencies
188+
if: ${{ inputs.run-tests == true }}
189+
uses: eProsima/eProsima-CI/macos/install_brew_packages@v0
190+
with:
191+
packages: llvm tinyxml2 [email protected]
192+
update: false
193+
upgrade: false
194+
195+
- name: Install colcon
196+
if: ${{ inputs.run-tests == true }}
197+
uses: eProsima/eProsima-CI/multiplatform/install_colcon@v0
198+
199+
- name: Install Python dependencies
200+
if: ${{ inputs.run-tests == true }}
201+
uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
202+
with:
203+
packages: vcstool xmlschema psutil
204+
upgrade: false
205+
206+
>>>>>>> 9ecbd27a8 (Upgrade to macOS Sequoia (#6070))
89207
- name: Set up hosts file for DNS testing
90208
run: |
91209
sudo echo "" | sudo tee -a /etc/hosts
@@ -138,8 +256,15 @@ jobs:
138256
colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.meta
139257
colcon_test_args: ${{ inputs.colcon-args }}
140258
colcon_test_args_default: --event-handlers=console_direct+
259+
<<<<<<< HEAD
141260
ctest_args: ${{ inputs.ctest-args }}
142261
packages_names: fastrtps
262+
=======
263+
ctest_args: >
264+
${{ inputs.ctest-args }}
265+
${{ format('-E "{0}"', env.test_blocklist) }}
266+
packages_names: fastdds
267+
>>>>>>> 9ecbd27a8 (Upgrade to macOS Sequoia (#6070))
143268
workspace: ${{ github.workspace }}
144269
test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }}
145270

PLATFORM_SUPPORT.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,23 @@ Community members may provide assistance with these platforms.
3131

3232
## Platforms
3333

34+
<<<<<<< HEAD
3435
|Architecture|Ubuntu Focal (20.04)|MacOS Mojave (10.14)|Windows 10 (VS2019)|Debian Buster (10)|
3536
|------------|--------------------|--------------------|-------------------|------------------|
3637
|amd64 |Tier 1 [^a][^s] |Tier 1 [^s] |Tier 1 [^a][^s] |Tier 3 [^s] |
3738
|amd32 | | |Tier 2 [^a][^s] | |
3839
|arm64 |Tier 1 [^a][^s] | | |Tier 3 [^s] |
3940
|arm32 |Tier 3 [^s] | | |Tier 3 [^s] |
41+
=======
42+
|Architecture|Ubuntu Noble (24.04)|Ubuntu Jammy (22.04)|MacOS Sequoia (15)|Windows 10 (VS2019)|Windows 11 (VS2022)|Debian Buster (10)|Android 12 |Android 13 | QNX 7.1 |
43+
|------------|--------------------|--------------------|------------------|-------------------|-------------------|------------------|-----------|-----------|-----------|
44+
|amd64 |Tier 3 [^a][^s] |Tier 1 [^a][^s] |Tier 1 [^s] |Tier 1 [^a][^s] |Tier 1 [^a][^s] |Tier 3 [^s] |Tier 3 [^s]|Tier 3 [^s]|Tier 3 [^s]|
45+
|amd32 | | | |Tier 3 [^a][^s] |Tier 3 [^a][^s] | | | | |
46+
|arm64 |Tier 3 [^a][^s] |Tier 1 [^a][^s] | | | |Tier 3 [^s] |Tier 3 [^s]|Tier 3 [^s]|Tier 3 [^s]|
47+
|arm32 | |Tier 3 [^s] | | | |Tier 3 [^s] |Tier 3 [^s]|Tier 3 [^s]| |
48+
49+
More information about Platforms support and eProsima products compatibility can be found on [Fast DDS Documentation](https://fast-dds.docs.eprosima.com/en/latest/notes/versions.html#dependencies-and-compatibilities).
50+
>>>>>>> 9ecbd27a8 (Upgrade to macOS Sequoia (#6070))
4051
4152
[^a]: Binary releases are provided as a single archive per platform.
4253
[^s]: Compilation from source.
@@ -45,8 +56,13 @@ Community members may provide assistance with these platforms.
4556

4657
Tier 1 compilers and minimum supported versions:
4758

59+
<<<<<<< HEAD
4860
* GCC 9
4961
* Clang 12
62+
=======
63+
* GCC 11.4 [^d]
64+
* Clang 16
65+
>>>>>>> 9ecbd27a8 (Upgrade to macOS Sequoia (#6070))
5066
* MSVC v142 (Visual Studio 2019)
5167

5268
Tier 2 compilers:

test/blackbox/common/DDSBlackboxTestsPersistence.cpp

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -369,16 +369,6 @@ TEST_P(PersistenceLargeData, PubSubAsReliablePubPersistentWithStaticDiscovery)
369369
R_UNICAST_PORT_RANDOM_NUMBER_STR = "7421";
370370
}
371371
int32_t R_UNICAST_PORT_RANDOM_NUMBER = stoi(R_UNICAST_PORT_RANDOM_NUMBER_STR);
372-
value = std::getenv("MULTICAST_PORT_RANDOM_NUMBER");
373-
if (value != nullptr)
374-
{
375-
MULTICAST_PORT_RANDOM_NUMBER_STR = value;
376-
}
377-
else
378-
{
379-
MULTICAST_PORT_RANDOM_NUMBER_STR = "7400";
380-
}
381-
int32_t MULTICAST_PORT_RANDOM_NUMBER = stoi(MULTICAST_PORT_RANDOM_NUMBER_STR);
382372

383373
PubSubWriter<HelloWorldPubSubType> writer(TEST_TOPIC_NAME);
384374

@@ -390,18 +380,16 @@ TEST_P(PersistenceLargeData, PubSubAsReliablePubPersistentWithStaticDiscovery)
390380
IPLocator::setIPv4(LocatorBuffer, 127, 0, 0, 1);
391381
WriterUnicastLocators.push_back(LocatorBuffer);
392382

393-
LocatorList_t WriterMulticastLocators;
394-
395-
LocatorBuffer.port = static_cast<uint16_t>(MULTICAST_PORT_RANDOM_NUMBER);
396-
WriterMulticastLocators.push_back(LocatorBuffer);
397-
398383
writer
399384
.history_kind(eprosima::fastrtps::KEEP_ALL_HISTORY_QOS)
400385
.reliability(eprosima::fastrtps::RELIABLE_RELIABILITY_QOS)
401386
.make_persistent(db_file_name(), "78.73.69.74.65.72.5f.70.65.72.73.5f|67.75.69.1")
402387
.static_discovery("file://PubSubWriterPersistence.xml")
403388
.unicastLocatorList(WriterUnicastLocators)
389+
<<<<<<< HEAD
404390
.multicastLocatorList(WriterMulticastLocators)
391+
=======
392+
>>>>>>> 9ecbd27a8 (Upgrade to macOS Sequoia (#6070))
405393
.setPublisherIDs(1, 2)
406394
.setManualTopicName(std::string("BlackBox_StaticDiscovery_") + TOPIC_RANDOM_NUMBER)
407395
.userData({'V', 'G', 'W', 0x78, 0x73, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x5f, 0x67,
@@ -417,19 +405,17 @@ TEST_P(PersistenceLargeData, PubSubAsReliablePubPersistentWithStaticDiscovery)
417405
LocatorBuffer.port = static_cast<uint16_t>(R_UNICAST_PORT_RANDOM_NUMBER);
418406
ReaderUnicastLocators.push_back(LocatorBuffer);
419407

420-
LocatorList_t ReaderMulticastLocators;
421-
422-
LocatorBuffer.port = static_cast<uint16_t>(MULTICAST_PORT_RANDOM_NUMBER);
423-
ReaderMulticastLocators.push_back(LocatorBuffer);
424-
425408
reader
426409
.history_kind(eprosima::fastrtps::KEEP_LAST_HISTORY_QOS)
427410
.history_depth(10)
428411
.reliability(eprosima::fastrtps::RELIABLE_RELIABILITY_QOS)
429412
.make_persistent(db_file_name(), "78.73.69.74.65.72.5f.70.65.72.73.5f|67.75.69.3")
430413
.static_discovery("file://PubSubReaderPersistence.xml")
431414
.unicastLocatorList(ReaderUnicastLocators)
415+
<<<<<<< HEAD
432416
.multicastLocatorList(ReaderMulticastLocators)
417+
=======
418+
>>>>>>> 9ecbd27a8 (Upgrade to macOS Sequoia (#6070))
433419
.setSubscriberIDs(3, 4)
434420
.setManualTopicName(std::string("BlackBox_StaticDiscovery_") + TOPIC_RANDOM_NUMBER)
435421
.init();
@@ -450,7 +436,7 @@ TEST_P(PersistenceLargeData, PubSubAsReliablePubPersistentWithStaticDiscovery)
450436

451437
reader.startReception(unreceived_data);
452438

453-
// Wait expecting not receiving data.
439+
// Wait expecting receiving data.
454440
ASSERT_EQ(10u, reader.block_for_all(std::chrono::seconds(1)));
455441

456442

test/unittest/dds/publisher/DataWriterTests.cpp

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ TEST(DataWriterTests, Write)
729729

730730
FooType data;
731731
data.message("HelloWorld");
732+
<<<<<<< HEAD
732733
ASSERT_TRUE(datawriter->write(&data, fastrtps::rtps::c_InstanceHandle_Unknown) ==
733734
ReturnCode_t::RETCODE_OK);
734735
ASSERT_TRUE(datawriter->write(&data, participant->get_instance_handle()) ==
@@ -738,6 +739,59 @@ TEST(DataWriterTests, Write)
738739
ASSERT_TRUE(participant->delete_topic(topic) == ReturnCode_t::RETCODE_OK);
739740
ASSERT_TRUE(participant->delete_publisher(publisher) == ReturnCode_t::RETCODE_OK);
740741
ASSERT_TRUE(DomainParticipantFactory::get_instance()->delete_participant(participant) == ReturnCode_t::RETCODE_OK);
742+
=======
743+
ASSERT_FALSE(datawriter->write(nullptr, HANDLE_NIL) == RETCODE_OK);
744+
ASSERT_TRUE(datawriter->write(&data, HANDLE_NIL) == RETCODE_OK);
745+
ASSERT_TRUE(datawriter->write(&data, datawriter->get_instance_handle()) ==
746+
RETCODE_PRECONDITION_NOT_MET);
747+
748+
ASSERT_TRUE(publisher->delete_datawriter(datawriter) == RETCODE_OK);
749+
ASSERT_TRUE(participant->delete_topic(topic) == RETCODE_OK);
750+
ASSERT_TRUE(participant->delete_publisher(publisher) == RETCODE_OK);
751+
ASSERT_TRUE(DomainParticipantFactory::get_instance()->delete_participant(participant) == RETCODE_OK);
752+
}
753+
754+
TEST(DataWriterTests, WriteWithTimestamp)
755+
{
756+
DomainParticipant* participant =
757+
DomainParticipantFactory::get_instance()->create_participant(0, PARTICIPANT_QOS_DEFAULT);
758+
ASSERT_NE(participant, nullptr);
759+
760+
Publisher* publisher = participant->create_publisher(PUBLISHER_QOS_DEFAULT);
761+
ASSERT_NE(publisher, nullptr);
762+
763+
TypeSupport type(new TopicDataTypeMock());
764+
type.register_type(participant);
765+
766+
Topic* topic = participant->create_topic("footopic", type.get_type_name(), TOPIC_QOS_DEFAULT);
767+
ASSERT_NE(topic, nullptr);
768+
769+
DataWriter* datawriter = publisher->create_datawriter(topic, DATAWRITER_QOS_DEFAULT);
770+
ASSERT_NE(datawriter, nullptr);
771+
772+
eprosima::fastdds::dds::Time_t ts{ 0, 1 };
773+
774+
FooType data;
775+
data.message("HelloWorld");
776+
777+
// 1. Calling write with nullptr data returns RETCODE_BAD_PARAMETER
778+
ASSERT_EQ(RETCODE_BAD_PARAMETER, datawriter->write_w_timestamp(nullptr, HANDLE_NIL, ts));
779+
// 2. Calling write with an invalid timestamps returns RETCODE_BAD_PARAMETER
780+
EXPECT_EQ(RETCODE_BAD_PARAMETER,
781+
datawriter->write_w_timestamp(&data, HANDLE_NIL, fastdds::dds::c_TimeInfinite));
782+
EXPECT_EQ(RETCODE_BAD_PARAMETER,
783+
datawriter->write_w_timestamp(&data, HANDLE_NIL, fastdds::dds::c_TimeInvalid));
784+
// 3. Calling write with a wrong instance handle returns RETCODE_PRECONDITION_NOT_MET
785+
ASSERT_EQ(RETCODE_PRECONDITION_NOT_MET,
786+
datawriter->write_w_timestamp(&data, datawriter->get_instance_handle(), ts));
787+
// 4. Correct case
788+
ASSERT_EQ(RETCODE_OK, datawriter->write_w_timestamp(&data, HANDLE_NIL, ts));
789+
790+
ASSERT_TRUE(publisher->delete_datawriter(datawriter) == RETCODE_OK);
791+
ASSERT_TRUE(participant->delete_topic(topic) == RETCODE_OK);
792+
ASSERT_TRUE(participant->delete_publisher(publisher) == RETCODE_OK);
793+
ASSERT_TRUE(DomainParticipantFactory::get_instance()->delete_participant(participant) == RETCODE_OK);
794+
>>>>>>> 9ecbd27a8 (Upgrade to macOS Sequoia (#6070))
741795
}
742796

743797
void set_listener_test (

0 commit comments

Comments
 (0)