Skip to content

Commit 6a537f7

Browse files
authored
Merge branch 'master' into jrivero/define_win_conda_ci
2 parents 08d6afd + 2c6d20e commit 6a537f7

File tree

9 files changed

+3183
-3384
lines changed

9 files changed

+3183
-3384
lines changed

conda/envs/legacy/pixi.lock

+1,491-1,650
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conda/envs/legacy/pixi.toml

+6-12
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,18 @@ zeromq = "4.3.4"
4040
dlfcn-win32 = "*"
4141
vs2019_win-64 = "*"
4242

43-
[target.linux-64.dependencies]
43+
[target.linux.dependencies]
44+
libegl-devel = "*"
45+
libgl-devel = "*"
4446
libglu = "*"
45-
libglvnd-devel-cos7-x86_64 = "*"
47+
libglvnd-devel = "*"
48+
49+
[target.linux-64.dependencies]
4650
libwebsockets = "*"
47-
mesa-libegl-devel-cos7-x86_64 = "*"
48-
mesa-libgl-devel-cos7-x86_64 = "*"
4951
vulkan-headers = "*"
5052

51-
[target.linux-aarch64.dependencies]
52-
libglu = "*"
53-
libglvnd-devel-cos7-aarch64 = "*"
54-
mesa-libegl-devel-cos7-aarch64 = "*"
55-
mesa-libgl-devel-cos7-aarch64 = "*"
56-
5753
[build-dependencies]
5854
cmake = "3.28.3.*"
5955
colcon-common-extensions = "*"
6056
pkg-config = "*"
6157
vcstool = "*"
62-
63-
# test

conda/envs/legacy_ogre23/pixi.lock

+1,491-1,650
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conda/envs/legacy_ogre23/pixi.toml

+6-10
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,16 @@ zeromq = "4.3.4"
4040
dlfcn-win32 = "*"
4141
vs2019_win-64 = "*"
4242

43-
[target.linux-64.dependencies]
43+
[target.linux.dependencies]
44+
libegl-devel = "*"
45+
libgl-devel = "*"
4446
libglu = "*"
45-
libglvnd-devel-cos7-x86_64 = "*"
47+
libglvnd-devel = "*"
48+
49+
[target.linux-64.dependencies]
4650
libwebsockets = "*"
47-
mesa-libegl-devel-cos7-x86_64 = "*"
48-
mesa-libgl-devel-cos7-x86_64 = "*"
4951
vulkan-headers = "*"
5052

51-
[target.linux-aarch64.dependencies]
52-
libglu = "*"
53-
libglvnd-devel-cos7-aarch64 = "*"
54-
mesa-libegl-devel-cos7-aarch64 = "*"
55-
mesa-libgl-devel-cos7-aarch64 = "*"
56-
5753
[build-dependencies]
5854
cmake = "3.28.3.*"
5955
colcon-common-extensions = "*"

jenkins-scripts/docker/lib/docker_generate_dockerfile.bash

+3-2
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ ADD https://api.github.com/repos/gazebo-tooling/gzdev/git/refs/heads/$GZDEV_BRAN
5858
RUN rm -fr ${GZDEV_DIR} \
5959
&& git clone https://github.com/gazebo-tooling/gzdev -b ${GZDEV_BRANCH} ${GZDEV_DIR}
6060
DELIM_OSRF_REPO_GIT_1
61-
if [ -n $GZDEV_TRY_BRANCH ]; then
61+
GZDEV_TRY_BRANCH_URL="https://api.github.com/repos/gazebo-tooling/gzdev/git/refs/heads/$GZDEV_TRY_BRANCH"
62+
if [ -n $GZDEV_TRY_BRANCH ] && curl --output /dev/null --silent --head --fail $GZDEV_TRY_BRANCH_URL; then
6263
cat >> Dockerfile << DELIM_OSRF_REPO_GIT_2
63-
ADD https://api.github.com/repos/gazebo-tooling/gzdev/git/refs/heads/$GZDEV_TRY_BRANCH version.json
64+
ADD $GZDEV_TRY_BRANCH_URL version.json
6465
RUN git -C ${GZDEV_DIR} fetch origin $GZDEV_TRY_BRANCH || true;
6566
RUN git -C ${GZDEV_DIR} checkout $GZDEV_TRY_BRANCH || true;
6667
DELIM_OSRF_REPO_GIT_2

