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

Switch to using Pixi/Conda for Windows. #802

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 0 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,3 @@
path = windows_docker_resources/rticonnextdds-license
url = [email protected]:osrf/rticonnextdds-license.git
branch = license
[submodule "windows_docker_resources/qtaccount"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These repositories can not be archived/removed are still in use in other places?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they can probably be archived, but I'd say let's wait to do this for a while until this is all settled.

path = windows_docker_resources/qtaccount
url = [email protected]:osrf/qtaccount
clalancette marked this conversation as resolved.
Show resolved Hide resolved
[submodule "windows_docker_resources/ros2-cookbooks"]
path = windows_docker_resources/ros2-cookbooks
url = [email protected]:ros-infrastructure/ros2-cookbooks
branch = latest
12 changes: 0 additions & 12 deletions job_templates/ci_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ if [ "$CI_ENABLE_COVERAGE" = "true" ]; then
fi
if [ -n "${CI_ROS_DISTRO+x}" ]; then
export DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS} --build-arg ROS_DISTRO=${CI_ROS_DISTRO}"
export CI_ARGS="$CI_ARGS --ros-distro $CI_ROS_DISTRO"
fi
if [ -n "${CI_BUILD_ARGS+x}" ]; then
export CI_ARGS="$CI_ARGS --build-args $CI_BUILD_ARGS"
Expand Down Expand Up @@ -242,14 +241,6 @@ rmdir /S /Q ws workspace "work space"
echo "# BEGIN SECTION: Build DockerFile"
set CONTAINER_NAME=ros2_windows_ci_%CI_ROS_DISTRO%
set DOCKERFILE=windows_docker_resources\Dockerfile
set SOLO_FILE=windows_docker_resources\install_ros2_%CI_ROS_DISTRO%.json
set VISUAL_STUDIO_VERSION=%CI_VISUAL_STUDIO_VERSION%

rem "Change dockerfile once per day to invalidate docker caches"
powershell "(Get-Content ${Env:DOCKERFILE}).replace('@@todays_date', $(Get-Date).ToLongDateString()) | Set-Content ${Env:DOCKERFILE}"

rem "Change the chef-solo configuration file to set a specific Visual Studio version.
powershell -noexit "(Get-Content ${Env:SOLO_FILE}).replace('@@vs_version', ${Env:VISUAL_STUDIO_VERSION}) | Set-Content ${Env:SOLO_FILE}"

