Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions .github/workflows/cpp-ci-serial-programs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,25 @@ jobs:
fail-fast: false
matrix:
os: [windows-2025, macos-13, ubuntu-24.04]
compiler: ['default', 'clang']
qt_version: ['6.9.1']
include:
- qt_version: '6.9.1'
qt_version_major: '6'
qt_modules: 'qtmultimedia qtserialport'
- qt_version: '6.9.1'
qt_version_major: '6'
qt_modules: 'qtmultimedia qtserialport'

- os: 'windows-2025'
compiler: 'clang'
cmake_additional_param: '-T ClangCL'

- os: 'ubuntu-24.04'
compiler: 'clang'
cmake_additional_param: '-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++'

exclude:
- os: 'macos-13'
compiler: 'clang'
# Excluded because macos default toolset is already clang

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -44,7 +58,7 @@ jobs:
cd Arduino-Source/SerialPrograms
mkdir bin
cd bin
cmake .. -DQT_MAJOR:STRING=${{ matrix.qt_version_major }}
cmake .. -DQT_MAJOR:STRING=${{ matrix.qt_version_major }} ${{ matrix.cmake_additional_param }}
cmake --build . --config Release --parallel 10
- name: Copy resources
if: startsWith(matrix.os, 'windows')
Expand All @@ -66,5 +80,5 @@ jobs:
- uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'windows')
with:
name: Serial Programs for windows (${{ matrix.qt_version }})
name: Serial Programs ( os=${{ matrix.os }} - qt_version=${{ matrix.qt_version }} - compiler=${{ matrix.compiler }})
path: Output
4 changes: 2 additions & 2 deletions ClientSource/Connection/SerialConnectionWinAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SerialConnection : public StreamConnection{
throw ConnectionException(nullptr, "Unable to open serial connection (" + name + "). Error = " + std::to_string(error));
}

DCB serial_params{0};
DCB serial_params{};
serial_params.DCBlength = sizeof(serial_params);

if (!GetCommState(m_handle, &serial_params)){
Expand All @@ -67,7 +67,7 @@ class SerialConnection : public StreamConnection{
}

#if 1
COMMTIMEOUTS timeouts{0};
COMMTIMEOUTS timeouts{};
if (!GetCommTimeouts(m_handle, &timeouts)){
DWORD error = GetLastError();
CloseHandle(m_handle);
Expand Down
15 changes: 12 additions & 3 deletions SerialPrograms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2418,7 +2418,7 @@ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../Internal/SerialPrograms/Internal0.
endif()

#extract opencv_world4110d.dll from archive on Windows Debug builds
if (MSVC)
if (WIN32)
file(ARCHIVE_EXTRACT
INPUT ${CMAKE_CURRENT_SOURCE_DIR}/../3rdPartyBinaries/opencv_world4110d.zip
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/../3rdPartyBinaries/
Expand All @@ -2433,7 +2433,7 @@ target_link_directories(SerialPrograms PRIVATE ../3rdPartyBinaries/)



if (MSVC)
if (WIN32)
add_library(OpenCV_lib IMPORTED UNKNOWN)
target_include_directories(SerialPrograms SYSTEM PRIVATE ../3rdParty/opencv-4.11.0/)
set_target_properties(OpenCV_lib PROPERTIES
Expand Down Expand Up @@ -2505,6 +2505,15 @@ if (MSVC)
set(ARCH_FLAGS_17_Skylake /arch:AVX512)
set(ARCH_FLAGS_19_IceLake /arch:AVX512)

if(CMAKE_GENERATOR_TOOLSET MATCHES "ClangCL")
target_compile_options(SerialPrograms PRIVATE -Wno-unused-function)
target_compile_options(SerialPrograms PRIVATE -march=nehalem)
set(ARCH_FLAGS_09_Nehalem -march=nehalem)
set(ARCH_FLAGS_13_Haswell -march=haswell)
set(ARCH_FLAGS_17_Skylake -march=skylake-avx512)
set(ARCH_FLAGS_19_IceLake -march=icelake-client)
endif()

# Run-time ISA dispatching
target_compile_definitions(SerialPrograms PRIVATE PA_AutoDispatch_x64_08_Nehalem)
target_compile_definitions(SerialPrograms PRIVATE PA_AutoDispatch_x64_13_Haswell)
Expand Down Expand Up @@ -2619,7 +2628,7 @@ else() # macOS and Linux

else()
# Intel CPU
target_compile_options(SerialPrograms PRIVATE -msse4.2)
target_compile_options(SerialPrograms PRIVATE -march=nehalem)
set(ARCH_FLAGS_09_Nehalem -march=nehalem)
set(ARCH_FLAGS_13_Haswell -march=haswell)
set(ARCH_FLAGS_17_Skylake -march=skylake-avx512)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ extern const std::chrono::milliseconds INFERENCE_RATE;
class HostingSwitch : public IntegerEnumDropdownOption{
public:
HostingSwitch();
using ConfigOption::check_validity;
std::string check_validity(size_t consoles) const;
};

Expand Down