Skip to content

CI of HumanRetargetingController #5

CI of HumanRetargetingController

CI of HumanRetargetingController #5

Workflow file for this run

name: CI of HumanRetargetingController
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
schedule:
- cron: '0 0 * * 0'
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
catkin-build: [catkin, standalone]
build-type: [RelWithDebInfo, Debug]
mc-rtc-version: [head, stable]
motion-type: [UpperBodyRetargeting]
exclude:
- build-type: Debug
mc-rtc-version: stable
# Some packages have not been released onto the stable mirror yet
- catkin-build: standalone
mc-rtc-version: stable
runs-on: ${{ matrix.os }}
env:
RESULTS_POSTFIX: ${{ matrix.motion-type }}-${{ matrix.catkin-build }}
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 "RUN_SIMULATION_STEPS=true" >> $GITHUB_ENV
else
echo "RUN_SIMULATION_STEPS=false" >> $GITHUB_ENV
fi
if [ "${{ matrix.os }}" == "ubuntu-20.04" ] && \
[ "${{ matrix.catkin-build }}" == "catkin" ] && \
[ "${{ matrix.build-type }}" == "RelWithDebInfo" ] && \
[ "${{ matrix.mc-rtc-version }}" == "head" ] && \
[ "${{ matrix.motion-type }}" == "UpperBodyRetargeting" ] && \
[ "${{ github.repository_owner }}" == "isri-aist" ] && \
[ "${{ github.ref }}" == "refs/heads/master" ]
then
echo "UPLOAD_DOCUMENTATION=true" >> $GITHUB_ENV
else
echo "UPLOAD_DOCUMENTATION=false" >> $GITHUB_ENV
fi
if [ "${{ matrix.catkin-build }}" == "catkin" ]
then
echo "CI_DIR=${GITHUB_WORKSPACE}/catkin_ws/src/${{ github.repository }}/.github/workflows" >> $GITHUB_ENV
else
echo "CI_DIR=${GITHUB_WORKSPACE}/.github/workflows" >> $GITHUB_ENV
fi
- 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 mc-state-observation doxygen graphviz jvrc-choreonoid choreonoid libcnoid-dev
ros: |
apt: ros-base mc-rtc-plugin eigen-conversions
- name: Install standalone dependencies
if: matrix.catkin-build == 'standalone'
uses: jrl-umi3218/github-actions/install-dependencies@master
with:
build-type: ${{ matrix.build-type }}
ubuntu: |
apt: libforcecontrolcollection-dev libtrajectorycollection-dev libcentroidalcontrolcollection-dev
github: |
- path: isri-aist/BaselineWalkingController
- path: isri-aist/CnoidRosUtils
- name: Checkout repository code
if: matrix.catkin-build == 'standalone'
uses: actions/checkout@v3
with:
submodules: recursive
- name: Standalone build
if: matrix.catkin-build == 'standalone'
uses: jrl-umi3218/github-actions/build-cmake-project@master
with:
build-type: ${{ matrix.build-type }}
- name: Catkin build
if: matrix.catkin-build == 'catkin'
uses: jrl-umi3218/github-actions/build-catkin-project@master
with:
build-type: ${{ matrix.build-type }}
cmake-args: -DINSTALL_DOCUMENTATION=${{ env.UPLOAD_DOCUMENTATION }} -DENABLE_QLD=ON
catkin-test-args: --no-deps
build-packages: human_retargeting_controller
test-packages: human_retargeting_controller
- 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 "[email protected]"
git remote set-url origin "https://mmurooka:${{ secrets.CI_TOKEN }}@github.com/isri-aist/HumanRetargetingController"
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/human_retargeting_controller/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