-
Notifications
You must be signed in to change notification settings - Fork 1
350 lines (307 loc) · 12.4 KB
/
buildsCI.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
name: Build_CI
on:
push:
branches: ['**']
pull_request:
branches: ['**']
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
LRS_BUILD_CONFIG: Debug
LRS_RUN_CONFIG: Release
PYTHON_PATH: C:\\hostedtoolcache\\windows\\Python\\3.8.1\\x64\\python.exe
jobs:
Windows_testing_cpp_USB_Win7:
runs-on: windows-2016
timeout-minutes: 60
env:
VS15: false
RS_CPP_TEST: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8.1'
- name: Enable Long Paths
shell: powershell
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
- name: PreBuild
shell: bash
run: |
cd scripts && ./api_check.sh && cd ..
mkdir build
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
shell: bash
run: |
cd build
pwd
ls
cmake .. -G "Visual Studio 15 2017 Win64" -DPYTHON_EXECUTABLE=${{env.PYTHON_PATH}} -DBUILD_PYTHON_BINDINGS=true -DPYBIND11_PYTHON_VERSION=3.8 -DBUILD_UNIT_TESTS=false -DBUILD_LEGACY_LIVE_TEST=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=false -DBUILD_WITH_TM2=false -DFORCE_RSUSB_BACKEND=true
- name: Build
# Build your program with the given configuration
shell: bash
run: |
cd build
pwd
ls
cmake --build . --config ${{env.LRS_RUN_CONFIG}} -- -m
- name: Test
shell: bash
id: test-step
# We set continue-on-error: true as a workaround for not skipping the upload log step on failure,
# The final step will check the return value from the test step and decide if to fail/pass the job
continue-on-error: true
run: |
export LRS_LOG_LEVEL="DEBUG";
cd build/${{env.LRS_RUN_CONFIG}}
ls
./live-test.exe -d yes -i [software-device]
- name: Upload RS log artifact
uses: actions/upload-artifact@v2
with:
name: Log file - Windows_testing_cpp_USB_Win7
path: build/${{env.LRS_RUN_CONFIG}}/*.log
- name: Provide correct exit status for job
shell: bash
run: |
if [ ${{steps.test-step.outcome}} = "failure" ];then
echo "Test step failed, please open it to view the reported issue"
exit 1
else
exit 0
fi
Windows_cpp:
runs-on: windows-2016
timeout-minutes: 60
env:
VS15: true
steps:
- uses: actions/checkout@v2
- name: Enable Long Paths
shell: powershell
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
- name: PreBuild
shell: bash
run: |
cd scripts && ./api_check.sh && cd ..
mkdir build
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
shell: bash
run: |
cd build
pwd
ls
cmake .. -G "Visual Studio 15 2017 Win64" -DBUILD_EXAMPLES=true -DBUILD_WITH_TM2=true -DCHECK_FOR_UPDATES=true
- name: Build
# Build your program with the given configuration
shell: bash
run: |
cd build
cmake --build . --config ${{env.LRS_BUILD_CONFIG}} -- -m
Windows_CSharp:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-2016
timeout-minutes: 60
env:
VS15: true
steps:
- uses: actions/checkout@v2
- name: Enable Long Paths
shell: powershell
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
- name: PreBuild
shell: bash
run: |
cd scripts && ./api_check.sh && cd ..
mkdir build
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
shell: bash
run: |
cd build
pwd
ls
cmake .. -G "Visual Studio 15 2017 Win64" -DBUILD_EXAMPLES=false -DBUILD_TOOLS=false -DBUILD_CSHARP_BINDINGS=true -DDOTNET_VERSION_LIBRARY="4.5" -DDOTNET_VERSION_EXAMPLES="4.5" -DCHECK_FOR_UPDATES=true
- name: Build
# Build your program with the given configuration
shell: bash
run: |
cd build
cmake --build . --config ${{env.LRS_BUILD_CONFIG}} -- -m
Linux_testing_cpp:
runs-on: ubuntu-18.04
timeout-minutes: 60
env:
RS_CPP_TEST: true
steps:
- uses: actions/checkout@v2
- name: Prebuild
shell: bash
run: |
cd scripts && ./api_check.sh && cd ..
mkdir build && cd build
export LRS_LOG_LEVEL="DEBUG";
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
sudo apt-get update;
sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev;
sudo apt-get install -qq libusb-1.0-0-dev;
sudo apt-get install -qq libgtk-3-dev;
sudo apt-get install gcc-5 g++-5;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5;
sudo apt-get install libglfw3-dev libglfw3;
- name: Build
shell: bash
run: |
cd build
cmake .. -DBUILD_UNIT_TESTS=false -DBUILD_LEGACY_LIVE_TEST=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=false -DBUILD_WITH_TM2=false -DCHECK_FOR_UPDATES=true
cmake --build . --config ${{env.LRS_RUN_CONFIG}} -- -j4
- name: Test
shell: bash
id: test-step
# We set continue-on-error: true as a workaround for not skipping the upload log step on failure,
# The final step will check the return value from the test step and decide if to fail/pass the job
continue-on-error: true
run: |
export LRS_LOG_LEVEL="DEBUG";
cd build
./unit-tests/live-test -d yes -i [software-device]
- name: Upload RS log artifact
uses: actions/upload-artifact@v2
with:
name: Log file - Linux_testing_cpp
path: build/*.log
- name: Provide correct exit status for job
shell: bash
run: |
if [ ${{steps.test-step.outcome}} = "failure" ];then
echo "Test step failed, please open it to view the reported issue"
exit 1
else
exit 0
fi
Linux_static_cpp:
runs-on: ubuntu-18.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- name: Prebuild
shell: bash
run: |
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
sudo apt-get update;
sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev;
sudo apt-get install -qq libusb-1.0-0-dev;
sudo apt-get install -qq libgtk-3-dev;
sudo apt-get install gcc-5 g++-5;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5;
sudo apt-get install libglfw3-dev libglfw3;
- name: Build
shell: bash
run: |
cd scripts && ./api_check.sh && cd ..
mkdir build
cd ./scripts && ./pr_check.sh && cd ../build
cmake .. -DBUILD_EXAMPLES=true -DBUILD_WITH_TM2=true -DBUILD_SHARED_LIBS=false -DCHECK_FOR_UPDATES=true -DBUILD_PYTHON_BINDINGS=true -DPYBIND11_PYTHON_VERSION=3.5
cmake --build . --config ${{env.LRS_BUILD_CONFIG}} -- -j4
Linux_python_nodejs:
runs-on: ubuntu-18.04
timeout-minutes: 60
env:
LRS_BUILD_NODEJS: true
steps:
- uses: actions/checkout@v2
- name: Prebuild
shell: bash
run: |
set -x
cd ./scripts && ./api_check.sh && cd ..
# Workaround for nvm failure: https://github.com/appleboy/ssh-action/issues/70
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 10.15.3;
nvm use 10.15.3;
npm install -g node-gyp;
npm install -g mocha;
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git;
export OLDPATH=$PATH
echo OLDPATH=$OLDPATH
export PATH=$PATH:$(pwd)/depot_tools;
echo PATH=$PATH
cd wrappers/nodejs/tools && npm install && cd ..;
node ./tools/linter.js;
python ./tools/enums.py -i ../../include/librealsense2 -a ./src -v
export PATH=$OLDPATH && unset OLDPATH && cd ../../;
mkdir build
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
sudo apt-get update;
sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev;
sudo apt-get install -qq libusb-1.0-0-dev;
sudo apt-get install -qq libgtk-3-dev;
sudo apt-get install gcc-5 g++-5;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5;
sudo apt-get install libglfw3-dev libglfw3;
- name: Build
shell: bash
run: |
python ./wrappers/nodejs/tools/enums.py -i ./include/librealsense2 -a ./wrappers/nodejs/src -v
cd build
cmake .. -DBUILD_PYTHON_BINDINGS=true -DBUILD_NODEJS_BINDINGS=true -DPYBIND11_PYTHON_VERSION=2.7 -DCHECK_FOR_UPDATES=true
cmake --build . --config $LRS_BUILD_CONFIG -- -j4
cd ../wrappers/nodejs/ && npm install && cd -
Mac_cpp:
runs-on: macos-10.15
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- name: Prebuild
run: |
cd scripts && ./api_check.sh && cd ..
mkdir build
#brew uninstall xctool;
#brew install xctool --HEAD;
brew install homebrew/core/glfw3;
brew list libusb || brew install libusb;
- name: Build
run: |
cd build
# `OPENSSL_ROOT_DIR` setting is Used by libcurl for 'CHECK_FOR_UPDATES' capability
export OPENSSL_ROOT_DIR=`readlink /usr/local/opt/openssl`
cmake .. -DBUILD_EXAMPLES=true -DBUILD_WITH_OPENMP=false -DHWM_OVER_XU=false -DCHECK_FOR_UPDATES=true
cmake --build . --config ${{env.LRS_BUILD_CONFIG}} -- -j4
ls
Android_cpp:
runs-on: ubuntu-18.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- name: Prebuild
shell: bash
run: |
cd scripts && ./api_check.sh && cd ..
mkdir build
wget https://dl.google.com/android/repository/android-ndk-r20b-linux-x86_64.zip;
unzip -q android-ndk-r20b-linux-x86_64.zip -d ./;
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
sudo apt-get update;
sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev;
sudo apt-get install -qq libusb-1.0-0-dev;
sudo apt-get install -qq libgtk-3-dev;
sudo apt-get install gcc-5 g++-5;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5;
sudo apt-get install libglfw3-dev libglfw3;
- name: Build
run: |
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../android-ndk-r20b/build/cmake/android.toolchain.cmake -DFORCE_RSUSB_BACKEND=true
cmake --build . --config ${{env.LRS_BUILD_CONFIG}} -- -j4
ls