-
Notifications
You must be signed in to change notification settings - Fork 4
85 lines (83 loc) · 3.09 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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