Skip to content

Commit 0ecba27

Browse files
committed
Pull ROS Docker images
1 parent 70230b3 commit 0ecba27

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,21 @@ jobs:
2727

2828
build:
2929
name: build (${{matrix.system.os}}, ${{matrix.robotology.yarp}}, ${{matrix.system.compiler.cc}})
30-
runs-on: ${{matrix.system.os}}
30+
runs-on: ubuntu-latest
31+
container:
32+
image: ros:${{matrix.system.ros}}-ros-core
3133
needs: maybe_skip
3234
if: ${{needs.maybe_skip.outputs.should_skip != 'true'}}
3335

3436
strategy:
3537
fail-fast: false
3638
matrix:
3739
system:
38-
- { os: ubuntu-22.04, compiler: { cc: gcc-11, cxx: g++-11 } }
40+
- { os: ubuntu-22.04, ros: humble, compiler: { cc: gcc-11, cxx: g++-11, apt: g++-11 } }
3941
# https://github.com/roboticslab-uc3m/questions-and-answers/issues/101
40-
- { os: ubuntu-22.04, compiler: { cc: clang-15, cxx: clang++-15 } }
41-
- { os: ubuntu-24.04, compiler: { cc: gcc-13, cxx: g++-13 } }
42-
- { os: ubuntu-24.04, compiler: { cc: clang-18, cxx: clang++-18 } }
42+
- { os: ubuntu-22.04, ros: humble, compiler: { cc: clang-15, cxx: clang++-15, apt: clang-15 } }
43+
- { os: ubuntu-24.04, ros: jazzy, compiler: { cc: gcc-13, cxx: g++-13, apt: g++-13 } }
44+
- { os: ubuntu-24.04, ros: jazzy, compiler: { cc: clang-18, cxx: clang++-18, apt: clang-18 } }
4345
robotology:
4446
- { yarp: yarp-3.10, cmake: 3.19.x }
4547
- { yarp: yarp-3.11, cmake: 3.19.x }
@@ -73,15 +75,14 @@ jobs:
7375
path: .deps/kdl
7476

7577
- name: Check out SWIG
76-
if: ${{matrix.system.os == 'ubuntu-24.04'}}
7778
uses: actions/checkout@v4
7879
with:
7980
repository: swig/swig
8081
ref: v4.2.1
8182
path: .deps/swig
8283

8384
- name: Install dependencies via apt
84-
run: sudo apt-get install -qq ccache libeigen3-dev googletest
85+
run: apt-get update && apt-get install -qq ccache make ${{matrix.system.compiler.apt}} libeigen3-dev bison googletest
8586

8687
- name: Set up CMake
8788
uses: jwlawson/actions-setup-cmake@v2
@@ -102,40 +103,41 @@ jobs:
102103
run: |
103104
cmake -S .deps/ycm -B .deps/ycm/build
104105
cmake --build .deps/ycm/build
105-
sudo cmake --install .deps/ycm/build
106+
cmake --install .deps/ycm/build
106107
107108
- name: Build YARP
108109
run: |
109110
cmake -S .deps/yarp -B .deps/yarp/build -DSKIP_ACE=ON -DYARP_DISABLE_VERSION_SOURCE=ON -DENABLE_yarpmod_fakeMotionControl=ON
110111
cmake --build .deps/yarp/build
111-
sudo cmake --install .deps/yarp/build
112+
cmake --install .deps/yarp/build
112113
113114
- name: Build Orocos KDL
114115
run: |
115116
cmake -S .deps/kdl/orocos_kdl -B .deps/kdl/orocos_kdl/build
116117
cmake --build .deps/kdl/orocos_kdl/build
117-
sudo cmake --install .deps/kdl/orocos_kdl/build
118+
cmake --install .deps/kdl/orocos_kdl/build
118119
119120
- name: Build SWIG
120-
if: ${{matrix.system.os == 'ubuntu-24.04'}}
121121
run: |
122-
cmake -S .deps/swig -B .deps/swig/build
122+
cmake -S .deps/swig -B .deps/swig/build -DWITH_PCRE=OFF
123123
cmake --build .deps/swig/build
124-
sudo cmake --install .deps/swig/build
125-
sudo ln -s /usr/local/bin/swig /usr/local/bin/swig4.0 # shadows /usr/bin/swig4.0
124+
cmake --install .deps/swig/build
125+
ln -s /usr/local/bin/swig /usr/local/bin/swig4.0 # shadows /usr/bin/swig4.0
126126
127127
- name: Configure main project
128-
run: cmake -S . -B ./build -DCREATE_BINDINGS_PYTHON=ON -DENABLE_examples=ON
128+
run: |
129+
. /opt/ros/${{matrix.system.ros}}/setup.bash
130+
cmake -S . -B ./build -DCREATE_BINDINGS_PYTHON=ON -DENABLE_examples=ON
129131
130132
- name: Compile main project
131133
run: cmake --build ./build
132134

133135
- name: Install main project
134-
run: sudo cmake --install ./build && sudo ldconfig
136+
run: cmake --install ./build && ldconfig
135137

136138
- name: Test main project
137139
working-directory: build
138140
run: ctest -V
139141

140142
- name: Uninstall main project
141-
run: sudo cmake --build ./build --target uninstall
143+
run: cmake --build ./build --target uninstall

0 commit comments

Comments
 (0)