Skip to content

Commit

Permalink
Add CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmurooka committed Nov 20, 2024
1 parent 368423e commit 1c11dc0
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 1 deletion.
101 changes: 101 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
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: [SampleMotion]
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 }}" == "MotionSampleField" ] && \
[ "${{ 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
24 changes: 24 additions & 0 deletions .github/workflows/clang-format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check clang-format

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'

jobs:
clang-format:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Install clang-format-10
run: |
sudo apt-get -y -qq update
sudo apt-get -y -qq install clang-format-10
- name: Run clang-format-check
run: |
./.clang-format-check.sh
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 2-Clause License

Copyright (c) 2024, AIST-CNRS JRL
Copyright (c) 2024, CNRS-AIST JRL

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# [HumanRetargetingController](https://github.com/isri-aist/HumanRetargetingController)
Controller for retargeting the motion from human to humanoid robot

[![CI](https://github.com/isri-aist/HumanRetargetingController/actions/workflows/ci.yaml/badge.svg)](https://github.com/isri-aist/HumanRetargetingController/actions/workflows/ci.yaml)
[![Documentation](https://img.shields.io/badge/doxygen-online-brightgreen?logo=read-the-docs&style=flat)](https://isri-aist.github.io/HumanRetargetingController/)
[![LICENSE](https://img.shields.io/github/license/isri-aist/HumanRetargetingController)](https://github.com/isri-aist/HumanRetargetingController/blob/master/LICENSE)

0 comments on commit 1c11dc0

Please sign in to comment.