jenkins-scripts/lib/colcon-default-devel-windows.bat

+70-36
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,6 @@ if "%COLCON_AUTO_MAJOR_VERSION%" == "true" (
3535
echo "MAJOR_VERSION detected: !PKG_MAJOR_VERSION!"
3636
)
3737

38-
:: vcpkg cache provisioned agents does not seems to support
39-
:: the GPU correctly so only apply the check if the agent
40-
:: is working with pixi
41-
if "%USE_PIXI%" == "true" (
42-
if "%GPU_SUPPORT_NEEDED%" == "true" (
43-
echo # BEGIN SECTION: dxdiag info
44-
set DXDIAG_FILE=%WORKSPACE%\dxdiag.txt
45-
dxdiag /t !DXDIAG_FILE!
46-
type !DXDIAG_FILE!
47-
echo Checking for correct NVIDIA GPU support !DXDIAG_FILE!
48-
findstr /C:"Manufacturer: NVIDIA" !DXDIAG_FILE!
49-
if errorlevel 1 (
50-
echo ERROR: NVIDIA GPU not found in dxdiag
51-
goto :error
52-
)
53-
echo # END SECTION
54-
)
55-
)
56-
5738
setlocal ENABLEDELAYEDEXPANSION
5839
if not defined GAZEBODISTRO_FILE (
5940
for /f %%i in ('python "%SCRIPT_DIR%\tools\detect_cmake_major_version.py" "%WORKSPACE%\%VCS_DIRECTORY%\CMakeLists.txt"') do set PKG_MAJOR_VERSION=%%i
@@ -78,18 +59,76 @@ if not exist %WORKSPACE%\%VCS_DIRECTORY% (
7859
exit 1
7960
)
8061

81-
:: Call vcvarsall and all the friends
82-
echo # BEGIN SECTION: configure the MSVC compiler
83-
call %win_lib% :configure_msvc2019_compiler
84-
echo # END SECTION
62+
if defined USE_PIXI (
8563

86-
:: Prepare a clean vcpkg environment with external dependencies
87-
call %win_lib% :remove_vcpkg_installation || goto :error
88-
echo # BEGIN SECTION: vcpkg: install all dependencies
89-
call %win_lib% :setup_vcpkg_all_dependencies || goto :error
90-
echo # END SECTION
91-
echo # BEGIN SECTION: vcpkg: list installed packages
92-
call %win_lib% :list_vcpkg_packages || goto :error
64+
:: vcpkg cache provisioned agents does not seems to support
65+
:: the GPU correctly so only apply the check if the agent
66+
:: is working with pixi
67+
if "%GPU_SUPPORT_NEEDED%" == "true" (
68+
echo # BEGIN SECTION: dxdiag info
69+
set DXDIAG_FILE=%WORKSPACE%\dxdiag.txt
70+
dxdiag /t !DXDIAG_FILE!
71+
type !DXDIAG_FILE!
72+
echo Checking for correct NVIDIA GPU support !DXDIAG_FILE!
73+
findstr /C:"Manufacturer: NVIDIA" !DXDIAG_FILE!
74+
if errorlevel 1 (
75+
echo ERROR: NVIDIA GPU not found in dxdiag
76+
goto :error
77+
)
78+
echo # END SECTION
79+
)
80+
81+
:: Prepare a clean vcpkg environment with external dependencies
82+
echo # BEGIN SECTION: remove vcpkg install directory
83+
call %win_lib% :remove_vcpkg_installation || goto :error
84+
echo # END SECTION
85+
86+
if not defined REUSE_PIXI_INSTALLATION (
87+
echo # BEGIN SECTION: pixi: installation
88+
call %win_lib% :pixi_installation || goto :error
89+
echo # END SECTION
90+
91+
echo # BEGIN SECTION: pixi: create legacy environment
92+
call %win_lib% :pixi_create_gz_environment_legacy || goto :error
93+
echo # END SECTION
94+
)
95+
96+
echo # BEGIN SECTION: pixi: info
97+
call %win_lib% :pixi_cmd info || goto :error
98+
echo # END SECTION
99+
100+
echo # BEGIN SECTION: pixi: list packages
101+
call %win_lib% :pixi_cmd list || goto :error
102+
echo # END SECTION
103+
104+
echo # BEGIN SECTION: pixi: enable shell
105+
call %win_lib% :pixi_load_shell
106+
echo # END SECTION
107+
108+
echo # BEGIN SECTION: pixi: custom environment variable for gz
109+
if "!CONDA_PREFIX!"=="" (
110+
echo # BEGIN SECTION: ERROR: CONDA_PREFIX is not set
111+
echo CONDA_PREFIX variable was not set. Please set it before calling this script
112+
echo # END SECTION
113+
goto :error
114+
)
115+
set OGRE_RESOURCE_PATH=!CONDA_PREFIX!\Library\bin
116+
set OGRE2_RESOURCE_PATH=!CONDA_PREFIX!\Library\bin\OGRE-Next
117+
echo # END SECTION
118+
) else (
119+
:: Call vcvarsall and all the friends
120+
echo # BEGIN SECTION: configure the MSVC compiler
121+
call %win_lib% :configure_msvc2019_compiler
122+
echo # END SECTION
123+
124+
echo # BEGIN SECTION: vcpkg: install all dependencies
125+
call %win_lib% :setup_vcpkg_all_dependencies || goto :error
126+
echo # END SECTION
127+
128+
echo # BEGIN SECTION: vcpkg: list installed packages
129+
call %win_lib% :list_vcpkg_packages || goto :error
130+
echo # END SECTION
131+
)
93132

94133
echo # BEGIN SECTION: setup workspace
95134
if not defined KEEP_WORKSPACE (
@@ -118,10 +157,6 @@ echo # BEGIN SECTION: packages in workspace
118157
call %win_lib% :list_workspace_pkgs || goto :error
119158
echo # END SECTION
120159

121-
if exist %LOCAL_WS_SOFTWARE_DIR%\configure.bat (
122-
echo "DEPRECATED configure.bat file detected. It should be removed from upstream sources"
123-
)
124-
125160
:: Check if package is in colcon workspace
126161
echo # BEGIN SECTION: Update package !COLCON_PACKAGE! from gz to ignition
127162
echo Packages in workspace:
@@ -141,7 +176,6 @@ if errorlevel 1 (
141176
echo Using package name !COLCON_PACKAGE!
142177
echo # END SECTION
143178

144-
145179
echo # BEGIN SECTION: compiling %VCS_DIRECTORY%
146180
cd %LOCAL_WS%
147181
call %win_lib% :build_workspace !COLCON_PACKAGE! !COLCON_PACKAGE_EXTRA_CMAKE_ARGS! || goto :error
@@ -157,7 +191,7 @@ if "%ENABLE_TESTS%" == "TRUE" (
157191
echo # BEGIN SECTION: export testing results
158192
if exist %EXPORT_TEST_RESULT_PATH% ( rmdir /q /s %EXPORT_TEST_RESULT_PATH% )
159193
mkdir %EXPORT_TEST_RESULT_PATH%
160-
xcopy !TEST_RESULT_PATH! %EXPORT_TEST_RESULT_PATH% /s /i /e || goto :error^M
194+
xcopy !TEST_RESULT_PATH! %EXPORT_TEST_RESULT_PATH% /s /i /e || goto :error
161195
echo # END SECTION
162196
)
163197

jenkins-scripts/lib/windows_env_vars.bat

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1+
set "PIXI_VERSION=0.30.0"
2+
set "PIXI_URL=https://github.com/prefix-dev/pixi/releases/download/v%PIXI_VERSION%/pixi-x86_64-pc-windows-msvc.exe"
3+
set "PIXI_PROJECT_PATH=%TMP%\pixi\project"
4+
set "PIXI_TMPDIR=%TMP%\pixi"
5+
set "PIXI_TMP=%PIXI_TMPDIR%\pixi.exe"
6+
set "CONDA_ENVS_DIR=%SCRIPT_DIR%\..\conda\envs\"
7+
18
if exist D:\vcpkg (
29
set VCPKG_DIR=D:\vcpkg
310
) else if exist C:\vcpkg (
411
set VCPKG_DIR=C:\vcpkg
512
) else (
6-
echo "Can not find a vcpkg installation"
7-
exit -1
13+
if defined USE_PIXI (
14+
:: vcpkg removed by pixi. Recreate a fake one until vcpkg is removed from nodes
15+
if not exist VCPKG_DIR set "VCPKG_DIR=%TMP%\%RANDOM%\vcpkg"
16+
mkdir !VCPKG_DIR!
17+
) else (
18+
echo "Can not find a vcpkg installation"
19+
exit -1
20+
)
21+
)
22+
23+
if NOT DEFINED EXIT_ON_ERROR (
24+
set EXIT_ON_ERROR=
825
)
926

1027
if DEFINED MAKE_JOBS (

jenkins-scripts/lib/windows_library.bat

+83-13
Original file line numberDiff line numberDiff line change
@@ -208,18 +208,32 @@ set COLCON_EXTRA_CMAKE_ARGS2=%4
208208
set MAKEFLAGS=-j%MAKE_JOBS%
209209

210210
echo "COLCON_EXTRA_ARGS: %COLCON_EXTRA_ARGS% %COLCON_PACKAGE%"
211-
echo "COLCON_EXTRA_CMAKE_ARGS: %COLCON_EXTRA_CMAKE_ARGS%"
212-
echo "COLCON_EXTRA_CMAKE_ARGS2: %COLCON_EXTRA_CMAKE_ARGS2%"
213-
214-
colcon build --build-base "build"^
215-
--install-base "install"^
216-
--parallel-workers %MAKE_JOBS%^
217-
%COLCON_EXTRA_ARGS% %COLCON_PACKAGE%^
218-
--cmake-args " -DCMAKE_BUILD_TYPE=%BUILD_TYPE%"^
219-
" -DCMAKE_TOOLCHAIN_FILE=%VCPKG_CMAKE_TOOLCHAIN_FILE%"^
220-
" -DVCPKG_TARGET_TRIPLET=%VCPKG_DEFAULT_TRIPLET%"^
221-
%COLCON_EXTRA_CMAKE_ARGS% %COLCON_EXTRA_CMAKE_ARGS2%^
222-
--event-handler console_cohesion+ || goto :error
211+
212+
if defined USE_PIXI (
213+
@echo on
214+
colcon build --build-base "build"^
215+
--install-base "install"^
216+
--parallel-workers %MAKE_JOBS%^
217+
%COLCON_EXTRA_ARGS% %COLCON_PACKAGE%^
218+
--cmake-args " -DCMAKE_BUILD_TYPE=%BUILD_TYPE%"^
219+
%COLCON_EXTRA_CMAKE_ARGS% %COLCON_EXTRA_CMAKE_ARGS2%^
220+
--event-handler console_cohesion+ || goto :error
221+
) else (
222+
echo "COLCON_EXTRA_CMAKE_ARGS: %COLCON_EXTRA_CMAKE_ARGS%"
223+
echo "COLCON_EXTRA_CMAKE_ARGS2: %COLCON_EXTRA_CMAKE_ARGS2%"
224+
@echo on
225+
colcon build --build-base "build"^
226+
--install-base "install"^
227+
--parallel-workers %MAKE_JOBS%^
228+
%COLCON_EXTRA_ARGS% %COLCON_PACKAGE%^
229+
--cmake-args " -DCMAKE_BUILD_TYPE=%BUILD_TYPE%"^
230+
" -DCMAKE_TOOLCHAIN_FILE=%VCPKG_CMAKE_TOOLCHAIN_FILE%"^
231+
" -DVCPKG_TARGET_TRIPLET=%VCPKG_DEFAULT_TRIPLET%"^
232+
%COLCON_EXTRA_CMAKE_ARGS% %COLCON_EXTRA_CMAKE_ARGS2%^
233+
--event-handler console_cohesion+ || goto :error
234+
)
235+
@echo off
236+
223237
goto :EOF
224238

225239
:: ##################################
@@ -299,7 +313,7 @@ if [%VCPKG_INSTALLED_FILES_DIR%]==[] (
299313
echo VCPKG_INSTALLED_FILES_DIR variable seems empty, this is a bug
300314
goto :error
301315
)
302-
del /s /f /q %VCPKG_INSTALLED_FILES_DIR%
316+
rmdir /s /q %VCPKG_INSTALLED_FILES_DIR%
303317
goto :EOF
304318

305319
:: ##################################
@@ -372,6 +386,62 @@ for %%p in (%VCPKG_DEPENDENCIES_LEGACY%) do (
372386
)
373387
goto :EOF
374388

389+
:: ##################################
390+
::
391+
:: Download the pixi binary to the system
392+
:pixi_installation
393+
echo Downloading pixi %PIXI_VERSION% in %PIXI_TMPDIR%
394+
if not exist "%PIXI_TMPDIR%" mkdir "%PIXI_TMPDIR%"
395+
pushd %PIXI_TMPDIR%
396+
call :wget "%PIXI_URL%" pixi.exe
397+
if errorlevel 1 exit 1
398+
popd
399+
goto :EOF
400+
401+
:: ##################################
402+
::
403+
:: Create a pixi environment
404+
:pixi_create_gz_environment_legacy
405+
406+
if exist %PIXI_PROJECT_PATH% ( rmdir /s /q "%PIXI_PROJECT_PATH%")
407+
if errorlevel 1 exit 1
408+
mkdir %PIXI_PROJECT_PATH%
409+
copy %CONDA_ENVS_DIR%\legacy\pixi.* %PIXI_PROJECT_PATH%
410+
if errorlevel 1 exit 1
411+
pushd %PIXI_PROJECT_PATH%
412+
if errorlevel 1 exit 1
413+
call %win_lib% :pixi_cmd install
414+
if errorlevel 1 exit 1
415+
popd
416+
goto :EOF
417+
418+
:: ##################################
419+
:pixi_load_shell
420+
:: pixi shell won't work since it spawns a blocking cmd inside Jenkins
421+
:: instead use the hook and execute them in the current shell
422+
pushd %PIXI_PROJECT_PATH%
423+
call %win_lib% :pixi_cmd shell-hook --locked > hooks.bat
424+
type hooks.bat
425+
call hooks.bat
426+
:: ERRORS in hooks will make the build to fail. Be permissive
427+
:: if errorlevel 1 exit EXTRA_EXIT_PARAM 1
428+
popd
429+
goto :EOF
430+
431+
:: ##################################
432+
:pixi_cmd
433+
:: arg1 pixi command to run on PIXI_PROJECT_PATH
434+
:: arg2 pixi second argument
435+
echo Running pixi %~1 %~2
436+
:: If using --manifest-file Windows will complain about permissions
437+
:: using error number 5 :?. Use pushd and popd to go into the
438+
:: project directory.
439+
pushd %PIXI_PROJECT_PATH%
440+
call "%PIXI_TMP%" %1 %2
441+
if errorlevel 1 exit 1
442+
popd
443+
goto :EOF
444+
375445
:: ##################################
376446
:error - error routine
377447
::

0 commit comments

Comments
 (0)