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

Add packages: libscenario scenariopy scenario gym-ignition #16582

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
e6118d2
Add packages: libscenario, scenariopy, scenario, gym-ignition
diegoferigo Oct 17, 2021
ff2ce4e
Extend run_exports with Ignition dependencies
diegoferigo Oct 20, 2021
dbc0c46
Add osx deployment target
diegoferigo Oct 20, 2021
e535056
Check that the python packages versions match the conda version
diegoferigo Oct 20, 2021
417d408
remove
diegoferigo Oct 20, 2021
3201604
Fix sed call for macOS
diegoferigo Oct 20, 2021
a40ecee
Add sed dependencies
diegoferigo Oct 20, 2021
b597413
Fix subfolder
diegoferigo Oct 20, 2021
1f53bf8
Fix typo in selector
diegoferigo Oct 20, 2021
96c54c9
Fix missing idyntree library
diegoferigo Oct 20, 2021
df51bbd
Inspect diff of files changed during conda build
diegoferigo Oct 20, 2021
e598e68
Add cdt build dependencies from idyntree
diegoferigo Oct 20, 2021
250f6ef
Fix diff
diegoferigo Oct 20, 2021
2e0c3b0
Debug build_scenariopy.sh script
diegoferigo Oct 20, 2021
6af1ef2
Work around diff exit status
diegoferigo Oct 20, 2021
c8ad816
Install gl stuff with yum
diegoferigo Oct 20, 2021
2d268d0
Add libGL support as documented
diegoferigo Oct 20, 2021
5057e04
Use feature/conda-forge upstream branch
diegoferigo Oct 20, 2021
d099ef4
Update build_scenariopy.sh
diegoferigo Oct 20, 2021
e7beb9c
Define dummy script for metapackage
diegoferigo Oct 20, 2021
2e305ba
Fix DSO of scenariopy
diegoferigo Oct 20, 2021
9eb2c5f
Disable temporarily the metapackage
diegoferigo Oct 20, 2021
73d1827
Add explicit python run dependency in gym-ignition package
diegoferigo Oct 20, 2021
5885b40
Fix again DSO of scenariopy
diegoferigo Oct 20, 2021
bb7f058
Fix again DSO of scenariopy
diegoferigo Oct 20, 2021
274fc40
Update run_exports
diegoferigo Oct 20, 2021
0b26279
Add headings to build scripts
diegoferigo Oct 20, 2021
1eddedf
Remove possibly unnecessary run_exports
diegoferigo Oct 20, 2021
c84b7c9
Pin idyntree as x.x
diegoferigo Oct 20, 2021
26db507
Pin libprotobuf as x.x
diegoferigo Oct 20, 2021
cc6c496
Add Python version in build scripts headings
diegoferigo Oct 20, 2021
13afa40
Restore modified files before returning from build scripts
diegoferigo Oct 20, 2021
4b8f9d2
Restrict to Python >= 3.8
diegoferigo Oct 20, 2021
c7601db
Update restore logic in scripts
diegoferigo Oct 20, 2021
bb08945
Update build scripts
diegoferigo Oct 20, 2021
dc3a06b
Cleanup
diegoferigo Oct 20, 2021
6303fa9
Let pip pick the right wheel from the dist folder
diegoferigo Oct 21, 2021
63caf09
Bump build number to check if macOS starts
diegoferigo Oct 21, 2021
888197b
Add also c compiler
diegoferigo Oct 21, 2021
763f72b
Skip builds in subpackages
diegoferigo Oct 21, 2021
5ba063d
Install libs always in lib/ instead lib64/
diegoferigo Oct 21, 2021
7e3069c
Fix sed with new lines for macOS
diegoferigo Oct 21, 2021
d2a2b2a
Simplify sed usage for both linux and macos
diegoferigo Oct 21, 2021
5f04c02
Use temp folders
diegoferigo Oct 21, 2021
e284f4f
Add host dep
diegoferigo Oct 21, 2021
43c050d
Print CI environment in build scripts
diegoferigo Oct 22, 2021
16ec3cf
Update CI logging
diegoferigo Oct 22, 2021
8aa23d7
Update logging
diegoferigo Oct 22, 2021
1616d35
Explicitly compile libscenario in Release
diegoferigo Oct 22, 2021
caa831d
Trying to add explicit Ignition dependency to gym-ignition
diegoferigo Oct 22, 2021
8b7af48
Fix DSO errors in scenariopy
diegoferigo Oct 22, 2021
e4e4ea6
Remove possibly useless host deps in gym-ignition
diegoferigo Oct 22, 2021
68cb3f0
Cleanup
diegoferigo Oct 22, 2021
61de1cb
Allow gym-ignition tests to fail on osx and win
diegoferigo Oct 22, 2021
5c4975f
Add suffix to build folder
diegoferigo Oct 22, 2021
36278ec
Fix deactivate.sh
diegoferigo Oct 22, 2021
0d75c90
Enable windows
diegoferigo Oct 22, 2021
e70fd11
Adapt tests to windows host
diegoferigo Oct 22, 2021
4f6c301
Revert mktemp to be compatible with osx
diegoferigo Oct 22, 2021
99437a6
Try to fix sed usage in windows
diegoferigo Oct 22, 2021
25d154f
Use vs2019 in windows
diegoferigo Oct 22, 2021
172febb
Try to fix sed usage in windows
diegoferigo Oct 22, 2021
55aeb6a
Install sed and diff also on windows hosts
diegoferigo Oct 22, 2021
f43c102
Update libscenario tests
diegoferigo Oct 22, 2021
2f90848
Install clang in windows
diegoferigo Oct 22, 2021
ff856fc
Install vs2019
diegoferigo Oct 22, 2021
5a6cc03
Try building with clang on windows
diegoferigo Oct 22, 2021
9e2e713
Use nmake on windows
diegoferigo Oct 23, 2021
0caa3e6
Revert test changes
diegoferigo Oct 23, 2021
3a5fa4c
Add missing error checks
diegoferigo Oct 23, 2021
6810d76
Cleanup
diegoferigo Oct 23, 2021
37d7e38
Run pytest only on linux
diegoferigo Oct 23, 2021
eb23a2f
Enable scenario metapackage
diegoferigo Oct 23, 2021
3dbc6ba
Add build_scenario.* scripts
diegoferigo Oct 23, 2021
9063937
Disable osx and win
diegoferigo Oct 23, 2021
ab2d4ee
Cleanup
diegoferigo Oct 23, 2021
40f824b
Fix selector spacing
diegoferigo Oct 23, 2021
b9b55fe
Name of the feedstock should be gym-ignition
diegoferigo Oct 23, 2021
27c6c40
Use new 1.3.1 release
diegoferigo Oct 25, 2021
18db31d
Skip entirely win and osx builds
diegoferigo Oct 25, 2021
0879cbc
Skip entirely builds with python < 3.8
diegoferigo Oct 25, 2021
53137ee
Revert to -split package name to check if CI passes
diegoferigo Oct 25, 2021
672f4ab
Revert "Skip entirely builds with python < 3.8"
diegoferigo Oct 25, 2021
b83dafb
Disable gym-ignition subpackage to finalize the feedstock creation
diegoferigo Oct 25, 2021
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
1 change: 1 addition & 0 deletions recipes/gym-ignition/activate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export IGN_GAZEBO_SYSTEM_PLUGIN_PATH="${IGN_GAZEBO_SYSTEM_PLUGIN_PATH}:${CONDA_PREFIX}/lib/scenario/plugins"
40 changes: 40 additions & 0 deletions recipes/gym-ignition/build_gym_ignition.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
set section=##[section]

