Skip to content

Commit 7945405

Browse files
authored
Merge pull request #341 from nim65s/devel
test python 2/3 ubuntu 18/20/22
2 parents bdb93a9 + a083857 commit 7945405

File tree

8 files changed

+56
-12
lines changed

8 files changed

+56
-12
lines changed

.github/workflows/jrl-cmakemodules.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
name: Check configuration with git submodules
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
with:
1111
submodules: true
1212
- run: sudo apt install libboost-all-dev libeigen3-dev python3-numpy
@@ -17,7 +17,7 @@ jobs:
1717
name: Check configuration without git submodules
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121
with:
2222
submodules: false
2323
- run: sudo apt install libboost-all-dev libeigen3-dev python3-numpy

.github/workflows/linux.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Check build on linux
2+
3+
on: ["push", "pull_request"]
4+
5+
jobs:
6+
test:
7+
name: "Test python ${{ matrix.python }} on ${{ matrix.ubuntu }}.04"
8+
runs-on: "ubuntu-${{ matrix.ubuntu }}.04"
9+
strategy:
10+
matrix:
11+
python: [3]
12+
ubuntu: [18, 20, 22]
13+
include:
14+
- ubuntu: 18
15+
python: 2
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
submodules: 'true'
20+
- run: |
21+
sudo apt-get update
22+
sudo apt-get install cmake libboost-all-dev libeigen3-dev python*-numpy python*-dev
23+
- run: cmake -DPYTHON_EXECUTABLE=$(which python${{ matrix.python }}) .
24+
- run: make -j2
25+
- run: make test

.github/workflows/macos-linux-conda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
os: macos-latest
2727

2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v3
3030
with:
3131
submodules: recursive
3232

@@ -37,7 +37,7 @@ jobs:
3737
environment-file: .github/workflows/conda/environment.yml
3838
python-version: '3.10'
3939

40-
- uses: actions/cache@v2
40+
- uses: actions/cache@v3
4141
with:
4242
path: ${{ env.CCACHE_DIR }}
4343
key: ccache-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}

.github/workflows/ros_ci.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,23 @@ jobs:
2222
BUILDER: colcon
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2626
with:
2727
submodules: recursive
2828
# This step will fetch/store the directory used by ccache before/after the ci run
29-
- uses: actions/cache@v2
29+
- uses: actions/cache@v3
3030
with:
3131
path: ${{ env.CCACHE_DIR }}
3232
key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
33+
- name: Echo CCACHE_DIR
34+
shell: bash -l {0}
35+
env: ${{ matrix.env }}
36+
run: |
37+
echo CCACHE_DIR=${CCACHE_DIR}
38+
- name: Echo CCACHE_DIR
39+
shell: bash -l {0}
40+
run: |
41+
echo CCACHE_DIR=${CCACHE_DIR}
3342
# Run industrial_ci
34-
- uses: 'ros-industrial/industrial_ci@master'
43+
- uses: 'ros-industrial/industrial_ci@6a8f546cbd31fbd5c9f77e3409265c8b39abc3d6'
3544
env: ${{ matrix.env }}

.github/workflows/windows-conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
matrix:
1010
os: [windows-latest]
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313
- name: Checkout submodules
1414
run: |
1515
git submodule update --init

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ endif()
8282
set(PYTHON_EXPORT_DEPENDENCY ON)
8383
findpython(REQUIRED)
8484

85+
if(${NUMPY_VERSION} VERSION_LESS "1.16.0")
86+
set(NUMPY_WITH_BROKEN_UFUNC_SUPPORT TRUE)
87+
endif()
88+
8589
if(WIN32)
8690
link_directories(${PYTHON_LIBRARY_DIRS})
8791
# # Set default Windows build paths SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY

cmake

unittest/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ add_lib_unit_test(include)
3232
if(NOT ${EIGEN3_VERSION} VERSION_LESS "3.2.0")
3333
add_lib_unit_test(eigen_ref)
3434
endif()
35-
add_lib_unit_test(user_type)
35+
36+
if(NOT NUMPY_WITH_BROKEN_UFUNC_SUPPORT)
37+
add_lib_unit_test(user_type)
38+
endif()
3639
add_lib_unit_test(std_vector)
3740

3841
add_python_unit_test("py-matrix" "unittest/python/test_matrix.py" "unittest")
@@ -43,8 +46,11 @@ add_python_unit_test("py-return-by-ref" "unittest/python/test_return_by_ref.py"
4346
"unittest")
4447
add_python_unit_test("py-eigen-ref" "unittest/python/test_eigen_ref.py"
4548
"unittest")
46-
add_python_unit_test("py-user-type" "unittest/python/test_user_type.py"
47-
"unittest")
49+
50+
if(NOT NUMPY_WITH_BROKEN_UFUNC_SUPPORT)
51+
add_python_unit_test("py-user-type" "unittest/python/test_user_type.py"
52+
"unittest")
53+
endif()
4854

4955
add_python_unit_test("py-switch" "unittest/python/test_switch.py"
5056
"python;unittest")

0 commit comments

Comments
 (0)