Skip to content

Commit ec974bd

Browse files
committed
CMake and OS versions support update
1 parent 6477f92 commit ec974bd

File tree

3 files changed

+29
-27
lines changed

3 files changed

+29
-27
lines changed

.github/workflows/github-actions.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: softprops/action-gh-release@v1
11+
- uses: softprops/action-gh-release@v2
1212
id: create_release
1313
env:
1414
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -26,27 +26,27 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
cfg:
29-
- { os: ubuntu-22.04, shell: bash, arch: x64, py_arch: x64, py_v_maj: 3, py_v_min: 10, cmake_out: './hardwarex.so', deploy-file: './hardwarex_compat.so', desc: 'Ubuntu 22.04' }
30-
- { os: macos-12, shell: bash, arch: arm64, py_arch: x64, py_v_maj: 3, py_v_min: 10, cmake_out: './hardwarex.dylib', deploy-file: './hardwarex_compat_arm64.dylib', cmake_params_1: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=arm64', desc: 'macOS Monterey arm64' }
31-
- { os: macos-12, shell: bash, arch: x86_64, py_arch: x64, py_v_maj: 3, py_v_min: 10, cmake_out: './hardwarex.dylib', deploy-file: './hardwarex_compat.dylib', desc: 'macOS Monterey x86_64' }
32-
- { os: windows-2019, shell: bash, arch: x64, py_arch: x64, py_v_maj: 3, py_v_min: 10, cmake_out: './Release/hardwarex.dll', deploy-file: './Release/hardwarex_x64_compat.dll', cmake_params_1: '-G "Visual Studio 16" -A x64 -D ENABLE_STATIC=ON', cmake_params_2: '--config Release --target hardwarex', desc: 'Windows Visual Studio 2019 x64 static' }
33-
- { os: windows-2019, shell: bash, arch: x86, py_arch: x86, py_v_maj: 3, py_v_min: 10, cmake_out: './Release/hardwarex.dll', deploy-file: './Release/hardwarex_x86_compat.dll', cmake_params_1: '-G "Visual Studio 16" -A Win32 -D ENABLE_STATIC=ON', cmake_params_2: '--config Release --target hardwarex', desc: 'Windows Visual Studio 2019 x86 static' }
34-
- { os: ubuntu-22.04, shell: bash, arch: x64, py_arch: x64, py_v_maj: 3, py_v_min: 10, cmake_out: './hardwarex.so', deploy-file: './hardwarex.so', cmake_params_1: '-D ENABLE_MAVLINK_SUPPORT=ON -D ENABLE_SBG_SDK_SUPPORT=ON -D ENABLE_RPLIDAR_SDK_SUPPORT=ON', desc: 'Ubuntu 22.04 with 3rd support' }
35-
#- { os: macos-12, shell: bash, arch: arm64, py_arch: x64, py_v_maj: 3, py_v_min: 10, cmake_out: './hardwarex.dylib', deploy-file: './hardwarex_arm64.dylib', cmake_params_1: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=arm64 -D ENABLE_MAVLINK_SUPPORT=ON -D ENABLE_SBG_SDK_SUPPORT=ON -D ENABLE_RPLIDAR_SDK_SUPPORT=ON', desc: 'macOS Monterey arm64 with 3rd support' }
36-
- { os: macos-12, shell: bash, arch: x86_64, py_arch: x64, py_v_maj: 3, py_v_min: 10, cmake_out: './hardwarex.dylib', deploy-file: './hardwarex.dylib', cmake_params_1: '-D ENABLE_MAVLINK_SUPPORT=ON -D ENABLE_SBG_SDK_SUPPORT=ON -D ENABLE_RPLIDAR_SDK_SUPPORT=ON', desc: 'macOS Monterey x86_64 with 3rd support' }
37-
- { os: windows-2019, shell: bash, arch: x64, py_arch: x64, py_v_maj: 3, py_v_min: 10, cmake_out: './Release/hardwarex.dll', deploy-file: './Release/hardwarex_x64.dll', cmake_params_1: '-G "Visual Studio 16" -A x64 -D ENABLE_STATIC=ON -D ENABLE_MAVLINK_SUPPORT=ON -D ENABLE_SBG_SDK_SUPPORT=ON -D ENABLE_RPLIDAR_SDK_SUPPORT=ON', cmake_params_2: '--config Release --target hardwarex', desc: 'Windows Visual Studio 2019 x64 static with 3rd support' }
38-
- { os: windows-2019, shell: bash, arch: x86, py_arch: x86, py_v_maj: 3, py_v_min: 10, cmake_out: './Release/hardwarex.dll', deploy-file: './Release/hardwarex_x86.dll', cmake_params_1: '-G "Visual Studio 16" -A Win32 -D ENABLE_STATIC=ON -D ENABLE_MAVLINK_SUPPORT=ON -D ENABLE_SBG_SDK_SUPPORT=ON -D ENABLE_RPLIDAR_SDK_SUPPORT=ON', cmake_params_2: '--config Release --target hardwarex', desc: 'Windows Visual Studio 2019 x86 static with 3rd support' }
29+
- { os: ubuntu-24.04, shell: bash, arch: x64, py_arch: x64, py_v_maj: 3, py_v_min: 12, cmake_out: './hardwarex.so', deploy-file: './hardwarex_compat.so', desc: 'Ubuntu 24.04' }
30+
- { os: macos-13, shell: bash, arch: arm64, py_arch: x64, py_v_maj: 3, py_v_min: 12, cmake_out: './hardwarex.dylib', deploy-file: './hardwarex_compat_arm64.dylib', cmake_params_1: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=arm64', desc: 'macOS Ventura arm64' }
31+
- { os: macos-13, shell: bash, arch: x86_64, py_arch: x64, py_v_maj: 3, py_v_min: 12, cmake_out: './hardwarex.dylib', deploy-file: './hardwarex_compat.dylib', desc: 'macOS Ventura x86_64' }
32+
- { os: windows-2022, shell: bash, arch: x64, py_arch: x64, py_v_maj: 3, py_v_min: 12, cmake_out: './Release/hardwarex.dll', deploy-file: './Release/hardwarex_x64_compat.dll', cmake_params_1: '-G "Visual Studio 17" -A x64 -D ENABLE_STATIC=ON', cmake_params_2: '--config Release --target hardwarex', desc: 'Windows Visual Studio 2022 x64 static' }
33+
- { os: windows-2022, shell: bash, arch: x86, py_arch: x86, py_v_maj: 3, py_v_min: 12, cmake_out: './Release/hardwarex.dll', deploy-file: './Release/hardwarex_x86_compat.dll', cmake_params_1: '-G "Visual Studio 17" -A Win32 -D ENABLE_STATIC=ON', cmake_params_2: '--config Release --target hardwarex', desc: 'Windows Visual Studio 2022 x86 static' }
34+
- { os: ubuntu-24.04, shell: bash, arch: x64, py_arch: x64, py_v_maj: 3, py_v_min: 12, cmake_out: './hardwarex.so', deploy-file: './hardwarex.so', cmake_params_1: '-D ENABLE_MAVLINK_SUPPORT=ON -D ENABLE_SBG_SDK_SUPPORT=ON -D ENABLE_RPLIDAR_SDK_SUPPORT=ON', desc: 'Ubuntu 24.04 with 3rd support' }
35+
#- { os: macos-13, shell: bash, arch: arm64, py_arch: x64, py_v_maj: 3, py_v_min: 12, cmake_out: './hardwarex.dylib', deploy-file: './hardwarex_arm64.dylib', cmake_params_1: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=arm64 -D ENABLE_MAVLINK_SUPPORT=ON -D ENABLE_SBG_SDK_SUPPORT=ON -D ENABLE_RPLIDAR_SDK_SUPPORT=ON', desc: 'macOS Ventura arm64 with 3rd support' }
36+
- { os: macos-13, shell: bash, arch: x86_64, py_arch: x64, py_v_maj: 3, py_v_min: 12, cmake_out: './hardwarex.dylib', deploy-file: './hardwarex.dylib', cmake_params_1: '-D ENABLE_MAVLINK_SUPPORT=ON -D ENABLE_SBG_SDK_SUPPORT=ON -D ENABLE_RPLIDAR_SDK_SUPPORT=ON', desc: 'macOS Ventura x86_64 with 3rd support' }
37+
- { os: windows-2022, shell: bash, arch: x64, py_arch: x64, py_v_maj: 3, py_v_min: 12, cmake_out: './Release/hardwarex.dll', deploy-file: './Release/hardwarex_x64.dll', cmake_params_1: '-G "Visual Studio 17" -A x64 -D ENABLE_STATIC=ON -D ENABLE_MAVLINK_SUPPORT=ON -D ENABLE_SBG_SDK_SUPPORT=ON -D ENABLE_RPLIDAR_SDK_SUPPORT=ON', cmake_params_2: '--config Release --target hardwarex', desc: 'Windows Visual Studio 2022 x64 static with 3rd support' }
38+
- { os: windows-2022, shell: bash, arch: x86, py_arch: x86, py_v_maj: 3, py_v_min: 12, cmake_out: './Release/hardwarex.dll', deploy-file: './Release/hardwarex_x86.dll', cmake_params_1: '-G "Visual Studio 17" -A Win32 -D ENABLE_STATIC=ON -D ENABLE_MAVLINK_SUPPORT=ON -D ENABLE_SBG_SDK_SUPPORT=ON -D ENABLE_RPLIDAR_SDK_SUPPORT=ON', cmake_params_2: '--config Release --target hardwarex', desc: 'Windows Visual Studio 2022 x86 static with 3rd support' }
3939
name: ${{ matrix.cfg.desc }}
4040
steps:
4141

4242
# Prerequisites
43-
- uses: actions/checkout@v3
43+
- uses: actions/checkout@v4
4444
- run: |
4545
(New-Object System.Net.WebClient).DownloadFile("http://www.ensta-bretagne.fr/lebars/Share/windows_extra_tools.zip", "C:\Windows\Temp\windows_extra_tools.zip")
4646
7z x C:\Windows\Temp\windows_extra_tools.zip -o"C:\Windows" -y
4747
shell: pwsh
4848
if: runner.os == 'Windows'
49-
- uses: actions/setup-python@v4
49+
- uses: actions/setup-python@v5
5050
with:
5151
python-version: ${{ matrix.cfg.py_v_maj }}.${{ matrix.cfg.py_v_min }}
5252
architecture: ${{ matrix.cfg.py_arch }}
@@ -61,24 +61,24 @@ jobs:
6161
- run: |
6262
git clone https://github.com/ENSTABretagneRobotics/Hardware-Python && cp -Rf Hardware-Python/*.py ./
6363
rm -Rf linux_x64 mac x86 x64
64-
wget https://github.com/ENSTABretagneRobotics/UxVCtrl/releases/download/JD2022/UxVCtrl_JD2022.zip --no-check-certificate -nv
65-
unzip -q -o UxVCtrl_JD2022.zip
66-
perl -i -p0e 's/% bCommandPrompt\r\n1/% bCommandPrompt\r\n0/' UxVCtrl_JD2022/BUGGY_SIMULATOR_WORKSPACE/UxVCtrl.txt
64+
wget https://github.com/ENSTABretagneRobotics/UxVCtrl/releases/download/Fall2024r2/UxVCtrl_Fall2024r2.zip --no-check-certificate -nv
65+
unzip -q -o UxVCtrl_Fall2024r2.zip
66+
perl -i -p0e 's/% bCommandPrompt\r\n1/% bCommandPrompt\r\n0/' UxVCtrl_Fall2024r2/BUGGY_SIMULATOR_WORKSPACE/UxVCtrl.txt
6767
- run: |
6868
sed -i 's/COM6/127.0.0.1:5004/' SSC320.txt
6969
sed -i 's/COM5/127.0.0.1:5007/' RazorAHRS0.txt
7070
sed -i 's/COM14/127.0.0.1:5001/' ublox0.txt
71-
cp -Rf "UxVCtrl_JD2022/Compatibility mode/Ubuntu/UxVCtrl_compat_ubuntu_jammy" UxVCtrl_JD2022/BUGGY_SIMULATOR_WORKSPACE/
72-
cp -Rf "UxVCtrl_JD2022/Compatibility mode/Ubuntu/"*.so* UxVCtrl_JD2022/BUGGY_SIMULATOR_WORKSPACE/
73-
sh -c "cd UxVCtrl_JD2022/BUGGY_SIMULATOR_WORKSPACE; chmod +x ./UxVCtrl_compat_ubuntu_jammy; ./UxVCtrl_compat_ubuntu_jammy &"
71+
cp -Rf "UxVCtrl_Fall2024r2/Compatibility mode/Ubuntu/UxVCtrl_compat_ubuntu_noble" UxVCtrl_Fall2024r2/BUGGY_SIMULATOR_WORKSPACE/
72+
cp -Rf "UxVCtrl_Fall2024r2/Compatibility mode/Ubuntu/"*.so* UxVCtrl_Fall2024r2/BUGGY_SIMULATOR_WORKSPACE/
73+
sh -c "cd UxVCtrl_Fall2024r2/BUGGY_SIMULATOR_WORKSPACE; chmod +x ./UxVCtrl_compat_ubuntu_noble; ./UxVCtrl_compat_ubuntu_noble &"
7474
mkdir -p lib && mv -f ${{ matrix.cfg.cmake_out }} lib/hardwarex.so # Problem when the library is also in the current folder...?
7575
if: runner.os == 'Linux'
7676
- run: |
7777
sed -i "" 's/COM6/127.0.0.1:5004/' SSC320.txt
7878
sed -i "" 's/COM5/127.0.0.1:5007/' RazorAHRS0.txt
7979
sed -i "" 's/COM14/127.0.0.1:5001/' ublox0.txt
80-
cp -Rf "UxVCtrl_JD2022/Compatibility mode/macOS/UxVCtrl_compat_macos_monterey" UxVCtrl_JD2022/BUGGY_SIMULATOR_WORKSPACE/
81-
sh -c "cd UxVCtrl_JD2022/BUGGY_SIMULATOR_WORKSPACE; chmod +x ./UxVCtrl_compat_macos_monterey; ./UxVCtrl_compat_macos_monterey &"
80+
cp -Rf "UxVCtrl_Fall2024r2/Compatibility mode/macOS/UxVCtrl_compat_macos_ventura" UxVCtrl_Fall2024r2/BUGGY_SIMULATOR_WORKSPACE/
81+
sh -c "cd UxVCtrl_Fall2024r2/BUGGY_SIMULATOR_WORKSPACE; chmod +x ./UxVCtrl_compat_macos_ventura; ./UxVCtrl_compat_macos_ventura &"
8282
mkdir -p lib && mv -f ${{ matrix.cfg.cmake_out }} lib/hardwarex.dylib
8383
if: runner.os == 'macOS'
8484
- run: |
@@ -87,9 +87,9 @@ jobs:
8787
sed -i 's/COM6/127.0.0.1:5004/' SSC320.txt
8888
sed -i 's/COM5/127.0.0.1:5007/' RazorAHRS0.txt
8989
sed -i 's/COM14/127.0.0.1:5001/' ublox0.txt
90-
cp -Rf "UxVCtrl_JD2022/Compatibility mode/Windows/UxVCtrl_compat.exe" UxVCtrl_JD2022/BUGGY_SIMULATOR_WORKSPACE/
91-
cp -Rf "UxVCtrl_JD2022/Compatibility mode/Windows/"*.dll UxVCtrl_JD2022/BUGGY_SIMULATOR_WORKSPACE/
92-
sh -c "cd UxVCtrl_JD2022/BUGGY_SIMULATOR_WORKSPACE; ./UxVCtrl_compat.exe &"
90+
cp -Rf "UxVCtrl_Fall2024r2/Compatibility mode/Windows/UxVCtrl_compat.exe" UxVCtrl_Fall2024r2/BUGGY_SIMULATOR_WORKSPACE/
91+
cp -Rf "UxVCtrl_Fall2024r2/Compatibility mode/Windows/"*.dll UxVCtrl_Fall2024r2/BUGGY_SIMULATOR_WORKSPACE/
92+
sh -c "cd UxVCtrl_Fall2024r2/BUGGY_SIMULATOR_WORKSPACE; ./UxVCtrl_compat.exe &"
9393
mkdir -p ${{ matrix.cfg.arch }} && mv -f ${{ matrix.cfg.cmake_out }} ./${{ matrix.cfg.arch }}/hardwarex.dll
9494
if: runner.os == 'Windows'
9595
- run: |

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 2.8...3.16)
1+
cmake_minimum_required(VERSION 3.14...3.25)
22

33
if(${CMAKE_VERSION} VERSION_LESS "3.12")
44
message(WARNING "CMake < 3.12 is not fully supported...")
@@ -473,6 +473,8 @@ add_definitions(-D DISABLE_AIS_SUPPORT)
473473

474474
if(WIN32)
475475
if(MSVC)
476+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
477+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
476478
if(ENABLE_STATIC)
477479
if(CMAKE_VERSION VERSION_LESS 3.15.0)
478480
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")

ReadMe.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Linux, macOS, or other problem:
99

1010
Change the device path (e.g. `COM9`) and other parameters in the configuration files (`RazorAHRS0.txt`, `RPLIDAR0.txt`, etc.) if necessary. Mind the line endings in the configuration files depending on the OS (use e.g. the command `dos2unix *.txt` to convert line endings for Linux)! Ensure that you closed any other application that might use the devices (reboot if unsure). Note that you need to press the ESC key to exit cleanly the test script, if you interrupt the script by `CTRL+C`, MATLAB might crash or you might not be able to launch successfully again the test script...
1111

12-
Sample: http://www.ensta-bretagne.fr/lebars/Share/buggy_real_gps.zip for the buggy based on an Android smartphone described on http://www.ensta-bretagne.fr/lebars/buggy_android_full.pdf .
12+
Sample: https://www.ensta-bretagne.fr/lebars/Share/buggy_real_gps.zip for the buggy based on an Android smartphone described on https://www.ensta-bretagne.fr/lebars/buggy_android_full.pdf .
1313

1414
Tested on Windows 10 64 bit using MATLAB R2022b 64 bit and MATLAB R2015b 32 bit.
1515

@@ -28,4 +28,4 @@ Hardware support:
2828
- SSC-32: Lynxmotion SSC-32, SSC-32u servo controllers.
2929
- ublox: ublox GPS (only with NMEA protocol), Furuno WS200 weather station, or other NMEA-compatible devices with supported NMEA sentences.
3030

31-
See also https://github.com/ENSTABretagneRobotics/Hardware-CPP , https://github.com/ENSTABretagneRobotics/Hardware-Python , https://github.com/ENSTABretagneRobotics/Hardware-Java , https://github.com/ENSTABretagneRobotics/Android .
31+
See also https://github.com/ENSTABretagneRobotics/Hardware-CPP , https://github.com/ENSTABretagneRobotics/Hardware-CPP-GUI , https://github.com/ENSTABretagneRobotics/Hardware-Python , https://github.com/ENSTABretagneRobotics/Hardware-Java , https://github.com/ENSTABretagneRobotics/Android .

0 commit comments

Comments
 (0)