echo.
echo %section%=====================
echo %section%Building gym-ignition
echo %section%=====================
echo.

:: Print the CI environment
echo ##[group] Environment
set
echo ##[endgroup]
echo.

:: Fix Python package version
sed -i.orig 's|name = gym_ignition|name = gym_ignition\'$'\nversion =|g' setup.cfg
sed -i.tmp "s|version =|version = $PKG_VERSION|g" setup.cfg
diff -u setup.cfg.orig setup.cfg

:: Disable setuptools_scm
sed -i.orig "s|\[tool.setuptools_scm\]||g" pyproject.toml
sed -i.tmp 's|local_scheme = "dirty-tag"||g' pyproject.toml
diff -u pyproject.toml.orig pyproject.toml

:: Delete wheel folder
rmdir /s /q _dist_conda

:: Install Python package
%PYTHON% -m pip install ^
--no-build-isolation --no-deps ^
.
if errorlevel 1 exit 1

:: Restore original files
move /y setup.cfg.orig setup.cfg
if errorlevel 1 exit 1
move /y pyproject.toml.orig pyproject.toml
if errorlevel 1 exit 1

echo "${section}Finishing: building gym-ignition"
32 changes: 32 additions & 0 deletions recipes/gym-ignition/build_gym_ignition.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
test "$CI" = "azure" && section="##[section]" || section=""

