Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.
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
51 changes: 51 additions & 0 deletions .github/workflows/windows-config/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: windows-config
description: configure windows
inputs:
arch:
required: true
type: choice
options:
- x86
- x64

runs:
using: "composite"
steps:
- name: Cache dependencies
uses: actions/cache@v3
with:
path: deps\vcpkg\cache\windows
key: windows-${{ inputs.arch }}-${{ hashFiles('.github\workflows\windows-config\action.yml', 'deps\vcpkg\manifest\vcpkg.json') }}

- name: Setup msbuild
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ inputs.arch }}

- name: Fix vcpkg
shell: cmd
run: vcpkg.exe integrate remove

- name: Clone vcpkg
shell: cmd
run: |
git clone https://github.com/microsoft/vcpkg/

- name: Configure Gazebo
shell: cmd
run: |
set VCPKG_BINARY_SOURCES=clear;files,%CD%\deps\vcpkg\cache\windows,readwrite;
cmake . -G Ninja -B build ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake ^
-DVCPKG_MANIFEST_DIR=deps\vcpkg\manifest ^
-DVCPKG_OVERLAY_TRIPLETS=deps\vcpkg\triplets ^
-DVCPKG_INSTALLED_DIR=%CD%\vcpkg\installed ^
-DVCPKG_TARGET_TRIPLET=${{ inputs.arch }}-windows-release ^
-DVCPKG_HOST_TRIPLET=${{ inputs.arch }}-windows-release ^
-DVCPKG_INSTALL_OPTIONS=--clean-after-build ^
-DUSE_EXTERNAL_TINYXML=ON ^
-DUSE_EXTERNAL_TINYXML2=ON ^
-DUSE_EXTERNAL_TINY_PROCESS_LIBRARY=ON ^
-DGZ_PROTOBUF_USE_CMAKE_CONFIG=ON ^
-DCMAKE_INSTALL_PREFIX=%CD%\vcpkg\installed\${{ inputs.arch }}-windows-release
95 changes: 95 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: 🪟 Windows-vcpkg
on:
push:
branches: [ gazebo11 ]
pull_request:
branches: [ gazebo11 ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
config:
name: ${{ matrix.arch }}-config
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- arch: x64
- arch: x86
steps:
- uses: actions/checkout@v3

- name: Config Gazebo
uses: ./.github/workflows/windows-config/
with:
arch: ${{ matrix.arch }}

- name: Prepare logs on failure
if: failure()
shell: cmd
run: |
7z a -t7z -r -mx=9 logs.7z ^
vcpkg/buildtrees/*.log

- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: windows_logs_${{matrix.arch}}_${{github.event.pull_request.head.sha}}
path: logs.7z

build:
name: ${{ matrix.arch }}-build
needs: config
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- arch: x64
- arch: x86
steps:
- uses: actions/checkout@v3

- name: Config Gazebo
uses: ./.github/workflows/windows-config/
with:
arch: ${{ matrix.arch }}

- name: Build Gazebo
shell: cmd
run: |
set /a proc=%NUMBER_OF_PROCESSORS%
echo proc=%proc%
cmake --build build --config Release -j %proc%

- name: Install Gazebo
shell: cmd
run: |
cmake --install build --config Release

- name: Tests suite compilation
shell: cmd
run: |
echo compile and run tests here

- name: Prepare logs on failure
if: failure()
shell: cmd
run: |
7z a -t7z -r -mx=9 logs.7z ^
vcpkg/buildtrees/*.log ^
build/.ninja_log ^
build/build.ninja ^
build/install_manifest.txt ^
build/vcpkg-manifest-install.log

- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: windows_logs_${{matrix.arch}}_${{github.event.pull_request.head.sha}}
path: logs.7z
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ build
build_*
build-*
Ogre.log
deps/vcpkg/cache
.DS_Store
*.swp
*.orig
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ set(GAZEBO_MODEL_DATABASE_URI http://models.gazebosim.org)
set(OGRE_RESOURCE_PATH ${OGRE_PLUGINDIR})
# Seems that OGRE_PLUGINDIR can end in a newline, which will cause problems when
# we pass it to the compiler later.
string(REPLACE "\n" "" OGRE_RESOURCE_PATH ${OGRE_RESOURCE_PATH})
string(REPLACE "\n" "" OGRE_RESOURCE_PATH "${OGRE_RESOURCE_PATH}")
FILE(TO_CMAKE_PATH "${OGRE_RESOURCE_PATH}" OGRE_RESOURCE_PATH)


Expand Down
12 changes: 11 additions & 1 deletion cmake/SearchForStuff.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ if (PKG_CONFIG_FOUND)
find_package(Simbody)
if (Simbody_FOUND)
message (STATUS "Looking for Simbody - found")
# When simbody is found but it static libs, we need to add it manually.
if ("${Simbody_LIBRARIES}" STREQUAL "" OR "${Simbody_LIBRARIES}" STREQUAL "Simbody_LIBRARIES-NOTFOUND")
Comment thread
talregev marked this conversation as resolved.
set(Simbody_LIBRARIES ${Simbody_STATIC_LIBRARIES})
endif()
set (HAVE_SIMBODY TRUE)
else()
message (STATUS "Looking for Simbody - not found")
Expand Down Expand Up @@ -587,9 +591,15 @@ if (PKG_CONFIG_FOUND)
if (NOT BULLET_FOUND)
pkg_check_modules(BULLET bullet2.82>=2.82)
endif()

if (NOT BULLET_FOUND)
find_package(BULLET CONFIG 2.82)
endif()
if (BULLET_FOUND)
set (HAVE_BULLET TRUE)
if (${BULLET_VERSION} STREQUAL "")
set (BULLET_VERSION ${BULLET_VERSION_STRING})
endif()
message (STATUS "Bullet found: " ${BULLET_VERSION})
add_definitions( -DLIBBULLET_VERSION=${BULLET_VERSION} )
else()
set (HAVE_BULLET FALSE)
Expand Down
Empty file.
Empty file.
156 changes: 156 additions & 0 deletions deps/vcpkg/manifest/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
{
"name": "gazebo",
"description": "Open source robotics simulator.",
"homepage": "http://gazebosim.org",
"license": "Apache-2.0",
"builtin-baseline": "19af97cba8ca48474e4ad15a24ed50271a9ecdac",
"dependencies": [
"boost-asio",
"boost-date-time",
"boost-filesystem",
"boost-format",
"boost-interprocess",
"boost-iostreams",
"boost-program-options",
"boost-property-tree",
"boost-regex",
"boost-system",
"boost-thread",
"boost-uuid",
"ccd",
"freeimage",
{
"name": "hdf5",
"features": [
"cpp"
]
},
"ignition-common3",
"ignition-fuel-tools4",
"ignition-math6",
"ignition-msgs5",
"ignition-transport8",
{
"name": "libtar",
"platform": "!windows"
},
"ogre",
"opengl",
{
"name": "pkgconf",
"host": true
},
"protobuf",
"qt5-base",
"qwt",
"sdformat9",
"tbb",
"tiny-process-library",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
"bullet",
"dart",
"ffmpeg",
"gdal",
"graphviz",
"gts",
"libusb",
"openal",
"simbody"
],
"features": {
"bullet": {
"description": "Use the bullet physics engine",
"dependencies": [
"bullet3"
]
},
"dart": {
"description": "Use the dart physics engine",
"dependencies": [
"dartsim"
]
},
"ffmpeg": {
"description": "Enable audio-video capabilities",
"dependencies": [
{
"name": "ffmpeg",
"features": [
"avcodec",
"avformat",
"swscale"
]
}
]
},
"gdal": {
"description": "Enable digital elevation terrains support",
"dependencies": [
"gdal"
]
},
"graphviz": {
"description": "Enable model editor's schematic view",
"dependencies": [
"graphviz"
]
},
"gts": {
"description": "Enable CSG support",
"dependencies": [
"gts"
]
},
"libusb": {
"description": "Enable USB peripheral support",
"dependencies": [
"libusb"
]
},
"openal": {
"description": "Enable audio support",
"dependencies": [
"openal-soft"
]
},
"plugins": {
"description": "Build gazebo plugins",
"supports": "!linux"
},
"simbody": {
"description": "Use the simbody physics engine",
"dependencies": [
"simbody"
]
},
"tools": {
"description": "Build gazebo tools",
"supports": "!(linux & static)"
}
},
"overrides": [
{
"name": "ogre",
"version": "1.12.9",
"port-version": 10
},
{
"name": "qwt",
"version": "6.1.5"
},
{
"name": "graphviz",
"version": "2.49.1",
"port-version": 4
}
]
}
4 changes: 4 additions & 0 deletions deps/vcpkg/triplets/x86-windows-release.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)