This repository was archived by the owner on Feb 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 518
Add support for compiling on windows x64 and x86 with vcpkg-provided dependencies #3320
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d65a219
Compile for windows x64 and x86
talregev bd3c45c
Refactor according comments.
talregev 2d49ed4
revert changes of tbb
talregev 6483a50
simbody workaround comment explanation.
talregev 9d7660f
bug fix:
talregev 72ae3b7
Review comments:
talregev 605c80e
include (FindGDAL) first
talregev 4851c1c
remote find package FindGDAL
talregev 1cf4633
Remove upload
talregev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ build | |
| build_* | ||
| build-* | ||
| Ogre.log | ||
| deps/vcpkg/cache | ||
| .DS_Store | ||
| *.swp | ||
| *.orig | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.