CI of McRtcTactileSensorPlugin #62
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 McRtcTactileSensorPlugin | |
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] | |
mc-rtc-version: [head, stable] | |
exclude: | |
- build-type: Debug | |
mc-rtc-version: stable | |
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.mc-rtc-version }}" == "head" ] | |
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: Install dependencies | |
uses: jrl-umi3218/github-actions/install-dependencies@master | |
with: | |
ubuntu: | | |
apt-mirrors: | |
mc-rtc: | |
cloudsmith: mc-rtc/${{ matrix.mc-rtc-version }} | |
apt: libmc-rtc-dev mc-rtc-utils | |
ros: | | |
apt: ros-base mc-rtc-plugin eigen-conversions | |
workspace: | |
- path: isri-aist/MujocoTactileSensorPlugin | |
catkin-args: -DMUJOCO_ROOT_DIR=${{ github.workspace }}/../mujoco-2.3.5 | |
build-type: ${{ matrix.build-type }} | |
- name: Checkout repository code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Build and test | |
uses: jrl-umi3218/github-actions/build-cmake-project@master | |
with: | |
build-type: ${{ matrix.build-type }} | |
options: -DENABLE_ESKIN=OFF -DINSTALL_DOCUMENTATION=${{ env.UPLOAD_DOCUMENTATION }} | |
- name: Upload documentation | |
if: env.UPLOAD_DOCUMENTATION == 'true' | |
run: | | |
set -e | |
set -x | |
git config --global user.name "Masaki Murooka" | |
git config --global user.email "[email protected]" | |
git remote set-url origin "https://github.com/${{ github.repository }}" | |
git fetch --depth=1 origin gh-pages:gh-pages | |
cp -r build/doc/doxygen-html ../doxygen | |
git clean -dfx | |
rm -rf cmake/ | |
git checkout --quiet gh-pages | |
rm -rf doxygen/ | |
mv ../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 |