[mc_rtc/Configuration] Improvements for Schema introduction #1233
Workflow file for this run
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
name: CI of mc_rtc | |
on: | |
push: | |
paths-ignore: | |
# Changes to those files don't mandate running CI | |
- ".gitlab-ci.yml" | |
- ".jrl-ci" | |
- ".github/workflows/package.yml" | |
- ".github/workflows/sources/*" | |
- ".github/workflows/build-others.yml" | |
- ".github/workflows/docker/*" | |
- "debian/**" | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, macos-latest, windows-latest] | |
build-type: [Debug, RelWithDebInfo, script] | |
compiler: [gcc, clang] | |
exclude: | |
# Only default compiler on ubuntu-18.04, macos-latest and windows-latest | |
- os: ubuntu-18.04 | |
compiler: clang | |
- os: macos-latest | |
compiler: clang | |
- os: windows-latest | |
compiler: clang | |
# Script always use default compiler | |
- build-type: script | |
compiler: clang | |
# FIXME Windows Debug CI fails: tests are failing | |
- os: windows-latest | |
build-type: Debug | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Linux cleanup | |
if: matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-20.04' | |
run: | | |
set -e | |
echo "LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}" >> $GITHUB_ENV | |
- name: macOS cleanup | |
run: | | |
sudo rm '/usr/local/bin/2to3' | |
if: startsWith(runner.os, 'macOS') | |
- name: Install pip for Python 2 (Ubuntu 20.04) | |
run: | | |
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py | |
sudo python2 get-pip.py | |
rm -f get-pip.py | |
if: matrix.os == 'ubuntu-20.04' && matrix.build-type != 'script' | |
- name: Clear environment (script) | |
uses: jrl-umi3218/github-actions/install-dependencies@master | |
if: matrix.build-type == 'script' | |
with: | |
compiler: ${{ matrix.compiler }} | |
build-type: RelWithDebInfo | |
- name: Build with script | |
if: matrix.build-type == 'script' | |
shell: bash | |
run: | | |
set -x | |
cd utils | |
if [[ "${{ matrix.os }}" == "windows-latest" ]] | |
then | |
./build_and_install.sh --user-input false --with-python-support false --build-testing false --build-benchmarks true | |
elif [[ "${{ matrix.os }}" == "macos-latest" ]] | |
then | |
./build_and_install.sh --user-input false --with-python-support false --build-benchmarks true --allow-root true | |
else | |
./build_and_install.sh --user-input false --build-benchmarks true --allow-root true | |
fi | |
- name: Install dependencies | |
uses: jrl-umi3218/github-actions/install-dependencies@master | |
if: matrix.build-type != 'script' | |
with: | |
compiler: ${{ matrix.compiler }} | |
build-type: ${{ matrix.build-type }} | |
ubuntu: | | |
apt: cython cython3 python-pytest python3-pytest python-numpy python3-numpy python-coverage python3-coverage python-setuptools python3-setuptools libeigen3-dev doxygen doxygen-latex libboost-all-dev libtinyxml2-dev libgeos++-dev libnanomsg-dev libyaml-cpp-dev libltdl-dev libnotify-dev | |
macos: | | |
brew: eigen boost tinyxml2 geos nanomsg yaml-cpp pkg-config libtool gcc libnotify | |
pip: Cython coverage numpy pytest | |
windows: | | |
pip: Cython coverage numpy pytest | |
github: | |
- path: eigenteam/eigen-git-mirror | |
ref: 3.3.7 | |
- path: leethomason/tinyxml2 | |
ref: 7.1.0 | |
- path: libgeos/geos | |
ref: 3.8.1 | |
options: -DBUILD_TESTING:BOOL=ON | |
- path: nanomsg/nanomsg | |
ref: 1.1.5 | |
- path: jbeder/yaml-cpp | |
ref: 29dcf92f870ee51cce8d68f8fcfe228942e8dfe1 | |
options: -DYAML_CPP_BUILD_TESTS:BOOL=OFF | |
macos-options: -DPYTHON_BINDING:BOOL=OFF | |
windows-options: -DPYTHON_BINDING:BOOL=OFF | |
github: | | |
- path: gabime/spdlog | |
ref: v1.6.1 | |
options: -DSPDLOG_BUILD_EXAMPLE:BOOL=OFF -DSPDLOG_BUILD_SHARED:BOOL=ON | |
- path: loco-3d/ndcurves | |
ref: v1.1.5 | |
options: -DBUILD_PYTHON_INTERFACE:BOOL=OFF | |
- path: jrl-umi3218/Eigen3ToPython | |
- path: jrl-umi3218/SpaceVecAlg | |
- path: jrl-umi3218/sch-core | |
options: -DCMAKE_CXX_STANDARD=11 | |
- path: jrl-umi3218/eigen-qld | |
- path: jrl-umi3218/sch-core-python | |
- path: jrl-umi3218/RBDyn | |
- path: jrl-umi3218/Tasks | |
- path: jrl-umi3218/mc_rbdyn_urdf | |
- path: jrl-umi3218/mc_rtc_data | |
- path: jrl-umi3218/eigen-quadprog | |
- path: jrl-umi3218/state-observation | |
- path: jrl-umi3218/tvm | |
options: -DTVM_WITH_ROBOT:BOOL=OFF | |
- name: Build and test | |
if: matrix.build-type == 'RelWithDebInfo' || (matrix.build-type == 'Debug' && github.ref == 'refs/heads/master') | |
uses: jrl-umi3218/github-actions/build-cmake-project@master | |
with: | |
compiler: ${{ matrix.compiler }} | |
build-type: ${{ matrix.build-type }} | |
macos-options: -DPYTHON_BINDING:BOOL=OFF | |
windows-options: -DPYTHON_BINDING:BOOL=OFF | |
- name: Build and test (Debug/Fast tests) | |
if: matrix.build-type == 'Debug' && github.ref != 'refs/heads/master' | |
uses: jrl-umi3218/github-actions/build-cmake-project@master | |
with: | |
compiler: ${{ matrix.compiler }} | |
build-type: ${{ matrix.build-type }} | |
options: '-DENABLE_FAST_TESTS:BOOL=ON' | |
macos-options: -DPYTHON_BINDING:BOOL=OFF | |
- name: Build with ROS | |
if: (matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-20.04') && matrix.build-type != 'script' | |
run: | | |
set -e | |
set -x | |
pushd . | |
if [ "${{ matrix.os }}" = "ubuntu-18.04" ] | |
then | |
export ROS_DISTRO="melodic" | |
else | |
export ROS_DISTRO="noetic" | |
fi | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
wget http://packages.ros.org/ros.key -O - | sudo apt-key add - | |
sudo apt-get update -qq | |
sudo apt-get install -qq ros-${ROS_DISTRO}-ros-base ros-${ROS_DISTRO}-tf2-ros | |
. /opt/ros/${ROS_DISTRO}/setup.bash | |
mkdir -p /tmp/_ci/catkin_ws/src/ | |
cd /tmp/_ci/catkin_ws/src | |
catkin_init_workspace | |
git clone --recursive https://github.com/jrl-umi3218/mc_rtc_msgs | |
cd ../ | |
catkin_make || exit 1 | |
. devel/setup.bash | |
popd | |
pushd . | |
cd build | |
cmake ../ && make -j2 && sudo make install || exit 1 | |
popd | |
- name: Upload documentation | |
# Only run on master branch and for one configuration | |
if: matrix.os == 'ubuntu-18.04' && matrix.build-type == 'RelWithDebInfo' && matrix.compiler == 'gcc' && github.ref == 'refs/heads/master' && github.repository == 'jrl-umi3218/mc_rtc' | |
run: | | |
set -x | |
pushd . | |
cd doc | |
cp -r /usr/local/share/doc/mc_rtc/doxygen-html . | |
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/SpaceVecAlg/doxygen-html/@https://jrl-umi3218.github.io/SpaceVecAlg/doxygen/HEAD/@g' | |
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/RBDyn/doxygen-html/@https://jrl-umi3218.github.io/RBDyn/doxygen/HEAD/@g' | |
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/Tasks/doxygen-html/@https://jrl-umi3218.github.io/Tasks/doxygen/HEAD/@g' | |
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/sch-core/doxygen-html/@https://jrl-umi3218.github.io/sch-core/doxygen/HEAD/@g' | |
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/mc_rbdyn_urdf/doxygen-html/@https://jrl-umi3218.github.io/mc_rbdyn_urdf/doxygen/HEAD/@g' | |
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/TVM/doxygen-html/@https://jrl-umi3218.github.io/tvm/doxygen/HEAD/@g' | |
sudo apt-get install -qq ruby-dev ruby-bundler libxml2-dev | |
bundle install --path vendor | |
git clone -b gh-pages https://gergondet:${{ secrets.GH_PAGES_TOKEN }}@github.com/jrl-umi3218/mc_rtc /tmp/website | |
bundle exec jekyll build --trace -b /mc_rtc -d /tmp/website | |
cd /tmp/website | |
git add . | |
git config --global user.email "[email protected]" | |
git config --global user.name "Pierre Gergondet (Automated CI update)" | |
git commit -m "Website from commit ${GITHUB_SHA}" | |
git push origin gh-pages | |
popd | |
- name: Debug Windows DLL issue | |
if: failure() && matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
set -e | |
pwd | |
echo $PATH | |
ls | |
ldd build/tests/RelWithDebInfo/testGUIStateBuilder.exe | |
ldd build/tests/RelWithDebInfo/testDataStore.exe | |
- name: Slack Notification | |
if: failure() | |
uses: archive/github-actions-slack@master | |
with: | |
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }} | |
slack-channel: '#ci' | |
slack-text: > | |
[mc_rtc] Build *${{ matrix.os }}/${{ matrix.build-type }} (${{ matrix.compiler }})* failed on ${{ github.ref }} |