Skip to content

Commit 4b25d6e

Browse files
authored
PR #14407 from remibettan: Adding GHA for mac DDS
2 parents 41b747b + 95daa1b commit 4b25d6e

19 files changed

+239
-175
lines changed

.github/workflows/buildsCI.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -553,20 +553,13 @@ jobs:
553553
554554
#--------------------------------------------------------------------------------
555555

556-
Mac_cpp:
557-
runs-on: macos-14
556+
Mac_DDS_cpp:
557+
runs-on: macos-15
558558
timeout-minutes: 60
559559

560560
steps:
561561
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4
562562

563-
- name: Check_API
564-
shell: bash
565-
run: |
566-
cd scripts
567-
./api_check.sh
568-
cd ..
569-
570563
- name: Prebuild
571564
run: |
572565
mkdir build
@@ -582,7 +575,7 @@ jobs:
582575
# We use "greadlink -f" which is mac-os parallel command to "readlink -f" from Linux (-f to convert relative link to absolute link)
583576
export OPENSSL_ROOT_DIR=`greadlink -f /usr/local/opt/[email protected]`
584577
echo "OPENSSL_ROOT_DIR = ${OPENSSL_ROOT_DIR}"
585-
cmake .. -DCMAKE_BUILD_TYPE=${{env.LRS_BUILD_CONFIG}} -DBUILD_EXAMPLES=true -DBUILD_WITH_OPENMP=false -DHWM_OVER_XU=false -DCHECK_FOR_UPDATES=true
578+
cmake .. -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=${{env.LRS_BUILD_CONFIG}} -DBUILD_EXAMPLES=true -DBUILD_WITH_OPENMP=false -DHWM_OVER_XU=false -DCHECK_FOR_UPDATES=true -DBUILD_WITH_DDS=true
586579
cmake --build . -- -j4
587580
ls
588581

CMakeLists.txt

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,11 @@ include(third-party/CMakeLists.txt)
7171
target_link_libraries( ${LRS_TARGET} PUBLIC rsutils )
7272

7373
if(BUILD_WITH_DDS)
74-
if (CMAKE_SYSTEM MATCHES "Windows" OR CMAKE_SYSTEM MATCHES "Linux")
75-
76-
message(STATUS "Building with FastDDS")
77-
include(CMake/external_foonathan_memory.cmake)
78-
include(CMake/external_fastdds.cmake)
74+
message(STATUS "Building with FastDDS")
75+
include(CMake/external_foonathan_memory.cmake)
76+
include(CMake/external_fastdds.cmake)
7977

80-
target_link_libraries( ${LRS_TARGET} PRIVATE realdds )
81-
82-
else()
83-
MESSAGE(STATUS "Turning off `BUILD_WITH_DDS` as it's only supported on Windows & Linux and not on ${CMAKE_SYSTEM}")
84-
set(BUILD_WITH_DDS OFF)
85-
endif()
78+
target_link_libraries( ${LRS_TARGET} PRIVATE realdds )
8679
endif()
8780

8881
# configure the project according to OS specific requirments

common/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ set(COMMON_SRC
6565
"${CMAKE_CURRENT_LIST_DIR}/hdr-model.cpp"
6666
"${CMAKE_CURRENT_LIST_DIR}/embedded-filter-model.h"
6767
"${CMAKE_CURRENT_LIST_DIR}/embedded-filter-model.cpp"
68+
"${CMAKE_CURRENT_LIST_DIR}/textual-icons.h"
6869
)
6970