rem "Finding the Release Version is much easier with powershell than cmd"
powershell $(Get-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Server.OS.amd64' -Name Version).Version > release_version.txt
Expand All @@ -267,9 +258,6 @@ if "!CI_BRANCH_TO_TEST!" NEQ "" (
if "!CI_COLCON_BRANCH!" NEQ "" (
set "CI_ARGS=!CI_ARGS! --colcon-branch !CI_COLCON_BRANCH!"
)
if "!CI_ROS_DISTRO!" NEQ "" (
set "CI_ARGS=!CI_ARGS! --ros-distro !CI_ROS_DISTRO!"
)
if "!CI_USE_WHITESPACE_IN_PATHS!" == "true" (
set "CI_ARGS=!CI_ARGS! --white-space-in sourcespace buildspace installspace workspace"
)
Expand Down
12 changes: 0 additions & 12 deletions job_templates/packaging_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ if [ "$CI_ISOLATED" = "true" ]; then
fi
if [ -n "${CI_ROS_DISTRO+x}" ]; then
export DOCKER_BUILD_ARGS="${DOCKER_BUILD_ARGS} --build-arg ROS_DISTRO=${CI_ROS_DISTRO}"
export CI_ARGS="$CI_ARGS --ros-distro $CI_ROS_DISTRO"
fi
if [ -n "${CI_COLCON_MIXIN_URL+x}" ]; then
export CI_ARGS="$CI_ARGS --colcon-mixin-url $CI_COLCON_MIXIN_URL"
Expand Down Expand Up @@ -238,14 +237,6 @@ rmdir /S /Q ws workspace

set CONTAINER_NAME=ros2_windows_ci_%CI_ROS_DISTRO%
set DOCKERFILE=windows_docker_resources\Dockerfile
set SOLO_FILE=windows_docker_resources\install_ros2_%CI_ROS_DISTRO%.json
set VISUAL_STUDIO_VERSION=%CI_VISUAL_STUDIO_VERSION%

rem "Change dockerfile once per day to invalidate docker caches"
powershell "(Get-Content ${Env:DOCKERFILE}).replace('@@todays_date', $(Get-Date).ToLongDateString()) | Set-Content ${Env:DOCKERFILE}"

rem "Change the chef-solo configuration file to set a specific Visual Studio version.
powershell -noexit "(Get-Content ${Env:SOLO_FILE}).replace('@@vs_version', ${Env:VISUAL_STUDIO_VERSION}) | Set-Content ${Env:SOLO_FILE}"

rem "Finding the Release Version is much easier with powershell than cmd"
powershell $(Get-ItemProperty -Path 'HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Update\TargetingInfo\Installed\Server.OS.amd64' -Name Version).Version > release_version.txt
Expand All @@ -263,9 +254,6 @@ if "!CI_BRANCH_TO_TEST!" NEQ "" (
if "!CI_COLCON_BRANCH!" NEQ "" (
set "CI_ARGS=!CI_ARGS! --colcon-branch !CI_COLCON_BRANCH!"
)
if "!CI_ROS_DISTRO!" NEQ "" (
set "CI_ARGS=!CI_ARGS! --ros-distro !CI_ROS_DISTRO!"
)
if "!CI_USE_CONNEXTDDS!" == "false" (
set "CI_ARGS=!CI_ARGS! --ignore-rmw rmw_connextdds"
)
Expand Down
128 changes: 16 additions & 112 deletions ros2_batch_job/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,42 +50,6 @@

PipPackage = collections.namedtuple('PipPackage', ['pkgname' ,'importname', 'version'])

pip_dependencies = [
PipPackage('EmPy', 'em', '<4'),
PipPackage('catkin_pkg', 'catkin_pkg', ''),
PipPackage('cryptography', 'cryptography', '<=3.0'),
PipPackage('coverage', 'coverage', ''),
PipPackage('flake8', 'flake8', '<5.0.0'),
PipPackage('flake8-blind-except', 'flake8_blind_except', '==0.1.1'),
PipPackage('flake8-builtins', 'flake8_builtins', ''),
PipPackage('flake8-class-newline', 'flake8_class_newline', ''),
PipPackage('flake8-comprehensions', 'flake8_comprehensions', ''),
PipPackage('flake8-deprecated', 'flake8_deprecated', ''),
PipPackage('flake8-docstrings', 'flake8_docstrings', ''),
PipPackage('flake8-import-order', 'flake8_import_order', ''),
PipPackage('flake8-quotes', 'flake8_quotes', ''),
PipPackage('importlib-metadata', 'importlib_metadata', ''),
PipPackage('lark', 'lark', '==1.1.1'),
PipPackage('mypy', 'mypy', '==0.931'),
PipPackage('nose', 'nose', ''),
PipPackage('osrf-pycommon', 'osrf_pycommon', ''),
PipPackage('pathspec', 'pathspec', ''),
PipPackage('pydocstyle', 'pydocstyle', ''),
PipPackage('pyflakes', 'pyflakes', ''),
PipPackage('pyparsing', 'pyparsing', '==2.4.7'),
PipPackage('pytest', 'pytest', '==6.2.5'),
PipPackage('pytest-cov', 'pytest_cov', ''),
PipPackage('pytest-mock', 'pytest_mock', ''),
PipPackage('pytest-repeat', 'pytest_repeat', ''),
PipPackage('pytest-rerunfailures', 'pytest_rerunfailures', ''),
PipPackage('pytest-runner', 'ptr', ''),
PipPackage('pytest-timeout', 'pytest_timeout', '==2.1.0'),
PipPackage('pyyaml', 'yaml', ''),
PipPackage('setuptools', 'setuptools', '==59.6.0'),
PipPackage('vcstool', 'vcstool', ''),
PipPackage('yamllint', 'yamllint', ''),
]

colcon_packages = [
PipPackage('colcon-core', 'colcon_core', ''),
PipPackage('colcon-defaults', 'colcon_defaults', ''),
Expand Down Expand Up @@ -197,9 +161,6 @@ def __call__(self, parser, namespace, values, option_string=None):
parser.add_argument(
'--force-ansi-color', default=False, action='store_true',
help="forces this program to output ansi color")
parser.add_argument(
'--ros-distro', required=True,
help="The ROS distribution being built")
parser.add_argument(
'--colcon-mixin-url', default=None,
help='A mixin index url to be included by colcon')
Expand Down Expand Up @@ -453,78 +414,10 @@ def run(args, build_function, blacklisted_package_names=None):

# Now inside of the workspace...
with change_directory(args.workspace):
def need_package_from_pipy(pkg_name):
try:
importlib.import_module(pkg_name)
except ModuleNotFoundError:
return True

return False

print('# BEGIN SUBSECTION: install Python packages')
# Print setuptools version
job.run(['"%s"' % job.python, '-c', '"import setuptools; print(setuptools.__version__)"'],
shell=True)

# Print the pip version
job.run(['"%s"' % job.python, '-m', 'pip', '--version'], shell=True)

# Install pip dependencies
pip_packages = []
constraints = []

potential_pip_packages = pip_dependencies
if not args.colcon_branch:
potential_pip_packages += colcon_packages

# We prefer to get packages from the distribution if they are already installed.
# If not, we add to the list to install from pip.
for pkgname, importname, version in pip_dependencies:
if need_package_from_pipy(importname):
pip_packages.append(pkgname)
# Even if we don't need to install the package, we still add the constraints
# (if they exist) so that other package installations will respect these.
if version:
constraints.append(f'{pkgname}{version}')

if sys.platform == 'win32':
# Install fork of pyreadline containing fix for deprecation warnings
# TODO(jacobperron): Until upstream issue is resolved https://github.com/pyreadline/pyreadline/issues/65
pip_packages += ['git+https://github.com/osrf/pyreadline']

# Setuptools > 61 somehow have broken Windows Debug. Pin it to 59.6.0 here which
# matches Ubuntu Jammy, and wait until upstream setuptools settles down.
pip_packages += ["setuptools==59.6.0"]

pip_packages += ['cryptography', 'lxml', 'numpy']
if args.ros_distro in ('humble', 'iron'):
pip_packages.append('netifaces')

# to ensure that the build type specific package is installed
job.run(
['"%s"' % job.python, '-m', 'pip', 'uninstall', '-y'] +
['cryptography', 'lxml', 'numpy'], shell=True)

if pip_packages:
print('Using constraints:')
print('\n'.join(constraints))
with open('constraints.txt', 'w') as outfp:
outfp.write('\n'.join(constraints) + '\n')

pip_cmd = ['"%s"' % job.python, '-m', 'pip', 'install', '-c', 'constraints.txt', '-U']
if sys.platform == 'win32':
# Force reinstall so all dependencies are in virtual environment
# On Windows since we switch between the debug and non-debug
# interpreter all packages need to be reinstalled too
pip_cmd.append('--force-reinstall')

job.run(
pip_cmd + pip_packages,
shell=True)

vcs_cmd = ['vcs']

if args.colcon_branch:
print('# BEGIN SUBSECTION: install custom colcon')
# create .repos file for colcon repositories
os.makedirs('colcon', exist_ok=True)
with open('colcon/colcon.repos', 'w') as h:
Expand Down Expand Up @@ -553,19 +446,30 @@ def need_package_from_pipy(pkg_name):
['"%s"' % job.python, '-m', 'pip', 'install', '-U'] +
['colcon/%s' % pkgname for pkgname, importname, version in colcon_packages],
shell=True)
print('# END SUBSECTION')

colcon_script = which('colcon')

# Show what pip has
job.run(['"%s"' % job.python, '-m', 'pip', 'freeze', '--all'], shell=True)
print('# END SUBSECTION')

# Fetch colcon mixins
if args.colcon_mixin_url:
print('# BEGIN SUBSECTION: Fetch colcon mixins')
true_cmd = 'VER>NUL' if sys.platform == 'win32' else 'true'
job.run([colcon_script, 'mixin', 'remove', 'default', '||', true_cmd], shell=True)
job.run([colcon_script, 'mixin', 'add', 'default', args.colcon_mixin_url], shell=True)
job.run([colcon_script, 'mixin', 'update', 'default'], shell=True)
print('# END SUBSECTION')

print('# BEGIN SUBSECTION: Print python versions')
# Print setuptools version
job.run(['"%s"' % job.python, '-c', '"import setuptools; print(setuptools.__version__)"'],
shell=True)
clalancette marked this conversation as resolved.
Show resolved Hide resolved

# Print the pip version
job.run(['"%s"' % job.python, '-m', 'pip', '--version'], shell=True)

# Show what pip has
job.run(['"%s"' % job.python, '-m', 'pip', 'list'], shell=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we wouldn't prefer pip freeze --all here in order to get information about all installed packages. I can't say exactly what's excluded without the --all but it is bothersome to me that some things are.

This suggestion is non-blocking.

Suggested change
job.run(['"%s"' % job.python, '-m', 'pip', 'list'], shell=True)
job.run(['"%s"' % job.python, '-m', 'pip', 'freeze', '--all'], shell=True)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, this is a good question. Early on in development here, I found that pip freeze --all just would not work properly in a Conda environment. I seem to remember it giving me either empty or weird results. Because of that, I ended up changing to pip list everywhere.

But it is long enough ago that I now don't remember exactly what the problem was. Let me go back and do some testing here and see if that was either a misconfiguration, or something more serious here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right. The issue popped up immediately when I tried it locally.

For reasons I don't understand, when installing python packages via pixi/conda, the output from pip freeze --all looks like this:

(pixi_ros2_rolling) C:\dev\rolling>pip freeze --all
argcomplete @ file:///home/conda/feedstock_root/build_artifacts/argcomplete_1698912039670/work
catkin-pkg @ file:///home/conda/feedstock_root/build_artifacts/catkin_pkg_1694651879177/work
cffi @ file:///D:/bld/cffi_1725560655177/work
...

(truncated for brevity). As you can see, the output there doesn't give much useful information about which version of the package is installed, and thus in the CI job output it isn't very helpful. That's why I switched to pip list everywhere.

print('# END SUBSECTION')

print('# BEGIN SUBSECTION: import repositories')
repos_file_urls = [args.repo_file_url]
Expand Down
2 changes: 1 addition & 1 deletion ros2_batch_job/linux_batch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def show_env(self):
# Show the env
self.run(['export'], shell=True)
# Show what pip has
self.run(['"%s"' % self.python, '-m', 'pip', 'freeze', '--all'], shell=True)
self.run(['"%s"' % self.python, '-m', 'pip', 'list'], shell=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I'd actually advocate for freeze --all over just list. What prompted the change?


def setup_env(self):
current_run = self.run
Expand Down
2 changes: 1 addition & 1 deletion ros2_batch_job/windows_batch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def show_env(self):
# Show the env
self.run(['set'], shell=True)
# Show what pip has
self.run([self.python, '-m', 'pip', 'freeze', '--all'])
self.run([self.python, '-m', 'pip', 'list'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I'd actually advocate for freeze --all over just list. What prompted the change?


def setup_env(self):
# Generate the env file
Expand Down
75 changes: 36 additions & 39 deletions windows_docker_resources/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,53 +18,50 @@ ARG WINDOWS_RELEASE_VERSION=$WINDOWS_RELEASE_ID
# Use --isolation=process if you need to build in a mounted volume
FROM mcr.microsoft.com/windows/server:$WINDOWS_RELEASE_VERSION

# Install cinc-solo, a compiled binary of chef-solo
RUN powershell "iex ((New-Object System.Net.WebClient).DownloadString('https://omnitruck.cinc.sh/install.ps1')); install -version 16.15.22"
# Update certificate bundle to work Let's Encrypt root certificate expiration
# https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/
# (in the parlance of the above post we're using workaround 1)
# This workaround is being incorporated directly in future releases of Cinc 16 and 17.
# Our application of the work around should be removed when updating to such a version.
COPY cacert.pem c:\cinc-project\cinc\embedded\ssl\certs\cacert.pem
COPY cacert.pem c:\cinc-project\cinc\embedded\lib\ruby\gems\2.7.0\gems\httpclient-2.8.3\lib\httpclient\cacert.pem
# Download and install all versions of MSVC we support.
# While this makes the images larger, it also means that we are certain to
# reuse the Docker layer cache, which should speed everything up.
# run_ros2_batch.py will source the appropriate one.

# Install Chocolatey by powershell script
# Install MSVC 2019
RUN powershell -noexit irm https://aka.ms/vs/16/release/vs_buildtools.exe -OutFile vs_buildtools_2019.exe
RUN vs_buildtools_2019.exe --quiet --wait --norestart --add Microsoft.Component.MSBuild --add Microsoft.Net.Component.4.6.1.TargetingPack --add Microsoft.Net.Component.4.8.SDK --add Microsoft.VisualStudio.Component.CoreBuildTools --add Microsoft.VisualStudio.Component.Roslyn.Compiler --add Microsoft.VisualStudio.Component.TextTemplating --add Microsoft.VisualStudio.Component.VC.CLI.Support --add Microsoft.VisualStudio.Component.VC.CoreBuildTools --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Workload.VCTools

# Pinning chocolatey version to 1.4.0 previous one to major bump to 2.0.0 due to issues with chocolatey_package chef resource
# See https://github.com/chef/chef/issues/13751 for more detail of the issue
# This should be solved for chef version 18; see https://github.com/chef/chef/pull/13833
RUN powershell -noexit "$env:chocolateyDownloadUrl = 'https://community.chocolatey.org/api/v2/package/chocolatey/1.4.0'; Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
# Install MSVC 2022
RUN powershell -noexit irm https://aka.ms/vs/17/release/vs_buildtools.exe -OutFile vs_buildtools_2022.exe
RUN vs_buildtools_2022.exe --quiet --wait --norestart --add Microsoft.Component.MSBuild --add Microsoft.Net.Component.4.6.1.TargetingPack --add Microsoft.Net.Component.4.8.SDK --add Microsoft.VisualStudio.Component.CoreBuildTools --add Microsoft.VisualStudio.Component.Roslyn.Compiler --add Microsoft.VisualStudio.Component.TextTemplating --add Microsoft.VisualStudio.Component.VC.CLI.Support --add Microsoft.VisualStudio.Component.VC.CoreBuildTools --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Workload.VCTools

# choco installs. chef-workstation is being installed to get berks and download cookbook dependencies
RUN choco install -y git chef-workstation
# Install pixi
RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://pixi.sh/install.ps1'))"
j-rivero marked this conversation as resolved.
Show resolved Hide resolved
clalancette marked this conversation as resolved.
Show resolved Hide resolved

# Copy over necessary files into container
# Install dependencies via pixi
ARG ROS_DISTRO=rolling
WORKDIR C:\pixi_ws
RUN powershell -noexit irm https://raw.githubusercontent.com/ros2/ros2/refs/heads/$ROS_DISTRO/pixi.toml -OutFile pixi.toml
RUN pixi --color never --no-progress -q install
RUN pixi --color never --no-progress -q list

# Setup environment variables needed for Connext
ENV RTI_LICENSE_FILE C:\connext\rti_license.dat
ENV CONNEXTDDS_DIR C:\connext\rti_connext_dds-6.0.1
ENV RTI_OPENSSL_BIN C:\connext\openssl-1.1.1k\x64Win64VS2017\bin
ENV RTI_OPENSSL_LIB C:\connext\openssl-1.1.1k\x64Win64VS2017\lib

# Copy over necessary Connext files into container
RUN IF NOT EXIST "C:\TEMP" mkdir C:\TEMP
COPY rticonnextdds-license\ C:\TEMP\rticonnextdds-license
COPY rticonnextdds-src\ C:\TEMP\rticonnextdds-src
RUN copy /b C:\TEMP\rticonnextdds-src\rti_connext_dds-6.0.1-pro-host-x64Win64.exe.??? C:\TEMP\rticonnextdds-src\rti_connext_dds-6.0.1-pro-host-x64Win64.exe
RUN copy /b C:\TEMP\rticonnextdds-src\rti_connext_dds-6.0.1-pro-target-x64Win64VS2017.rtipkg.??? C:\TEMP\rticonnextdds-src\rti_connext_dds-6.0.1-pro-target-x64Win64VS2017.rtipkg
COPY rticonnextdds-license\rti_license.dat $RTI_LICENSE_FILE

# ROS_DISTRO argument should be set to install dependencies for the target ROS version.
ARG ROS_DISTRO

COPY install_ros2_${ROS_DISTRO}.json C:\TEMP\
COPY solo.rb C:\TEMP\
COPY ros2-cookbooks\ C:\TEMP\ros2-cookbooks
RUN IF NOT EXIST "C:\TEMP" mkdir C:\TEMP\environments
COPY qtaccount\ros2ci.rb C:\TEMP\environments\ros2ci.rb

# Download vendor cookbooks
WORKDIR C:\TEMP\ros2-cookbooks\cookbooks\ros2_windows
RUN C:\opscode\chef-workstation\bin\berks vendor C:\TEMP\ros2-cookbooks\cookbooks
# Install Connext
RUN pixi run 7z x -oC:\connext C:\TEMP\rticonnextdds-src\openssl-1.1.1k-target-x64Win64VS2017.zip
RUN C:\TEMP\rticonnextdds-src\rti_connext_dds-6.0.1-pro-host-x64Win64.exe --mode unattended --unattendedmodeui minimalWithDialogs --prefix C:\connext
RUN %CONNEXTDDS_DIR%\bin\rtipkginstall.bat -u C:\TEMP\rticonnextdds-src\openssl-1.1.1k-6.0.1.25-host-x64Win64.rtipkg
RUN %CONNEXTDDS_DIR%\bin\rtipkginstall.bat -u C:\TEMP\rticonnextdds-src\rti_connext_dds-6.0.1-pro-target-x64Win64VS2017.rtipkg
RUN %CONNEXTDDS_DIR%\bin\rtipkginstall.bat -u C:\TEMP\rticonnextdds-src\rti_security_plugins-6.0.1.25-host-x64Win64.rtipkg
RUN %CONNEXTDDS_DIR%\bin\rtipkginstall.bat -u C:\TEMP\rticonnextdds-src\rti_security_plugins-6.0.1.25-target-x64Win64VS2017.rtipkg

# Initial run
RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -Eros2ci -j C:\TEMP\install_ros2_%ROS_DISTRO%.json

# Invalidate daily to run updates
RUN echo "@todays_date"
RUN c:\cinc-project\cinc\bin\cinc-solo.bat -c C:\TEMP\solo.rb -Eros2ci -j C:\TEMP\install_ros2_%ROS_DISTRO%.json

WORKDIR C:\ci
# Note that this *must* be in shell form, not exec form, so Docker on Windows appropriately substitutes %CI_ARGS%
CMD "python run_ros2_batch.py %CI_ARGS%"
WORKDIR C:\ci
CMD "pixi run --manifest-path C:\pixi_ws\pixi.toml python run_ros2_batch.py %CI_ARGS%"
Loading