Skip to content

Commit 9ceb040

Browse files
Merge pull request #14 from RoboStack/win-build
Trigger windows builds
2 parents 54111e5 + e7f7d95 commit 9ceb040

16 files changed

+382
-6
lines changed

.github/workflows/testpr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,5 @@ jobs:
167167
shell: bash -l {0}
168168
if: steps.newrecipecheck.outputs.RECIPE_CREATED == 1 && steps.filecheck.outputs.WIN_YAML_CHANGED == 1 && matrix.platform == 'win-64'
169169
run: |
170-
$HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform win64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
171-
$HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
170+
$HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir additional_recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing
171+
$HOME/.pixi/bin/pixi run -e beta rattler-build build --recipe-dir recipes --target-platform win-64 -m ./conda_build_config.yaml -c robostack-jazzy -c conda-forge --skip-existing

conda_build_config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@ c_stdlib_version:
2323
- ${{ "2.17" if linux }}
2424
- ${{ "10.14" if osx and x86_64 }}
2525
- ${{ "11.0" if osx and arm64 }}
26+
c_compiler:
27+
- ${{ "gcc" if linux }}
28+
- ${{ "clang" if osx }}
29+
- ${{ "vs2019" if win }}
30+
cxx_compiler:
31+
- ${{ "gxx" if linux }}
32+
- ${{ "clangxx" if osx }}
33+
- ${{ "vs2019" if win }}

patch/dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ intra_process_demo:
3434
add_host: ["REQUIRE_OPENGL"]
3535
rviz_ogre_vendor:
3636
add_host: ["zlib", "freeimage", "freetype", "assimp", "zziplib", "pugixml", "${{ 'libglu' if linux }}"]
37-
add_build: ["vcstool", "patch"]
37+
add_build: ["vcstool"]
3838
add_run: ["assimp"]
3939
pcl_conversions:
4040
add_host: ["REQUIRE_OPENGL", "libboost-devel"]

patch/ros-jazzy-fastrtps.patch

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,17 @@ index 75ad33f2d64..252f60c775a 100644
2727
+
2828
namespace eprosima {
2929

30-
template<typename... Args>
30+
template<typename... Args>
31+
diff --git a/tools/fds/CMakeLists.txt b/tools/fds/CMakeLists.txt
32+
index 899fe693..f1e7e37d 100644
33+
--- a/tools/fds/CMakeLists.txt
34+
+++ b/tools/fds/CMakeLists.txt
35+
@@ -116,7 +116,7 @@ install(EXPORT ${PROJECT_NAME}-targets
36+
if( WIN32 )
37+
# Use powershell to generate the link
38+
install(
39+
- CODE "execute_process( COMMAND PowerShell -Command \"if( test-path ${PROJECT_NAME}.exe -PathType Leaf ) { rm ${PROJECT_NAME}.exe } ; New-Item -ItemType SymbolicLink -Target $<TARGET_FILE_NAME:${PROJECT_NAME}> -Path ${PROJECT_NAME}.exe \" ERROR_QUIET RESULTS_VARIABLE SYMLINK_FAILED WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}\") \n if( SYMLINK_FAILED ) \n message(STATUS \"Windows requires admin installation rights to create symlinks. A bat script will be provided instead.\") \n set(FAST_SERVER_BINARY_NAME $<TARGET_FILE_NAME:${PROJECT_NAME}>) \n configure_file(${CMAKE_CURRENT_LIST_DIR}/fast-discovery-server.bat.in ${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}${MSVCARCH_DIR_EXTENSION}/${PROJECT_NAME}.bat @ONLY) \n endif()"
40+
+ CODE "execute_process( COMMAND PowerShell -Command \"if( test-path ${PROJECT_NAME}.exe -PathType Leaf ) { rm ${PROJECT_NAME}.exe } ; New-Item -ItemType HardLink -Target $<TARGET_FILE_NAME:${PROJECT_NAME}> -Path ${PROJECT_NAME}.exe \" ERROR_QUIET RESULTS_VARIABLE SYMLINK_FAILED WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}\") \n if( SYMLINK_FAILED ) \n message(STATUS \"Windows requires admin installation rights to create symlinks. A bat script will be provided instead.\") \n set(FAST_SERVER_BINARY_NAME $<TARGET_FILE_NAME:${PROJECT_NAME}>) \n configure_file(${CMAKE_CURRENT_LIST_DIR}/fast-discovery-server.bat.in ${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}${MSVCARCH_DIR_EXTENSION}/${PROJECT_NAME}.bat @ONLY) \n endif()"
41+
COMPONENT discovery)
42+
else()
43+
# Use ln to create the symbolic link. We remove the version from the file name but keep the debug suffix
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 7863ddb..5f361df 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -32,6 +32,8 @@ include(IceoryxPoshDeployment)
6+
7+
if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin)
8+
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON)
9+
+else()
10+
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
11+
endif()
12+
13+
set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION})

