8
8
jobs :
9
9
build :
10
10
name : Build
11
- runs-on : ubuntu-18.04
11
+ runs-on : ${{ matrix.os }}
12
12
strategy :
13
13
fail-fast : false
14
14
matrix :
15
+ os : [ubuntu-20.04]
15
16
orocos_build_type : [Debug, Release]
16
17
compiler : [gcc, clang]
18
+ python_version : ['3.8']
19
+ include :
20
+ - os : ubuntu-18.04
21
+ orocos_build_type : Release
22
+ compiler : gcc
23
+ python_version : ' 2'
24
+ - os : ubuntu-20.04
25
+ orocos_build_type : Release
26
+ compiler : gcc
27
+ python_version : ' 3.9'
17
28
env :
18
29
CC : ${{ matrix.compiler }}
19
30
OROCOS_BUILD_TYPE : ${{ matrix.orocos_build_type }}
31
+ ROS_PYTHON_VERSION : ${{ matrix.python_version }}
20
32
steps :
21
33
- uses : actions/checkout@v2
22
34
with :
23
35
submodules : recursive
36
+ - uses : actions/setup-python@v2
37
+ with :
38
+ python-version : ${{ matrix.python_version }}
24
39
- name : Install
25
40
run : |
26
- sudo apt-get install libeigen3-dev libcppunit-dev python-psutil python3-psutil python-future python3-future
41
+ sudo apt-get install libeigen3-dev libcppunit-dev
42
+ pip install psutil future
27
43
- name : Build orocos_kdl
28
44
run : |
29
45
cd orocos_kdl
@@ -32,40 +48,26 @@ jobs:
32
48
cmake -DENABLE_TESTS:BOOL=ON -DCMAKE_BUILD_TYPE=${OROCOS_KDL_BUILD_TYPE} ./..
33
49
make
34
50
sudo make install
35
- - name : Build PyKDL Python 2
36
- run : |
37
- cd python_orocos_kdl
38
- mkdir build2
39
- cd build2
40
- export ROS_PYTHON_VERSION=2
41
- cmake -DCMAKE_BUILD_TYPE=${OROCOS_KDL_BUILD_TYPE} ./..
42
- make
43
- sudo make install
44
- - name : Build PyKDL Python 3
51
+ - name : Build PyKDL
45
52
run : |
46
53
cd python_orocos_kdl
47
- mkdir build3
48
- cd build3
49
- export ROS_PYTHON_VERSION=3
54
+ mkdir build
55
+ cd build
50
56
cmake -DCMAKE_BUILD_TYPE=${OROCOS_KDL_BUILD_TYPE} ./..
51
57
make
52
58
sudo make install
53
- - name : Update LD_LIBRARY_PATH
54
- run : |
55
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
56
- sudo ldconfig
59
+ - name : ldconfig
60
+ run : sudo ldconfig
57
61
- name : Test orocos_kdl
58
62
run : |
59
63
cd orocos_kdl/build
60
64
make check
61
- - name : Test PyKDL Python 2
62
- run : |
63
- cd python_orocos_kdl
64
- python2 tests/PyKDLtest.py
65
- - name : Test PyKDL Python 3
65
+ - name : Test PyKDL
66
66
run : |
67
67
cd python_orocos_kdl
68
- python3 tests/PyKDLtest.py
68
+ python_version_short=$(python -c "import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))")
69
+ export PYTHONPATH=/usr/local/lib/python${python_version_short}/dist-packages${PYTHONPATH:+:${PYTHONPATH}}
70
+ python tests/PyKDLtest.py
69
71
70
72
industrial_ci :
71
73
name : Industrial CI - ${{ matrix.env.ROS_DISTRO }}
0 commit comments