forked from chongyi-zheng/SMPLpp
-
Notifications
You must be signed in to change notification settings - Fork 3
185 lines (181 loc) · 5.57 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
name: Build
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
schedule:
- cron: '0 0 * * 0'
jobs:
clang-format:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository code
uses: actions/checkout@v2
- 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
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-18.04]
build-type: [RelWithDebInfo, Debug]
runs-on: ${{ matrix.os }}
steps:
- name: Set ROS version
run: |
if [ "${{ matrix.os }}" == "ubuntu-20.04" ]; then
echo "ROS_DISTRO=noetic" >> $GITHUB_ENV
echo "PYTHON_PACKAGE_PREFIX=python3" >> $GITHUB_ENV
else
echo "ROS_DISTRO=melodic" >> $GITHUB_ENV
echo "PYTHON_PACKAGE_PREFIX=python" >> $GITHUB_ENV
fi
# 1. Install dependent packages
- name: Install ROS
run: |
set -e
set -x
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update -y -qq
sudo apt-get install -y -qq ros-${ROS_DISTRO}-ros-base ${PYTHON_PACKAGE_PREFIX}-catkin-tools ${PYTHON_PACKAGE_PREFIX}-rosdep doxygen graphviz
- name: Checkout xtl
uses: actions/checkout@v2
with:
repository: xtensor-stack/xtl
submodules: recursive
path: src/xtl
- name: Install xtl
run: |
set -e
set -x
cd ${GITHUB_WORKSPACE}/src/xtl/
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
make -j4
sudo make install
- name: Checkout xtensor
uses: actions/checkout@v2
with:
repository: xtensor-stack/xtensor
submodules: recursive
path: src/xtensor
- name: Install xtensor
run: |
set -e
set -x
cd ${GITHUB_WORKSPACE}/src/xtensor/
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
make -j4
sudo make install
- name: Checkout nlohmann-json
uses: actions/checkout@v2
with:
repository: nlohmann/json
submodules: recursive
path: src/nlohmann-json
- name: Install nlohmann-json
run: |
set -e
set -x
cd ${GITHUB_WORKSPACE}/src/nlohmann-json/
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
make -j4
sudo make install
- name: Checkout ezc3d
uses: actions/checkout@v2
with:
repository: pyomeca/ezc3d
submodules: recursive
path: src/ezc3d
- name: Install ezc3d
run: |
set -e
set -x
cd ${GITHUB_WORKSPACE}/src/ezc3d/
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
make -j4
sudo make install
- name: Checkout eigen-qld
uses: actions/checkout@v2
with:
repository: jrl-umi3218/eigen-qld
submodules: recursive
path: src/eigen-qld
- name: Install eigen-qld
run: |
set -e
set -x
sudo apt-get install -y -qq libeigen3-dev
cd ${GITHUB_WORKSPACE}/src/eigen-qld/
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DPYTHON_BINDING=OFF -DBUILD_TESTING=OFF
make -j4
sudo make install
- name: Download libtorch
run: |
set -e
set -x
cd ${GITHUB_WORKSPACE}
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.11.0%2Bcpu.zip
unzip libtorch-cxx11-abi-shared-with-deps-1.11.0+cpu.zip
# 2. Setup catkin workspace
- name: Setup catkin workspace
run: |
mkdir -p ${GITHUB_WORKSPACE}/catkin_ws/src/
cd ${GITHUB_WORKSPACE}/catkin_ws
set +x
. /opt/ros/${ROS_DISTRO}/setup.bash
set -x
catkin init
catkin build --limit-status-rate 0.1
- name: Checkout repository code
uses: actions/checkout@v2
with:
submodules: recursive
path: catkin_ws/src/mmurooka/SMPLpp
- name: Checkout QpSolverCollection
uses: actions/checkout@v2
with:
repository: isri-aist/QpSolverCollection
submodules: recursive
path: catkin_ws/src/isri-aist/QpSolverCollection
# 3. Install dependent ROS packages
- name: Rosdep install
run: |
set -e
set -x
cd ${GITHUB_WORKSPACE}/catkin_ws
set +x
. devel/setup.bash
set -x
sudo rosdep init
rosdep update
rosdep install -y -r --from-paths src --ignore-src
# 4. Build a package
- name: Catkin build
run: |
set -e
set -x
cd ${GITHUB_WORKSPACE}/catkin_ws
set +x
. devel/setup.bash
set -x
catkin build smplpp --limit-status-rate 0.1 -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DLIBTORCH_PATH=${GITHUB_WORKSPACE}/libtorch -DENABLE_QLD=ON --catkin-make-args all tests