-
Notifications
You must be signed in to change notification settings - Fork 59
209 lines (199 loc) · 8.62 KB
/
Copy pathbuild.yml
File metadata and controls
209 lines (199 loc) · 8.62 KB
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
name: CI of mc_rtc
on:
push:
paths-ignore:
# Changes to those files don't mandate running CI
- ".gitlab-ci.yml"
- ".jrl-ci"
- ".github/workflows/package.yml"
- ".github/workflows/sources/*"
- ".github/workflows/build-others.yml"
- ".github/workflows/docker/*"
- "debian/**"
branches:
- '**'
pull_request:
branches:
- '**'
env:
# Branch that triggered this workflow
GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }}
jobs:
build:
strategy:
fail-fast: false
matrix:
# temporarely disable macos-latest
# temporarely disable windows-latest
os: [ubuntu-22.04]
build-type: [Debug, RelWithDebInfo]
compiler: [gcc, clang]
exclude:
# Only default compiler on macos-latest and windows-latest
- os: macos-latest
compiler: clang
- os: windows-latest
compiler: clang
# FIXME Windows Debug CI fails: tests are failing
- os: windows-latest
build-type: Debug
runs-on: ${{ matrix.os }}
steps:
- name: Dump github context
run: echo "$GITHUB_CONTEXT"
shell: bash
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- name: Set repository name based on event (pull_request/push)
shell: bash
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "GITHUB_REPO_TRIGGER=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
else
echo "GITHUB_REPO_TRIGGER=${{ github.repository }}" >> $GITHUB_ENV
fi
- name: Use repository name
shell: bash
run: echo "The triggering repository is $GITHUB_REPO_TRIGGER"
- name: Linux cleanup
if: matrix.os == 'ubuntu-22.04'
run: |
set -e
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android
echo "LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
- name: macOS cleanup
if: startsWith(runner.os, 'macOS')
run: |
sudo rm '/usr/local/bin/2to3'
- name: Clone superbuild
if: matrix.os != 'windows-latest'
uses: actions/checkout@v4
with:
submodules: recursive
repository: mc-rtc/mc-rtc-superbuild
path: mc-rtc-superbuild
- name: "[superbuild] Bootstrap"
if: matrix.os != 'windows-latest'
shell: bash
run: |
cd ${GITHUB_WORKSPACE}/mc-rtc-superbuild
./utils/bootstrap-linux.sh
git config --global user.email "arn.tanguy@gmail.com"
git config --global user.name "Arnaud Tanguy (Automated CI update)"
- name: "[superbuild] Install system dependencies"
if: matrix.os != 'windows-latest'
shell: bash
run: |
mkdir -p ${TMPDIR-/tmp}/build-mc-rtc
cmake -S ${GITHUB_WORKSPACE}/mc-rtc-superbuild \
-B ${TMPDIR-/tmp}/build-mc-rtc \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DINSTALL_DOCUMENTATION=ON \
-DMC_RTC_SUPERBUILD_OVERRIDE_mc_rtc_GITHUB=${GITHUB_REPO_TRIGGER} \
-DMC_RTC_SUPERBUILD_OVERRIDE_mc_rtc_GIT_TAG="origin/${GITHUB_BRANCH}"
- name: "[superbuild] Install mc_rtc and related projects"
if: matrix.os != 'windows-latest'
shell: bash
run: |
cmake --build ${TMPDIR-/tmp}/build-mc-rtc --config RelWithDebInfo
# mc-rtc-superbuild does not support windows yet, build manually
- uses: actions/checkout@v4
with:
submodules: recursive
- name: "[windows] Install dependencies"
if: matrix.os == 'windows-latest'
uses: jrl-umi3218/github-actions/install-dependencies@master
with:
compiler: ${{ matrix.compiler }}
build-type: ${{ matrix.build-type }}
windows: |
pip: Cython coverage numpy pytest
github:
- path: eigenteam/eigen-git-mirror
ref: 3.3.7
- path: leethomason/tinyxml2
ref: 7.1.0
- path: libgeos/geos
ref: 3.8.1
options: -DBUILD_TESTING:BOOL=ON
- path: nanomsg/nanomsg
ref: 1.1.5
- path: jbeder/yaml-cpp
ref: 29dcf92f870ee51cce8d68f8fcfe228942e8dfe1
options: -DYAML_CPP_BUILD_TESTS:BOOL=OFF
windows-options: -DPYTHON_BINDING:BOOL=OFF
github: |
- path: gabime/spdlog
ref: v1.6.1
options: -DSPDLOG_BUILD_EXAMPLE:BOOL=OFF -DSPDLOG_BUILD_SHARED:BOOL=ON
- path: loco-3d/ndcurves
ref: v1.1.5
options: -DBUILD_PYTHON_INTERFACE:BOOL=OFF
- path: jrl-umi3218/Eigen3ToPython
- path: jrl-umi3218/SpaceVecAlg
- path: jrl-umi3218/sch-core
options: -DCMAKE_CXX_STANDARD=11
- path: jrl-umi3218/eigen-qld
- path: jrl-umi3218/sch-core-python
- path: jrl-umi3218/RBDyn
- path: jrl-umi3218/Tasks
- path: jrl-umi3218/mc_rbdyn_urdf
- path: jrl-umi3218/jvrc_description
options: -DDISABLE_ROS:BOOL=ON
- path: jrl-umi3218/mc_env_description
options: -DDISABLE_ROS:BOOL=ON
- path: jrl-umi3218/mc_int_obj_description
options: -DDISABLE_ROS:BOOL=ON
- path: jrl-umi3218/eigen-quadprog
- path: jrl-umi3218/state-observation
- path: jrl-umi3218/tvm
options: -DTVM_WITH_ROBOT:BOOL=OFF
- path: jrl-umi3218/mesh_sampling
- name: "[windows] Build and test"
if: matrix.os == 'windows-latest' && (matrix.build-type == 'RelWithDebInfo' || (matrix.build-type == 'Debug' && github.ref == 'refs/heads/master'))
uses: jrl-umi3218/github-actions/build-cmake-project@master
with:
compiler: ${{ matrix.compiler }}
build-type: ${{ matrix.build-type }}
windows-options: -DPYTHON_BINDING:BOOL=OFF
- name: Generate directory listing for schemas
# Only run on master branch and for one configuration
if: matrix.os == 'ubuntu-22.04' && matrix.build-type == 'RelWithDebInfo' && matrix.compiler == 'gcc' && github.ref == 'refs/heads/topic/SchemaCompletion' && github.repository == 'arntanguy/mc_rtc'
uses: jayanta525/github-pages-directory-listing@v4.0.0
with:
FOLDER: /tmp/build-mc-rtc/src/mc_rtc/doc/_data/schemas
- name: Upload documentation
# Only run on master branch and for one configuration
if: matrix.os == 'ubuntu-22.04' && matrix.build-type == 'RelWithDebInfo' && matrix.compiler == 'gcc' && github.ref == 'refs/heads/master' && github.repository == 'jrl-umi3218/mc_rtc'
run: |
set -x
pushd .
cd ${TMPDIR-/tmp}/build-mc-rtc/src/mc_rtc/doc
cp -r /usr/local/share/doc/mc_rtc/doxygen-html .
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/SpaceVecAlg/doxygen-html/@https://jrl-umi3218.github.io/SpaceVecAlg/doxygen/HEAD/@g'
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/RBDyn/doxygen-html/@https://jrl-umi3218.github.io/RBDyn/doxygen/HEAD/@g'
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/Tasks/doxygen-html/@https://jrl-umi3218.github.io/Tasks/doxygen/HEAD/@g'
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/sch-core/doxygen-html/@https://jrl-umi3218.github.io/sch-core/doxygen/HEAD/@g'
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/mc_rbdyn_urdf/doxygen-html/@https://jrl-umi3218.github.io/mc_rbdyn_urdf/doxygen/HEAD/@g'
find . -type f -print0 | xargs -0 sed -i -e's@/usr/local/share/doc/TVM/doxygen-html/@https://jrl-umi3218.github.io/tvm/doxygen/HEAD/@g'
sudo apt-get install -qq ruby-dev ruby-bundler libxml2-dev
bundle install --path vendor
git clone -b gh-pages https://gergondet:${{ secrets.GH_PAGES_TOKEN }}@github.com/jrl-umi3218/mc_rtc /tmp/website
bundle exec jekyll build --trace -b /mc_rtc -d /tmp/website
cp -r ${TMPDIR-/tmp}/build-mc-rtc/src/mc_rtc/doc/_data/schemas /tmp/website
cd /tmp/website
git add .
git config --global user.email "arn.tanguy@gmail.com"
git config --global user.name "Arnaud Tanguy (Automated CI update)"
git commit -m "Website from commit ${GITHUB_SHA}"
git push origin gh-pages
popd
- name: Slack Notification
if: failure()
uses: archive/github-actions-slack@master
with:
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel: '#ci'
slack-text: >
[mc_rtc] Build *${{ matrix.os }}/${{ matrix.build-type }} (${{ matrix.compiler }})* failed on ${{ github.ref }}