echo
echo "${section}============================="
echo "${section}Building gym-ignition (py$PY_VER)"
echo "${section}============================="
echo

# Print the CI environment
echo "##[group] Environment"
env
echo "##[endgroup]"
echo

# Fix Python package version
sed -i.orig 's|name = gym_ignition|name = gym_ignition\'$'\nversion =|g' setup.cfg
sed -i.tmp "s|version =|version = $PKG_VERSION|g" setup.cfg
diff -u setup.cfg{.orig,} || true

# Disable setuptools_scm
sed -i.orig "s|\[tool.setuptools_scm\]||g" pyproject.toml
sed -i.tmp 's|local_scheme = "dirty-tag"||g' pyproject.toml
diff -u pyproject.toml{.orig,} || true

# Install Python package
pip install --no-build-isolation --no-deps .

# Restore original files
mv setup.cfg{.orig,}
mv pyproject.toml{.orig,}

echo "${section}Finishing: building gym-ignition"
36 changes: 36 additions & 0 deletions recipes/gym-ignition/build_libscenario.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
set section=##[section]

echo.
echo %section%====================
echo %section%Building libscenario
echo %section%====================
echo.

:: Print the CI environment
echo ##[group] Environment
set
echo ##[endgroup]
echo.

:: Configure the CMake project
cmake ^
-S .\scenario\ ^
-B build\ ^
-GNinja ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX:PATH=%LIBRARY_PREFIX% ^
-DSCENARIO_USE_IGNITION:BOOL=ON ^
-DSCENARIO_ENABLE_BINDINGS:BOOL=OFF
if errorlevel 1 exit 1

:: Compile the CMake project
cmake --build build\
if errorlevel 1 exit 1

:: Install the CMake project
cmake --install build\
if errorlevel 1 exit 1

:: TODO: activate / deactivate

echo %section%Finishing: building libscenario
42 changes: 42 additions & 0 deletions recipes/gym-ignition/build_libscenario.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
test "$CI" = "azure" && section="##[section]" || section=""

echo
echo "${section}===================="
echo "${section}Building libscenario"
echo "${section}===================="
echo

# Print the CI environment
echo "##[group] Environment"
env
echo "##[endgroup]"
echo

# Create a temp build folder
build_folder=$(mktemp -d)

# Configure the CMake project
cmake \
-S ./scenario/ \
-B ${build_folder}/ \
-GNinja \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH=$PREFIX \
-DSCENARIO_USE_IGNITION:BOOL=ON \
-DSCENARIO_ENABLE_BINDINGS:BOOL=OFF

# Compile the CMake project
cmake --build ${build_folder}/

# Install the CMake project
cmake --install ${build_folder}/

# Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d.
# This will allow them to be run on environment activation.
for CHANGE in "activate" "deactivate" ; do
mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d"
cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh"
done

echo "${section}Finishing: building libscenario"
7 changes: 7 additions & 0 deletions recipes/gym-ignition/build_scenario.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set section=##[section]

echo.
echo %section%=================
echo %section%Building scenario
echo %section%=================
echo.
7 changes: 7 additions & 0 deletions recipes/gym-ignition/build_scenario.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test "$CI" = "azure" && section="##[section]" || section=""

echo
echo "${section}================="
echo "${section}Building scenario"
echo "${section}================="
echo
62 changes: 62 additions & 0 deletions recipes/gym-ignition/build_scenariopy.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
set section=##[section]

echo.
echo %section%===================
echo %section%Building scenariopy
echo %section%===================
echo.

:: Print the CI environment
echo ##[group] Environment
set
echo ##[endgroup]
echo.

