-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [core] Implement friction cone for impulse model. (#440) * [core] Fix numerical instability of flexibility model by adding armature-like inertia parameter. (#433) * [core] Full support of armature for all joints but mimic. * [core] Rename 'pncCollisionData' in 'collisionData' and 'pncModelRigidOrig_' in 'pncModelOrig_' since already clear. * [core] Fix some implicit type conversions. * [python/robot] Fix default hardware config file generator is both collision and visual meshes are defined. * [python/viewer] Add physic based rendering of materials to panda3d. * [python/viewer] Fix shadow casting area smaller than floor in panda3d. * [python/viewer] Fix window name not set properly in panda3d. * [python/viewer] Change direction of lighting in panda3d to fell natural for default camera pose. * [python/viewer] Enhanced rendering in panda3d for discrete gpu. * [python/viewer] Render meshes two-sided in panda3d to avoid seeing through them. * [gym/rllib] Add option to forward keyword arguments to 'ray.init'. (#436) * [misc] Update Python dependencies. * [misc] Update Boost from 1.7.1 to 1.7.6. * [misc] Build OSX wheels. (#442) Co-authored-by: Alexis Duburcq <alexis.duburcq@wandercraft.eu>
- Loading branch information
Showing
81 changed files
with
980 additions
and
539 deletions.
There are no files selected for viewing
This file contains 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 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,144 @@ | ||
name: MacOS CI (Build from source dependencies) | ||
|
||
on: | ||
# Trigger the workflow on push on the master branch, or for any pull request | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build-and-test-linux: | ||
name: >- | ||
(${{ matrix.os }}) (${{ matrix.PYTHON_VERSION }}) | ||
Build and run the unit tests. Then generate and publish the wheels on PyPi. | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [macos-10.15, macos-11] | ||
PYTHON_VERSION: ['3.6', '3.7', '3.8', '3.9'] | ||
exclude: | ||
- os: macos-11 | ||
PYTHON_VERSION: '3.6' | ||
- os: macos-11 | ||
PYTHON_VERSION: '3.7' | ||
|
||
defaults: | ||
run: | ||
shell: bash -ieo pipefail {0} # Using bash enables automatic sourcing `.bashrc` and fail-fast behavior | ||
|
||
env: | ||
BUILD_TYPE: "Release" | ||
MACOSX_DEPLOYMENT_TARGET: "10.9" | ||
|
||
##################################################################################### | ||
|
||
steps: | ||
- name: Checkout jiminy | ||
uses: actions/checkout@v2 | ||
|
||
##################################################################################### | ||
|
||
- name: Configure Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.PYTHON_VERSION }} | ||
architecture: 'x64' | ||
- name: Setup minimal build environment | ||
run: | | ||
git config --global advice.detachedHead false | ||
PYTHON_EXECUTABLE="${pythonLocation}/bin/python${PYTHON_VERSION}" | ||
echo "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" >> $GITHUB_ENV | ||
echo "RootDir=${GITHUB_WORKSPACE}" >> $GITHUB_ENV | ||
echo "InstallDir=${GITHUB_WORKSPACE}/install" >> $GITHUB_ENV | ||
if [ "${{ matrix.os }}" == "macos-10.15" ] ; then | ||
echo "OSX_ARCHITECTURES=x86_64" >> $GITHUB_ENV | ||
echo "WHEEL_ARCH=x86_64" >> $GITHUB_ENV | ||
else | ||
echo "OSX_ARCHITECTURES=x86_64;arm64" >> $GITHUB_ENV | ||
echo "WHEEL_ARCH=universal2" >> $GITHUB_ENV | ||
fi | ||
"${PYTHON_EXECUTABLE}" -m pip install --upgrade pip | ||
"${PYTHON_EXECUTABLE}" -m pip install --upgrade twine wheel delocate | ||
"${PYTHON_EXECUTABLE}" -m pip install --upgrade numpy | ||
- name: Build project dependencies | ||
run: | | ||
MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} OSX_ARCHITECTURES=${OSX_ARCHITECTURES} \ | ||
./build_tools/build_install_deps_unix.sh | ||
"${PYTHON_EXECUTABLE}" -m pip install --prefer-binary "gym>=0.18.3" "stable_baselines3>=0.10" "importlib-metadata>=3.3.0" | ||
##################################################################################### | ||
|
||
- name: Build and install Jiminy | ||
run: | | ||
unset Boost_ROOT | ||
mkdir "$RootDir/build" | ||
cd "$RootDir/build" | ||
export LD_LIBRARY_PATH="$InstallDir/lib/:/usr/local/lib" | ||
cmake "$RootDir" -DCMAKE_INSTALL_PREFIX="$InstallDir" -DCMAKE_PREFIX_PATH="$InstallDir" \ | ||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF \ | ||
-DCMAKE_OSX_ARCHITECTURES="${OSX_ARCHITECTURES}" -DCMAKE_OSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}" \ | ||
-DBOOST_ROOT="$InstallDir" -DBoost_INCLUDE_DIR="$InstallDir/include" \ | ||
-DBoost_NO_SYSTEM_PATHS=TRUE -DBoost_NO_BOOST_CMAKE=TRUE \ | ||
-DBoost_USE_STATIC_LIBS=ON -DPYTHON_EXECUTABLE="${PYTHON_EXECUTABLE}" \ | ||
-DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON -DBUILD_PYTHON_INTERFACE=ON \ | ||
-DCMAKE_CXX_FLAGS="-fPIC" \ | ||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" | ||
make -j2 | ||
mkdir -p "$RootDir/build/pypi/jiminy_py/src/jiminy_py" | ||
cp -R -H "$InstallDir/lib/python${{ matrix.PYTHON_VERSION }}/site-packages/." \ | ||
"$RootDir/build/pypi/jiminy_py/src/jiminy_py/core" | ||
find "$RootDir/build/pypi/" -name "*.so*" -exec strip -S -x -r -v {} + | ||
make install | ||
##################################################################################### | ||
|
||
- name: Generate and install Python Pip wheels | ||
run: | | ||
export DYLD_LIBRARY_PATH="$InstallDir/lib" | ||
cd "$RootDir/build" | ||
cmake . -DCOMPONENT=pypi -P ./cmake_install.cmake | ||
delocate-wheel --require-archs "${WHEEL_ARCH}" \ | ||
-w "$RootDir/build/wheelhouse" "$RootDir/build/pypi/dist/jiminy_py/"*.whl | ||
delocate-addplat --rm-orig -p "macosx_${MACOSX_DEPLOYMENT_TARGET//./_}_${WHEEL_ARCH}" \ | ||
"$RootDir/build/wheelhouse/"*.whl | ||
"${PYTHON_EXECUTABLE}" -m pip install --force-reinstall --no-deps "$RootDir/build/wheelhouse/"*.whl | ||
- name: Upload the wheel for Linux of jiminy_py | ||
if: success() && github.repository == 'duburcqa/jiminy' | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: jiminy_py-${{ matrix.PYTHON_VERSION }}-wheel | ||
path: build/wheelhouse | ||
|
||
##################################################################################### | ||
|
||
- name: Run unit tests | ||
run: | | ||
./build/unit/unit | ||
# The access to hpp-fcl shapes is not working for some reason, so that doing | ||
# `collision_model.geometryObjects[0].geometry.clone()` is failing. It is | ||
# probably an issue with boost python and it is not related to jiminy. | ||
cd "$RootDir/unit_py" | ||
#"${PYTHON_EXECUTABLE}" -m unittest discover -v | ||
##################################################################################### | ||
|
||
- name: Publish on PyPi the wheel for Linux of jiminy_py | ||
if: >- | ||
success() && | ||
github.repository == 'duburcqa/jiminy' && github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_DEPLOY }} | ||
packages_dir: build/wheelhouse |
This file contains 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 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 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 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 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
Oops, something went wrong.