Skip to content

CI of MujocoTactileSensorPlugin #54

CI of MujocoTactileSensorPlugin

CI of MujocoTactileSensorPlugin #54

Workflow file for this run

name: CI of MujocoTactileSensorPlugin
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
schedule:
- cron: '0 0 * * 0'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
build-type: [Debug, RelWithDebInfo]
standalone: [standalone, catkin]
runs-on: ${{ matrix.os }}
steps:
- name: Setup environment variables
run: |
set -e
set -x
if [ "${{ matrix.os }}" == "ubuntu-20.04" ] && \
[ "${{ matrix.build-type }}" == "RelWithDebInfo" ] && \
[ "${{ matrix.standalone }}" == "catkin" ]
then
echo "UPLOAD_DOCUMENTATION=true" >> $GITHUB_ENV
sudo apt-get install -qq doxygen graphviz
else
echo "UPLOAD_DOCUMENTATION=false" >> $GITHUB_ENV
fi
- name: Download MuJoCo
run: |
set -e
set -x
cd ${{ github.workspace }}/.. # Note that everything under ${{ github.workspace }} is cleaned by actions/checkout.
wget https://github.com/deepmind/mujoco/releases/download/2.3.5/mujoco-2.3.5-linux-x86_64.tar.gz
tar -zxvf mujoco-2.3.5-linux-x86_64.tar.gz
- name: Checkout repository code
if: matrix.standalone == 'standalone'
uses: actions/checkout@v3
with:
submodules: recursive
- name: Standalone build
if: matrix.standalone == 'standalone'
uses: jrl-umi3218/github-actions/build-cmake-project@master
with:
build-type: ${{ matrix.build-type }}
options: -DMUJOCO_ROOT_DIR=${{ github.workspace }}/../mujoco-2.3.5
- name: Catkin build
if: matrix.standalone == 'catkin'
uses: jrl-umi3218/github-actions/build-catkin-project@master
with:
build-type: ${{ matrix.build-type }}
cmake-args: -DMUJOCO_ROOT_DIR=${{ github.workspace }}/../mujoco-2.3.5 -DINSTALL_DOCUMENTATION=${{ env.UPLOAD_DOCUMENTATION }}
catkin-test-args: --no-deps
build-packages: mujoco_tactile_sensor_plugin
test-packages: mujoco_tactile_sensor_plugin
- name: Upload documentation
if: env.UPLOAD_DOCUMENTATION == 'true'
run: |
set -e
set -x
cd ${GITHUB_WORKSPACE}/catkin_ws/src/${{ github.repository }}
git config --global user.name "Masaki Murooka"
git config --global user.email "m-murooka@aist.go.jp"
git remote set-url origin "https://github.com/${{ github.repository }}"
git fetch --depth=1 origin gh-pages:gh-pages
git clean -dfx
rm -rf cmake/
git checkout --quiet gh-pages
rm -rf doxygen/
cp -r ${GITHUB_WORKSPACE}/catkin_ws/build/mujoco_tactile_sensor_plugin/doc/html/ doxygen
git add doxygen
git_status=`git status -s`
if test -n "$git_status"; then
git commit --quiet -m "Update Doxygen HTML files from commit ${{ github.sha }}"
git push origin gh-pages
else
echo "Github pages documentation is already up-to-date."
fi