Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve windows workflow #1052

Draft
wants to merge 23 commits into
base: gz-rendering9
Choose a base branch
from
Draft
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
53 changes: 33 additions & 20 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ jobs:
build:
name: Window CI
env:
PACKAGE: gz-rendering9
runs-on: windows-latest
LIBRARY_NAME: gz-rendering
COLCON_BUILD_CMD: 'colcon build --merge-install --event-handlers console_direct+ --cmake-args -G"Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release'
runs-on: windows-2022
steps:

- uses: actions/checkout@v4
with:
path: src/gz-rendering
- name: Determine major version
shell: bash
run: |
curl -LO https://raw.githubusercontent.com/gazebo-tooling/release-tools/master/jenkins-scripts/tools/detect_cmake_major_version.py
echo PACKAGE="$LIBRARY_NAME$(python3 detect_cmake_major_version.py src/gz-rendering/CMakeLists.txt)" >> $GITHUB_ENV
- name: setup-pixi
uses: prefix-dev/[email protected]
with:
Expand All @@ -18,31 +28,34 @@ jobs:
run: |
pixi init
pixi add vcstool colcon-common-extensions pkgconfig
- name: Setup pixi env variables
shell: bash
- name: Set up environment variables
run: |
eval "$(pixi shell-hook)"
echo CMAKE_PREFIX_PATH=$CONDA_PREFIX/Library >> $GITHUB_ENV
# Set environment variables globally
pixi shell-hook | Out-String | Invoke-Expression
("CMAKE_PREFIX_PATH=${env:CONDA_PREFIX}\Library") >> $env:GITHUB_ENV
("PATH=${env:PATH};${env:GITHUB_WORKSPACE}\install\bin") >> $env:GITHUB_ENV
- name: Install base dependencies
# List adapted from https://github.com/gazebo-tooling/release-tools/blob/f89ac8cafc646260598eb8eb6d94be8093bdc9f7/jenkins-scripts/lib/windows_env_vars.bat#L22
run: pixi add assimp dlfcn-win32 eigen ffmpeg freeimage gdal gflags ogre ogre-next spdlog tinyxml2

- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: sscache environment
shell: bash
run: |
# List adapted from https://github.com/gazebo-tooling/release-tools/blob/f89ac8cafc646260598eb8eb6d94be8093bdc9f7/jenkins-scripts/lib/windows_env_vars.bat#L22
pixi add assimp dlfcn-win32 eigen ffmpeg freeimage gdal gflags ogre ogre-next spdlog tinyxml2
- name: Clone source dependencies
run: |
mkdir src
cd src
pixi run vcs import --input https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/${env:PACKAGE}.yaml
echo CMAKE_C_COMPILER_LAUNCHER="$SCCACHE_PATH" >> $GITHUB_ENV
echo CMAKE_CXX_COMPILER_LAUNCHER="$SCCACHE_PATH" >> $GITHUB_ENV

- uses: actions/checkout@v4
with:
path: src/gz-rendering
- name: Clone source dependencies
run: vcs import --input https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/${env:PACKAGE}.yaml --skip-existing --repos src

- name: Build Dependencies
run: |
pixi run colcon build --merge-install --cmake-args -G"Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF --event-handlers console_direct+ --packages-up-to ${env:PACKAGE}
run: pixi run ${env:COLCON_BUILD_CMD} -DBUILD_TESTING=OFF --packages-skip ${env:PACKAGE}

- name: Build Package
run: pixi run colcon build --merge-install --cmake-args -G"Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DSKIP_ogre=ON --event-handlers console_direct+ --packages-select ${env:PACKAGE}
run: pixi run ${env:COLCON_BUILD_CMD} -DBUILD_TESTING=ON -DSKIP_ogre=ON --packages-select ${env:PACKAGE}

- name: Test
run: pixi run colcon test --merge-install --event-handlers console_direct+ --packages-select ${env:PACKAGE}
run: |
. install\setup.ps1
colcon test --merge-install --event-handlers console_direct+ --packages-select ${env:PACKAGE}
5 changes: 5 additions & 0 deletions src/RenderEngineManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ bool RenderEngineManagerPrivate::LoadEnginePlugin(
{
gzerr << "Failed to load plugin [" << _filename <<
"] : couldn't find shared library." << std::endl;
gzdbg << "Searched in:\n";
for (const auto &path: systemPaths.FilePaths()){
gzdbg << path << "\n";
}

return false;
}

Expand Down
Loading