:: Fix Python package version
sed -i.orig "s|name = scenario|name = scenario\nversion =|g" scenario\setup.cfg
sed -i.tmp "s|version =|version = %PKG_VERSION%|g" scenario\setup.cfg
diff -u scenario\setup.cfg.orig scenario\setup.cfg

:: Disable setuptools_scm
sed -i.orig "s|\[tool.setuptools_scm\]||g" scenario\pyproject.toml
sed -i.tmp "s|root = ""../""||g" scenario\pyproject.toml
sed -i.tmp "s|local_scheme = ""dirty-tag""||g" scenario\pyproject.toml
diff -u scenario\pyproject.toml.orig scenario\pyproject.toml

:: Delete wheel folder
rmdir /s /q _dist_conda

:: Generate the wheel
%PYTHON% ^
-m build ^
--wheel ^
--outdir _dist_conda\ ^
--no-isolation ^
--skip-dependency-check ^
"-C--global-option=build_ext" ^
"-C--global-option=-DSCENARIO_BUILD_SHARED_LIBRARY:BOOL=ON" ^
"-C--global-option=--component=python" ^
.\scenario\
if errorlevel 1 exit 1

:: Delete the build folder
rmdir /s /q build/

:: Install Python package
%PYTHON% -m pip install ^
--no-index --find-links=.\_dist_conda\ ^
--no-build-isolation --no-deps ^
scenario
if errorlevel 1 exit 1

:: Delete wheel folder
rmdir /s /q _dist_conda\
if errorlevel 1 exit 1

:: Restore original files
move /y scenario\setup.cfg.orig scenario\setup.cfg
if errorlevel 1 exit 1
move /y scenario\pyproject.toml.orig scenario\pyproject.toml
if errorlevel 1 exit 1

echo %section%Finishing: building scenariopy
57 changes: 57 additions & 0 deletions recipes/gym-ignition/build_scenariopy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
test "$CI" = "azure" && section="##[section]" || section=""

echo
echo "${section}==========================="
echo "${section}Building scenariopy (py$PY_VER)"
echo "${section}==========================="
echo

# Print the CI environment
echo "##[group] Environment"
env
echo "##[endgroup]"
echo

# Fix Python package version
sed -i.orig 's|name = scenario|name = scenario\'$'\nversion =|g' scenario/setup.cfg
sed -i.tmp "s|version =|version = $PKG_VERSION|g" scenario/setup.cfg
diff -u scenario/setup.cfg{.orig,} || true

# Disable setuptools_scm
sed -i.orig "s|\[tool.setuptools_scm\]||g" scenario/pyproject.toml
sed -i.tmp 's|root = "../"||g' scenario/pyproject.toml
sed -i.tmp 's|local_scheme = "dirty-tag"||g' scenario/pyproject.toml
diff -u scenario/pyproject.toml{.orig,} || true

# Create a temp dist folder
dist_folder=$(mktemp -d)

# Delete the build folder
rm -rf build/

# Generate the wheel
$PYTHON \
-m build \
--wheel \
--outdir ${dist_folder}/ \
--no-isolation \
--skip-dependency-check \
"-C--global-option=build_ext" \
"-C--global-option=-DSCENARIO_BUILD_SHARED_LIBRARY:BOOL=ON" \
"-C--global-option=--component=python" \
./scenario/

# Delete the build folder
rm -rf build/

# Install Python package
pip install \
--no-index --find-links=${dist_folder}/ \
--no-build-isolation --no-deps \
scenario

# Restore original files
mv scenario/setup.cfg{.orig,}
mv scenario/pyproject.toml{.orig,}

echo "${section}Finishing: building scenariopy"
8 changes: 8 additions & 0 deletions recipes/gym-ignition/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64]
- "10.13" # [osx and x86_64]
MACOSX_SDK_VERSION: # [osx and x86_64]
- "10.13" # [osx and x86_64]
c_compiler: # [win]
- vs2019 # [win]
cxx_compiler: # [win]
- vs2019 # [win]
1 change: 1 addition & 0 deletions recipes/gym-ignition/deactivate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export IGN_GAZEBO_SYSTEM_PLUGIN_PATH="$(echo $IGN_GAZEBO_SYSTEM_PLUGIN_PATH | tr ':' '\n' | grep -v "$CONDA_PREFIX/lib/scenario/plugins" | grep -v '^$' | tr '\n' ':')"
Loading