patch/ros-jazzy-iceoryx-dds.win.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/iceoryx_dds/CMakeLists.txt b/iceoryx_dds/CMakeLists.txt
2+
index ae1f9f83f..e79873a72 100644
3+
--- a/iceoryx_dds/CMakeLists.txt
4+
+++ b/iceoryx_dds/CMakeLists.txt
5+
@@ -16,6 +16,10 @@
6+
# SPDX-License-Identifier: Apache-2.0
7+
cmake_minimum_required(VERSION 3.16)
8+
9+
+if(WIN32)
10+
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
11+
+endif()
12+
+
13+
set(IOX_VERSION_STRING "2.0.6")
14+
15+
project(iceoryx_dds VERSION ${IOX_VERSION_STRING})
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index f7cb43b..115964a 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -26,6 +26,8 @@ include("${CMAKE_CURRENT_LIST_DIR}/cmake/IceoryxPlatform.cmake")
6+
7+
if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin)
8+
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON)
9+
+else()
10+
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
11+
endif()
12+
13+
set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION})
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
diff --git a/iceoryx_posh/CMakeLists.txt b/iceoryx_posh/CMakeLists.txt
2+
index 57e84cdd0..d7781cbb9 100644
3+
--- a/iceoryx_posh/CMakeLists.txt
4+
+++ b/iceoryx_posh/CMakeLists.txt
5+
@@ -42,6 +42,8 @@ include(cmake/IceoryxPoshDeployment.cmake)
6+
7+
if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin)
8+
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON)
9+
+else()
10+
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
11+
endif()
12+
13+
set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION})
14+
diff --git a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt
15+
index e770e4fdba..a548376f1a 100644
16+
--- a/iceoryx_posh/cmake/cpptoml/CMakeLists.txt
17+
+++ b/iceoryx_posh/cmake/cpptoml/CMakeLists.txt
18+
@@ -75,23 +75,13 @@ if(DEFINED CMAKE_TOOLCHAIN_FILE)
19+
endif()
20+
21+
execute_process(
22+
- COMMAND git apply -R -p1 --ignore-space-change --whitespace=nowarn --check
23+
+ COMMAND patch -p1 --forward --ignore-whitespace --fuzz=3
24+
INPUT_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch"
25+
WORKING_DIRECTORY "${SOURCE_DIR}"
26+
- OUTPUT_QUIET
27+
- ERROR_QUIET
28+
RESULT_VARIABLE result)
29+
-if(result)
30+
- message(STATUS "Applying patch for minimal cmake version to cpptoml")
31+
32+
- execute_process(
33+
- COMMAND git apply -p1 --ignore-space-change --whitespace=nowarn
34+
- INPUT_FILE "${CMAKE_CURRENT_LIST_DIR}/0001-cpptoml-cmake-version.patch"
35+
- WORKING_DIRECTORY "${SOURCE_DIR}"
36+
- RESULT_VARIABLE result)
37+
- if(result)
38+
- message(FATAL_ERROR "CMake step [patch] for '${PROJECT_NAME}' failed! Error code: ${result}!")
39+
- endif()
40+
+if(result)
41+
+ message(FATAL_ERROR "CMake step [patch] for '${PROJECT_NAME}' failed! Error code: ${result}!")
42+
endif()
43+
44+
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" "-DENABLE_LIBCXX=off" "-DCPPTOML_BUILD_EXAMPLES=off" "-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}" "${SOURCE_DIR}" ${CMAKE_ADDITIONAL_OPTIONS}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/ros_gz_bridge/CMakeLists.txt b/ros_gz_bridge/CMakeLists.txt
2+
index 44911577..76779457 100644
3+
--- a/ros_gz_bridge/CMakeLists.txt
4+
+++ b/ros_gz_bridge/CMakeLists.txt
5+
@@ -11,4 +11,7 @@ if(NOT CMAKE_CXX_STANDARD)
6+
+elseif(MSVC)
7+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
8+
endif()
9+
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
10+
11+
find_package(ament_cmake REQUIRED)
12+
find_package(rclcpp REQUIRED)

patch/ros-jazzy-ros-gz-sim.win.patch

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
diff --git a/ros_gz_sim/CMakeLists.txt b/ros_gz_sim/CMakeLists.txt
2+
index dc8deb03..ec6ac678 100644
3+
--- a/ros_gz_sim/CMakeLists.txt
4+
+++ b/ros_gz_sim/CMakeLists.txt
5+
@@ -12,3 +12,4 @@ endif()
6+
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
7+
8+
find_package(ament_cmake REQUIRED)
9+
find_package(rclcpp REQUIRED)

0 commit comments

Comments
 (0)