Skip to content

Commit f87fbd1

Browse files
committed
Merge branch 'gha-ci'
2 parents 13af896 + c325ff9 commit f87fbd1

20 files changed

+407
-569
lines changed

.github/workflows/ci.yml

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'doc/**'
7+
- '**.md'
8+
pull_request:
9+
schedule:
10+
- cron: '0 0 * * SAT'
11+
workflow_dispatch:
12+
13+
env:
14+
CMAKE_CCACHE_LAUNCHER: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
15+
16+
jobs:
17+
maybe_skip:
18+
runs-on: ubuntu-latest
19+
outputs:
20+
should_skip: ${{steps.skip_check.outputs.should_skip}}
21+
steps:
22+
- uses: fkirc/skip-duplicate-actions@master
23+
id: skip_check
24+
with:
25+
cancel_others: 'true'
26+
27+
build:
28+
name: build (${{matrix.os}}, ${{matrix.robotology.yarp}}, ${{matrix.compiler.cc}})
29+
runs-on: ${{matrix.os}}
30+
needs: maybe_skip
31+
if: ${{needs.maybe_skip.outputs.should_skip != 'true'}}
32+
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
os: [ubuntu-18.04, ubuntu-20.04]
37+
robotology:
38+
- { yarp: yarp-3.3, ycm: ycm-0.12, cmake: 3.12.x }
39+
- { yarp: yarp-3.4, ycm: ycm-0.12, cmake: 3.12.x }
40+
- { yarp: master, ycm: master, cmake: 3.12.x }
41+
compiler:
42+
- { cc: gcc, cxx: g++ }
43+
- { cc: clang, cxx: clang++ }
44+
experimental:
45+
- ${{github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}}
46+
exclude:
47+
- { experimental: false, robotology: { yarp: master } }
48+
49+
steps:
50+
- name: Check out main project
51+
uses: actions/checkout@v2
52+
53+
- name: Check out YCM
54+
uses: actions/checkout@v2
55+
with:
56+
repository: robotology/ycm
57+
ref: ${{matrix.robotology.ycm}}
58+
path: .deps/ycm
59+
60+
- name: Check out YARP
61+
uses: actions/checkout@v2
62+
with:
63+
repository: robotology/yarp
64+
ref: ${{matrix.robotology.yarp}}
65+
path: .deps/yarp
66+
67+
- name: Install dependencies via apt
68+
run: sudo apt-get update && sudo apt-get install -qq ccache libopencv-dev libpcl-dev swig googletest
69+
70+
- name: Set up CMake 3.12
71+
uses: jwlawson/[email protected]
72+
with:
73+
cmake-version: ${{matrix.robotology.cmake}}
74+
75+
- name: Set up Ccache
76+
uses: hendrikmuhs/ccache-action@v1
77+
with:
78+
key: ${{matrix.os}}-${{matrix.robotology.yarp}}-${{matrix.compiler.cc}}
79+
80+
- name: Create build trees
81+
run: cmake -E make_directory build .deps/ycm/build .deps/yarp/build
82+
83+
- name: Set environment variables
84+
run: echo "CMAKE_COMPILER=-DCMAKE_C_COMPILER=${{matrix.compiler.cc}} -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}" >> $GITHUB_ENV
85+
86+
- name: Build YCM
87+
working-directory: ${{github.workspace}}/.deps/ycm/build
88+
run: |
89+
cmake ..
90+
cmake --build .
91+
sudo cmake --build . --target install
92+
93+
- name: Build YARP
94+
working-directory: ${{github.workspace}}/.deps/yarp/build
95+
run: |
96+
cmake .. $CMAKE_COMPILER $CMAKE_CCACHE_LAUNCHER -DSKIP_ACE=ON -DYARP_DISABLE_VERSION_SOURCE=ON
97+
cmake --build . --parallel
98+
sudo cmake --build . --target install
99+
100+
- name: Build main project
101+
working-directory: ${{github.workspace}}/build
102+
run: |
103+
cmake .. $CMAKE_COMPILER $CMAKE_CCACHE_LAUNCHER -DCREATE_BINDINGS_PYTHON=ON -DENABLE_examples=ON
104+
cmake --build .
105+
sudo cmake --build . --target install
106+
sudo ldconfig
107+
108+
- name: Test main project
109+
working-directory: ${{github.workspace}}/build/tests
110+
run: ctest -V
111+
112+
- name: Uninstall main project
113+
working-directory: ${{github.workspace}}/build
114+
run: sudo cmake --build . --target uninstall

.travis.yml

