99 - cron : ' 38 2 * * *'
1010
1111jobs :
12- build :
12+ ubuntu_build :
13+ name : ubuntu_build
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v6
17+ - name : Install build-tools
18+ run : sudo apt-get update && sudo apt-get install -y build-essential cmake python3-pandas python3-lxml
19+ - name : configure
20+ run : >
21+ mkdir build &&
22+ cd build &&
23+ cmake ..
24+ -DBUILDING_TESTS=1
25+ -DINTEGRATION_TESTS=1
26+ -DWITH_ASAN=ON
27+ -DPRIMARY_CLIENT_STRICT_PARSING_=ON
28+ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
29+ -DCHECK_RTDE_DOCS_RECIPE=ON
30+ env :
31+ CXXFLAGS : -g -O2 -fprofile-arcs -ftest-coverage
32+ CFLAGS : -g -O2 -fprofile-arcs -ftest-coverage
33+ LDFLAGS : -fprofile-arcs -ftest-coverage
34+ - name : build
35+ id : build
36+ run : cmake --build build --config Debug
37+ - name : Upload CMake build directory
38+ if : steps.build.outcome == 'success'
39+ uses : actions/upload-artifact@v7
40+ with :
41+ name : cmake-build-${{ matrix.env.ROBOT_MODEL }}-${{ matrix.env.URSIM_VERSION }}
42+ path : build
43+ if-no-files-found : error
44+ retention-days : 5
45+
46+ run_tests :
1347 timeout-minutes : 60
1448 runs-on : ubuntu-latest
15- name : build (${{matrix.env.URSIM_VERSION}}-${{matrix.env.ROBOT_MODEL}})
49+ name : run_tests (${{matrix.env.URSIM_VERSION}}-${{matrix.env.ROBOT_MODEL}})
50+ needs : ubuntu_build
1651 strategy :
1752 fail-fast : false
1853 matrix :
4681 ROBOT_MODEL : ${{matrix.env.ROBOT_MODEL}}
4782 URSIM_VERSION : ${{matrix.env.URSIM_VERSION}}
4883 PROGRAM_FOLDER : ${{matrix.env.PROGRAM_FOLDER}}
49- - name : install-pips
50- run : pip install pandas lxml
5184 - id : check_polyscopex
5285 run : |
5386 if [[ "${{matrix.env.URSIM_VERSION}}" == "10."* ]]; then
@@ -57,24 +90,11 @@ jobs:
5790 fi
5891 - name : setup chrome
5992 uses : browser-actions/setup-chrome@v2
60- - name : configure
61- run : >
62- mkdir build &&
63- cd build &&
64- cmake ..
65- -DBUILDING_TESTS=1
66- -DINTEGRATION_TESTS=1
67- -DWITH_ASAN=ON
68- -DPRIMARY_CLIENT_STRICT_PARSING=ON
69- -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
70- -DCHECK_RTDE_DOCS_RECIPE=ON
71- env :
72- CXXFLAGS : -g -O2 -fprofile-arcs -ftest-coverage
73- CFLAGS : -g -O2 -fprofile-arcs -ftest-coverage
74- LDFLAGS : -fprofile-arcs -ftest-coverage
75- - name : build
76- id : build
77- run : cmake --build build --config Debug
93+ - name : Download CMake build directory
94+ uses : actions/download-artifact@v7
95+ with :
96+ name : cmake-build-${{ matrix.env.ROBOT_MODEL }}-${{ matrix.env.URSIM_VERSION }}
97+ path : build
7898 - name : Create folder for test artifacts
7999 run : mkdir -p test_artifacts
80100 - name : Access PolyScope
@@ -96,13 +116,10 @@ jobs:
96116 - name : run examples
97117 run : ./run_examples.sh "192.168.56.101" 1
98118 - name : install gcovr
99- if : ${{ !cancelled() && steps.build.outcome == 'success' }}
100119 run : sudo apt-get install -y gcovr
101120 - name : gcovr
102- if : ${{ !cancelled() && steps.build.outcome == 'success' }}
103121 run : cd build && gcovr -r .. --xml coverage.xml --gcov-ignore-parse-errors negative_hits.warn_once_per_file --exclude "../3rdparty"
104122 - name : Upload coverage reports to Codecov with GitHub Action
105- if : ${{ !cancelled() && steps.build.outcome == 'success' }}
106123 uses : codecov/codecov-action@v6
107124 with :
108125 fail_ci_if_error : true
@@ -150,6 +167,147 @@ jobs:
150167 if-no-files-found : warn
151168 retention-days : 10
152169
170+ robot_model_check :
171+ timeout-minutes : 60
172+ runs-on : ubuntu-latest
173+ needs : ubuntu_build
174+ name : check_model (${{matrix.env.URSIM_VERSION}}-${{matrix.env.ROBOT_MODEL}})
175+ strategy :
176+ fail-fast : false
177+ matrix :
178+ env :
179+ - ROBOT_MODEL : ' ur3'
180+ URSIM_VERSION : ' 3.14.3'
181+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/cb3'
182+ - ROBOT_MODEL : ' ur5'
183+ URSIM_VERSION : ' 3.15.8'
184+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/cb3'
185+ - ROBOT_MODEL : ' ur10'
186+ URSIM_VERSION : ' 3.15.8'
187+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/cb3'
188+ - ROBOT_MODEL : ' ur3e'
189+ URSIM_VERSION : ' 5.9.4'
190+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/e-series'
191+ - ROBOT_MODEL : ' ur5e'
192+ URSIM_VERSION : ' 5.12.8'
193+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/e-series'
194+ - ROBOT_MODEL : ' ur7e'
195+ URSIM_VERSION : ' 5.15.2'
196+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/e-series'
197+ - ROBOT_MODEL : ' ur10e'
198+ URSIM_VERSION : ' 5.22.2'
199+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/e-series'
200+ - ROBOT_MODEL : ' ur12e'
201+ URSIM_VERSION : ' 5.25.1'
202+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/e-series'
203+ - ROBOT_MODEL : ' ur16e'
204+ URSIM_VERSION : ' 5.25.1'
205+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/e-series'
206+ - ROBOT_MODEL : ' ur8long'
207+ URSIM_VERSION : ' 5.25.1'
208+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/e-series'
209+ - ROBOT_MODEL : ' ur15'
210+ URSIM_VERSION : ' 5.25.1'
211+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/e-series'
212+ - ROBOT_MODEL : ' ur18'
213+ URSIM_VERSION : ' 5.25.1'
214+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/e-series'
215+ - ROBOT_MODEL : ' ur20'
216+ URSIM_VERSION : ' 5.25.1'
217+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/e-series'
218+ - ROBOT_MODEL : ' ur30'
219+ URSIM_VERSION : ' 5.25.1'
220+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/e-series'
221+ - ROBOT_MODEL : ' ur3e'
222+ URSIM_VERSION : ' 10.11.0'
223+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
224+ - ROBOT_MODEL : ' ur5e'
225+ URSIM_VERSION : ' 10.11.0'
226+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
227+ - ROBOT_MODEL : ' ur7e'
228+ URSIM_VERSION : ' 10.11.0'
229+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
230+ - ROBOT_MODEL : ' ur10e'
231+ URSIM_VERSION : ' 10.11.0'
232+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
233+ - ROBOT_MODEL : ' ur12e'
234+ URSIM_VERSION : ' 10.12.1'
235+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
236+ - ROBOT_MODEL : ' ur16e'
237+ URSIM_VERSION : ' 10.12.1'
238+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
239+ - ROBOT_MODEL : ' ur8long'
240+ URSIM_VERSION : ' 10.12.1'
241+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
242+ - ROBOT_MODEL : ' ur15'
243+ URSIM_VERSION : ' 10.12.1'
244+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
245+ - ROBOT_MODEL : ' ur18'
246+ URSIM_VERSION : ' 10.12.1'
247+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
248+ - ROBOT_MODEL : ' ur20'
249+ URSIM_VERSION : ' 10.12.1'
250+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
251+ - ROBOT_MODEL : ' ur30'
252+ URSIM_VERSION : ' 10.12.1'
253+ PROGRAM_FOLDER : ' tests/resources/dockerursim/programs/polyscopex'
254+
255+ steps :
256+ - uses : actions/checkout@v6
257+ - name : start ursim
258+ run : |
259+ scripts/start_ursim.sh -m $ROBOT_MODEL -v $URSIM_VERSION -p $PROGRAM_FOLDER -d -f DISABLED
260+ - name : Download CMake build directory
261+ uses : actions/download-artifact@v7
262+ with :
263+ name : cmake-build-${{ matrix.env.ROBOT_MODEL }}-${{ matrix.env.URSIM_VERSION }}
264+ path : build
265+ env :
266+ DOCKER_RUN_OPTS : --network ursim_net
267+ ROBOT_MODEL : ${{matrix.env.ROBOT_MODEL}}
268+ URSIM_VERSION : ${{matrix.env.URSIM_VERSION}}
269+ PROGRAM_FOLDER : ${{matrix.env.PROGRAM_FOLDER}}
270+ - name : test robot type
271+ run : cd build && ctest -R PrimaryClientTest.test_robot_type --verbose --output-junit junit.xml
272+ env :
273+ URSIM_VERSION : ${{matrix.env.URSIM_VERSION}}
274+ ROBOT_MODEL : ${{matrix.env.ROBOT_MODEL}}
275+ - name : install gcovr
276+ run : sudo apt-get install -y gcovr
277+ - name : gcovr
278+ run : cd build && gcovr -r .. --xml coverage.xml --gcov-ignore-parse-errors negative_hits.warn_once_per_file --exclude "../3rdparty"
279+ - name : Upload coverage reports to Codecov with GitHub Action
280+ uses : codecov/codecov-action@v6
281+ with :
282+ fail_ci_if_error : true
283+ files : build/coverage.xml
284+ flags : check_version_${{ matrix.env.ROBOT_MODEL }}-${{ matrix.env.URSIM_VERSION }}
285+ env :
286+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
287+ - name : Generate URSim log files
288+ if : ${{ always() && steps.check_polyscopex.outputs.is_polyscopex == 'false' }}
289+ run : |
290+ nc -q 1 192.168.56.101 29999 <<END
291+ saveLog
292+ END
293+ mkdir -p ursim_logs
294+ docker cp ursim:/ursim/URControl.log ursim_logs/URControl.log
295+ docker cp ursim:/ursim/polyscope.log ursim_logs/polyscope.log
296+ docker cp ursim:/ursim/log_history.txt ursim_logs/log_history.txt
297+ - name : Copy flight reports
298+ if : ${{ failure() && steps.check_polyscopex.outputs.is_polyscopex == 'false' }}
299+ run : |
300+ mkdir -p ursim_logs/flightreports
301+ docker cp ursim:/ursim/flightreports/. ursim_logs/flightreports/
302+ - name : Upload logfiles
303+ uses : actions/upload-artifact@v7
304+ if : ${{ always() && steps.check_polyscopex.outputs.is_polyscopex == 'false' }}
305+ with :
306+ name : ${{matrix.env.ROBOT_MODEL}}_${{matrix.env.URSIM_VERSION}}_model_check_URSim_Logs
307+ path : ursim_logs
308+ if-no-files-found : error
309+ retention-days : 10
310+
153311 test_start_ursim :
154312 runs-on : ubuntu-latest
155313 steps :
0 commit comments