7071
set(SW_UPDATE_FILES

common/calibration-model.cpp

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ void calibration_model::d400_update(ux_window& window, std::string& error_messag
286286
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 5);
287287

288288
ImGui::SetCursorPosX(w / 2 - 260 / 2);
289-
if (ImGui::Button(u8"\uF07C Load...", ImVec2(70, 30)))
289+
std::string load_str = std::string(rsutils::string::from() << textual_icons::folder_open << " Load...");
290+
if (ImGui::Button(load_str.c_str(), ImVec2(70, 30)))
290291
{
291292
try
292293
{
@@ -338,7 +339,8 @@ void calibration_model::d400_update(ux_window& window, std::string& error_messag
338339
RsImGui::CustomTooltip("%s", "Load calibration from file");
339340
}
340341
ImGui::SameLine();
341-
if (ImGui::Button(u8"\uF0C7 Save As...", ImVec2(100, 30)))
342+
std::string save_str = std::string(rsutils::string::from() << textual_icons::folder_open << " Save As...");
343+
if (ImGui::Button(save_str.c_str(), ImVec2(100, 30)))
342344
{
343345
try
344346
{
@@ -396,7 +398,8 @@ void calibration_model::d400_update(ux_window& window, std::string& error_messag
396398
ImGui::SameLine();
397399
if (_accept)
398400
{
399-
if (ImGui::Button(u8"\uF275 Restore Factory", ImVec2(120, 30)))
401+
std::string restore_str = std::string(rsutils::string::from() << textual_icons::industry << " Restore Factory");
402+
if (ImGui::Button(restore_str.c_str(), ImVec2(120, 30)))
400403
{
401404
try
402405
{
@@ -430,7 +433,8 @@ void calibration_model::d400_update(ux_window& window, std::string& error_messag
430433
ImGui::PushStyleColor(ImGuiCol_Text, grey);
431434
ImGui::PushStyleColor(ImGuiCol_TextSelectedBg, grey);
432435

433-
ImGui::Button(u8"\uF275 Restore Factory", ImVec2(120, 30));
436+
std::string restore_str = std::string(rsutils::string::from() << textual_icons::industry << " Restore Factory");
437+
ImGui::Button(restore_str.c_str(), ImVec2(120, 30));
434438
if (ImGui::IsItemHovered())
435439
{
436440
RsImGui::CustomTooltip("%s", "Write selected calibration table to the device. For advanced users");
@@ -549,7 +553,8 @@ void calibration_model::d400_update(ux_window& window, std::string& error_messag
549553
auto streams = depth_sensor.get_active_streams();
550554
if (_accept && streams.size())
551555
{
552-
if (ImGui::Button(u8"\uF2DB Write Table", ImVec2(120, 25)))
556+
std::string write_str = std::string(rsutils::string::from() << textual_icons::microchip << " Write Table");
557+
if (ImGui::Button(write_str.c_str(), ImVec2(120, 25)))
553558
{
554559
try
555560
{
@@ -580,7 +585,8 @@ void calibration_model::d400_update(ux_window& window, std::string& error_messag
580585
ImGui::PushStyleColor(ImGuiCol_Text, grey);
581586
ImGui::PushStyleColor(ImGuiCol_TextSelectedBg, grey);
582587

583-
ImGui::Button(u8"\uF2DB Write Table", ImVec2(120, 25));
588+
std::string write_str = std::string(rsutils::string::from() << textual_icons::microchip << " Write Table");
589+
ImGui::Button(write_str.c_str(), ImVec2(120, 25));
584590
if (ImGui::IsItemHovered())
585591
{
586592
RsImGui::CustomTooltip("%s", "Write selected calibration table to the device. Requires \"Stereo Module\" stream to be on.For advanced users");
@@ -656,7 +662,8 @@ void calibration_model::d500_update( ux_window & window, std::string & error_mes
656662
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 5);
657663

658664
ImGui::SetCursorPosX(w / 2 - 260 / 2);
659-
if (ImGui::Button(u8"\uF07C Load...", ImVec2(70, 30)))
665+
std::string load_str = std::string(rsutils::string::from() << textual_icons::folder_open << " Load...");
666+
if (ImGui::Button(load_str.c_str(), ImVec2(70, 30)))
660667
{
661668
try
662669
{
@@ -716,7 +723,8 @@ void calibration_model::d500_update( ux_window & window, std::string & error_mes
716723
RsImGui::CustomTooltip("%s", "Load calibration from file");
717724
}
718725
ImGui::SameLine();
719-
if (ImGui::Button(u8"\uF0C7 Save As...", ImVec2(100, 30)))
726+
std::string save_str = std::string(rsutils::string::from() << textual_icons::folder_open << " Save As...");
727+
if (ImGui::Button(save_str.c_str(), ImVec2(100, 30)))
720728
{
721729
try
722730
{
@@ -775,7 +783,8 @@ void calibration_model::d500_update( ux_window & window, std::string & error_mes
775783
ImGui::SameLine();
776784
if (_accept)
777785
{
778-
if (ImGui::Button(u8"\uF275 Restore Factory", ImVec2(120, 30)))
786+
std::string restore_str = std::string(rsutils::string::from() << textual_icons::industry << " Restore Factory");
787+
if (ImGui::Button(restore_str.c_str(), ImVec2(120, 30)))
779788
{
780789
try
781790
{
@@ -809,7 +818,8 @@ void calibration_model::d500_update( ux_window & window, std::string & error_mes
809818
ImGui::PushStyleColor(ImGuiCol_Text, grey);
810819
ImGui::PushStyleColor(ImGuiCol_TextSelectedBg, grey);
811820

812-
ImGui::Button(u8"\uF275 Restore Factory", ImVec2(120, 30));
821+
std::string restore_str = std::string(rsutils::string::from() << textual_icons::industry << " Restore Factory");
822+
ImGui::Button(restore_str.c_str(), ImVec2(120, 30));
813823
if (ImGui::IsItemHovered())
814824
{
815825
RsImGui::CustomTooltip("%s", "Write selected calibration table to the device. For advanced users");
@@ -899,7 +909,8 @@ void calibration_model::d500_update( ux_window & window, std::string & error_mes
899909

900910
if (_accept)
901911
{
902-
if (ImGui::Button(u8"\uF2DB Write Table", ImVec2(120, 25)))
912+
std::string write_str = std::string(rsutils::string::from() << textual_icons::microchip << " Write Table");
913+
if (ImGui::Button(write_str.c_str(), ImVec2(120, 25)))
903914
{
904915
try
905916
{
@@ -930,7 +941,8 @@ void calibration_model::d500_update( ux_window & window, std::string & error_mes
930941
ImGui::PushStyleColor(ImGuiCol_Text, grey);
931942
ImGui::PushStyleColor(ImGuiCol_TextSelectedBg, grey);
932943

933-
ImGui::Button(u8"\uF2DB Write Table", ImVec2(120, 25));
944+
std::string write_str = std::string(rsutils::string::from() << textual_icons::microchip << " Write Table");
945+
ImGui::Button(write_str.c_str(), ImVec2(120, 25));
934946
if (ImGui::IsItemHovered())
935947
{
936948
RsImGui::CustomTooltip("%s", "Write selected calibration table to the device. For advanced users");

common/d500-on-chip-calib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ namespace rs2
355355

356356
ImGui::SetCursorScreenPos({ float(x + 10), float(y + 35) });
357357
ImGui::PushFont(win.get_large_font());
358-
std::string txt = rsutils::string::from() << textual_icons::throphy;
358+
std::string txt = rsutils::string::from() << textual_icons::trophy;
359359
ImGui::Text("%s", txt.c_str());
360360
ImGui::PopFont();
361361

common/device-model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2271,7 +2271,7 @@ namespace rs2
22712271
{
22722272
std::string desc = dev.get_info(RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR);
22732273
ss.str("");
2274-
ss << " " << textual_icons::usb_type << " " << desc;
2274+
ss << " " << textual_icons::usb << " " << desc;
22752275
ImGui::SameLine();
22762276
if (!starts_with(desc, "3.")) ImGui::PushStyleColor(ImGuiCol_Text, yellow);
22772277
else ImGui::PushStyleColor(ImGuiCol_Text, light_grey);

common/device-model.h

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "objects-in-frame.h"
1414
#include "dds-model.h"
1515
#include "hdr-model.h"
16+
#include "textual-icons.h"
1617

1718
ImVec4 from_rgba(uint8_t r, uint8_t g, uint8_t b, uint8_t a, bool consistent_color = false);
1819
ImVec4 operator+(const ImVec4& c, float v);
@@ -93,26 +94,6 @@ namespace rs2
9394
}
9495
}
9596

96-
97-
struct textual_icon
98-
{
99-
explicit constexpr textual_icon(const char(&unicode_icon)[4]) :
100-
_icon{ unicode_icon[0], unicode_icon[1], unicode_icon[2], unicode_icon[3] }
101-
{
102-
}
103-
operator const char* () const
104-
{
105-
return _icon.data();
106-
}
107-
private:
108-
std::array<char, 5> _icon;
109-
};
110-
111-
inline std::ostream& operator<<(std::ostream& os, const textual_icon& i)
112-
{
113-
return os << static_cast<const char*>(i);
114-
}
115-
11697
namespace configurations
11798
{
11899
namespace record
@@ -210,64 +191,6 @@ namespace rs2
210191
}
211192
}
212193

213-
namespace textual_icons
214-
{
215-
// A note to a maintainer - preserve order when adding values to avoid duplicates
216-
static const textual_icon file_movie{ u8"\uf008" };
217-
static const textual_icon times{ u8"\uf00d" };
218-
static const textual_icon download{ u8"\uf019" };
219-
static const textual_icon refresh{ u8"\uf021" };
220-
static const textual_icon lock{ u8"\uf023" };
221-
static const textual_icon camera{ u8"\uf030" };
222-
static const textual_icon video_camera{ u8"\uf03d" };
223-
static const textual_icon edit{ u8"\uf044" };
224-
static const textual_icon step_backward{ u8"\uf048" };
225-
static const textual_icon play{ u8"\uf04b" };
226-
static const textual_icon pause{ u8"\uf04c" };
227-
static const textual_icon stop{ u8"\uf04d" };
228-
static const textual_icon step_forward{ u8"\uf051" };
229-
static const textual_icon plus_circle{ u8"\uf055" };
230-
static const textual_icon question_mark{ u8"\uf059" };
231-
static const textual_icon info_circle{ u8"\uf05a" };
232-
static const textual_icon fix_up{ u8"\uf062" };
233-
static const textual_icon minus{ u8"\uf068" };
234-
static const textual_icon exclamation_triangle{ u8"\uf071" };
235-
static const textual_icon shopping_cart{ u8"\uf07a" };
236-
static const textual_icon bar_chart{ u8"\uf080" };
237-
static const textual_icon upload{ u8"\uf093" };
238-
static const textual_icon square_o{ u8"\uf096" };
239-
static const textual_icon unlock{ u8"\uf09c" };
240-
static const textual_icon floppy{ u8"\uf0c7" };
241-
static const textual_icon square{ u8"\uf0c8" };
242-
static const textual_icon bars{ u8"\uf0c9" };
243-
static const textual_icon caret_down{ u8"\uf0d7" };
244-
static const textual_icon repeat{ u8"\uf0e2" };
245-
static const textual_icon circle{ u8"\uf111" };
246-
static const textual_icon check_square_o{ u8"\uf14a" };
247-
static const textual_icon cubes{ u8"\uf1b3" };
248-
static const textual_icon toggle_off{ u8"\uf204" };
249-
static const textual_icon toggle_on{ u8"\uf205" };
250-
static const textual_icon connectdevelop{ u8"\uf20e" };
251-
static const textual_icon usb_type{ u8"\uf287" };
252-
static const textual_icon braille{ u8"\uf2a1" };
253-
static const textual_icon window_maximize{ u8"\uf2d0" };
254-
static const textual_icon window_restore{ u8"\uf2d2" };
255-
static const textual_icon grid{ u8"\uf1cb" };
256-
static const textual_icon exit{ u8"\uf011" };
257-
static const textual_icon see_less{ u8"\uf070" };
258-
static const textual_icon dotdotdot{ u8"\uf141" };
259-
static const textual_icon link{ u8"\uf08e" };
260-
static const textual_icon throphy{ u8"\uF091" };
261-
static const textual_icon metadata{ u8"\uF0AE" };
262-
static const textual_icon check{ u8"\uF00C" };
263-
static const textual_icon mail{ u8"\uF01C" };
264-
static const textual_icon cube{ u8"\uf1b2" };
265-
static const textual_icon measure{ u8"\uf545" };
266-
static const textual_icon wifi{ u8"\uf1eb" };
267-
static const textual_icon grid_6{ u8"\uf58d" };
268-
static const textual_icon polygon{ u8"\uf5ee" };
269-
}
270-
271194
class viewer_model;
272195
class ux_window;
273196
class subdevice_model;

common/fw-update-helper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ namespace rs2
453453

454454
ImGui::SetCursorScreenPos({ float(x + 10), float(y + 35) });
455455
ImGui::PushFont(win.get_large_font());
456-
std::string txt = rsutils::string::from() << textual_icons::throphy;
456+
std::string txt = rsutils::string::from() << textual_icons::trophy;
457457
ImGui::Text("%s", txt.c_str());
458458
ImGui::PopFont();
459459

common/notifications.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ namespace rs2
424424
ImGui::PushStyleColor(ImGuiCol_Button, transparent);
425425
ImGui::PushStyleColor(ImGuiCol_ButtonActive, transparent);
426426
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, transparent);
427-
string id = rsutils::string::from() << textual_icons::dotdotdot << "##" << index;
427+
string id = rsutils::string::from() << textual_icons::ellipsis_h << "##" << index;
428428
if (ImGui::Button(id.c_str()))
429429
{
430430
selected = shared_from_this();
@@ -871,7 +871,7 @@ namespace rs2
871871

872872
ImGui::SetCursorScreenPos({ float(x + 10), float(y + 35) });
873873
ImGui::PushFont(win.get_large_font());
874-
std::string txt = rsutils::string::from() << textual_icons::throphy;
874+
std::string txt = rsutils::string::from() << textual_icons::trophy;
875875
ImGui::Text("%s", txt.c_str());
876876
ImGui::PopFont();
877877

@@ -1151,7 +1151,7 @@ namespace rs2
11511151

11521152
ImGui::SetCursorScreenPos({ float(x + 10), float(y + 35) });
11531153
ImGui::PushFont(win.get_large_font());
1154-
std::string txt = rsutils::string::from() << textual_icons::throphy;
1154+
std::string txt = rsutils::string::from() << textual_icons::trophy;
11551155
ImGui::Text("%s", txt.c_str());
11561156
ImGui::PopFont();
11571157

common/on-chip-calib.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,7 @@ namespace rs2
17581758
ImGui::PushStyleColor(ImGuiCol_Text, update_state != RS2_CALIB_STATE_TARE_INPUT_ADVANCED ? light_grey : light_blue);
17591759
ImGui::PushStyleColor(ImGuiCol_TextSelectedBg, update_state != RS2_CALIB_STATE_TARE_INPUT_ADVANCED ? light_grey : light_blue);
17601760

1761-
if (ImGui::Button(u8"\uf0d7"))
1761+
if (ImGui::Button(textual_icons::caret_down))
17621762
{
17631763
if (update_state == RS2_CALIB_STATE_TARE_INPUT_ADVANCED)
17641764
update_state = RS2_CALIB_STATE_TARE_INPUT;
@@ -2596,7 +2596,7 @@ namespace rs2
25962596

25972597
ImGui::SetCursorScreenPos({ float(x + 10), float(y + 35) });
25982598
ImGui::PushFont(win.get_large_font());
2599-
std::string txt = rsutils::string::from() << textual_icons::throphy;
2599+
std::string txt = rsutils::string::from() << textual_icons::trophy;
26002600
ImGui::Text("%s", txt.c_str());
26012601
ImGui::PopFont();
26022602

0 commit comments

Comments
 (0)