-76
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Installation instructions for installing from source can be found [here](doc/vis
2525

2626
## Status
2727

28-
[![Build Status (Linux)](https://travis-ci.com/roboticslab-uc3m/vision.svg?branch=master)](https://travis-ci.com/roboticslab-uc3m/vision)
28+
[![CI (Linux)](https://github.com/roboticslab-uc3m/vision/workflows/Continuous%20Integration/badge.svg)](https://github.com/roboticslab-uc3m/vision/actions)
2929

3030
[![Coverage Status](https://coveralls.io/repos/roboticslab-uc3m/vision/badge.svg)](https://coveralls.io/r/roboticslab-uc3m/vision)
3131

examples/cpp/exampleDnnDetector/exampleDnnDetector.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ int main(int argc, char * argv[])
3737

3838
yarp::os::ResourceFinder rf;
3939
rf.setDefaultContext("DnnDetector");
40-
std::string qrFullName = rf.findFileByName("tests/teddy-bear.png");
40+
std::string qrFullName = rf.findFileByName("tests/teddy-bear.ppm");
4141

4242
yarp::sig::ImageOf<yarp::sig::PixelRgb> yarpImgRgb;
4343

44-
if (!yarp::sig::file::read(yarpImgRgb, qrFullName, yarp::sig::file::FORMAT_PNG))
44+
if (!yarp::sig::file::read(yarpImgRgb, qrFullName, yarp::sig::file::FORMAT_PPM))
4545
{
4646
yError() << "Image file not available";
4747
return 1;

examples/cpp/exampleMeshFromLiveRGBD/main.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ int main(int argc, char * argv[])
135135
}
136136
}
137137

138+
#if YARP_VERSION_MINOR >= 4 // https://github.com/robotology/yarp/issues/1959
138139
yarp::sig::ImageOf<yarp::sig::PixelRgb> temp;
140+
#else
141+
yarp::sig::ImageOf<yarp::sig::PixelRgba> temp;
142+
#endif
139143
temp.copy(colorImage);
140144
auto cloud = yarp::sig::utils::depthRgbToPC<yarp::sig::DataXYZRGBA>(depthImage, temp, colorParams);
141145
yInfo() << "Got cloud of" << cloud.size() << "points, organized as" << cloud.width() << "x" << cloud.height();

examples/python/exampleDnnDetector.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
detectorOptions = yarp.Property()
77
detectorOptions.put("device", "DnnDetector")
8-
detectorOptions.put("trainedModel", "yolov3-tiny.weights")
9-
detectorOptions.put("configDNNModel", "yolov3-tiny.cfg")
8+
detectorOptions.put("trainedModel", "yolov3-tiny/yolov3-tiny.weights")
9+
detectorOptions.put("configDNNModel", "yolov3-tiny/yolov3-tiny.cfg")
1010
detectorOptions.put("classesTrainedModel", "coco-object-categories.txt")
1111

1212
detectorDevice = yarp.PolyDriver(detectorOptions)
@@ -19,10 +19,10 @@
1919

2020
rf = yarp.ResourceFinder()
2121
rf.setDefaultContext("DnnDetector")
22-
sampleFullName = rf.findFileByName("tests/teddy-bear.png")
22+
sampleFullName = rf.findFileByName("tests/teddy-bear.ppm")
2323
yarpImgRgb = yarp.ImageRgb()
2424

25-
if not yarp.read(yarpImgRgb, sampleFullName, yarp.FORMAT_PNG):
25+
if not yarp.read(yarpImgRgb, sampleFullName, yarp.FORMAT_PPM):
2626
print("Image file not available")
2727
raise SystemExit
2828

libraries/YarpCloudUtils/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ if(ENABLE_YarpCloudUtils)
4040
set_property(GLOBAL APPEND PROPERTY _exported_dependencies YARP_os YARP_sig)
4141

4242
if(PCL_FOUND AND YARP_pcl_FOUND)
43-
set_property(SOURCE YarpCloudUtils-pcl.cpp PROPERTY COMPILE_DEFINITIONS HAVE_PCL)
44-
4543
target_sources(YarpCloudUtils PRIVATE YarpCloudUtils-pcl.hpp
4644
YarpCloudUtils-pcl-traits.hpp
4745
YarpCloudUtils-pcl-impl.hpp
4846
YarpCloudUtils-pcl-inst.hpp)
4947

5048
target_link_libraries(YarpCloudUtils PRIVATE YARP::YARP_pcl
5149
${PCL_LIBRARIES})
50+
51+
target_compile_definitions(YarpCloudUtils PUBLIC YCU_HAVE_PCL)
5252
endif()
5353

5454
add_library(ROBOTICSLAB::YarpCloudUtils ALIAS YarpCloudUtils)

0 commit comments

Comments
 (0)