Skip to content

CI of MujocoRosUtils #176

CI of MujocoRosUtils

CI of MujocoRosUtils #176

Workflow file for this run

name: CI of MujocoRosUtils
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
schedule:
- cron: '0 0 * * 0'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
build-type: [RelWithDebInfo, Debug]
mujoco-version: [2.3.7]
include:
- os: ubuntu-20.04
build-type: RelWithDebInfo
mujoco-version: 2.3.5 # 2.3.7
- os: ubuntu-20.04
build-type: RelWithDebInfo
mujoco-version: 2.3.6 # 2.3.7
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.mujoco-version }}" == "2.3.7" ] && \
[ "${{ github.repository_owner }}" == "isri-aist" ] && \
[ "${{ github.ref }}" == "refs/heads/main" ]
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/${{ matrix.mujoco-version }}/mujoco-${{ matrix.mujoco-version }}-linux-x86_64.tar.gz
tar -zxvf mujoco-${{ matrix.mujoco-version }}-linux-x86_64.tar.gz
- name: Catkin build
uses: jrl-umi3218/github-actions/build-catkin-project@master
with:
build-type: ${{ matrix.build-type }}
cmake-args: -DMUJOCO_ROOT_DIR=${{ github.workspace }}/../mujoco-${{ matrix.mujoco-version }} -DINSTALL_DOCUMENTATION=${{ env.UPLOAD_DOCUMENTATION }}
catkin-test-args: --no-deps
build-packages: mujoco_ros_utils
test-packages: mujoco_ros_utils
- 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_ros_utils/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