diff --git a/.github/workflows/jrl-cmakemodules.yml b/.github/workflows/jrl-cmakemodules.yml index 4928c9c231b13a19ff537cb1f4fd5dc0c30ead76..563bf3d7da2b4baae82944ab5e4c3023d8de4b59 100644 --- a/.github/workflows/jrl-cmakemodules.yml +++ b/.github/workflows/jrl-cmakemodules.yml @@ -6,7 +6,7 @@ jobs: name: Check configuration with git submodules runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - run: sudo apt install libboost-all-dev libeigen3-dev python3-numpy @@ -17,7 +17,7 @@ jobs: name: Check configuration without git submodules runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: false - run: sudo apt install libboost-all-dev libeigen3-dev python3-numpy diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000000000000000000000000000000000000..29629aece4596053d0b1f763b9cb4e398f4ca890 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,25 @@ +name: Check build on linux + +on: ["push", "pull_request"] + +jobs: + test: + name: "Test python ${{ matrix.python }} on ${{ matrix.ubuntu }}.04" + runs-on: "ubuntu-${{ matrix.ubuntu }}.04" + strategy: + matrix: + python: [3] + ubuntu: [18, 20, 22] + include: + - ubuntu: 18 + python: 2 + steps: + - uses: actions/checkout@v3 + with: + submodules: 'true' + - run: | + sudo apt-get update + sudo apt-get install cmake libboost-all-dev libeigen3-dev python*-numpy python*-dev + - run: cmake -DPYTHON_EXECUTABLE=$(which python${{ matrix.python }}) . + - run: make -j2 + - run: make test diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml index 2d6f9659ff721e2e8473a76ed20b8d05a876e567..01fd930c9e47b729f2c2ad766e21db502865ad64 100644 --- a/.github/workflows/macos-linux-conda.yml +++ b/.github/workflows/macos-linux-conda.yml @@ -26,7 +26,7 @@ jobs: os: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive @@ -37,7 +37,7 @@ jobs: environment-file: .github/workflows/conda/environment.yml python-version: '3.10' - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ${{ env.CCACHE_DIR }} key: ccache-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }} diff --git a/.github/workflows/ros_ci.yml b/.github/workflows/ros_ci.yml index f76ad04377d247900e9589997f510b67ea211be8..cd6f67e083f53184df9a612617f594d2ac456cd8 100644 --- a/.github/workflows/ros_ci.yml +++ b/.github/workflows/ros_ci.yml @@ -22,14 +22,23 @@ jobs: BUILDER: colcon runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive # This step will fetch/store the directory used by ccache before/after the ci run - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ${{ env.CCACHE_DIR }} key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} + - name: Echo CCACHE_DIR + shell: bash -l {0} + env: ${{ matrix.env }} + run: | + echo CCACHE_DIR=${CCACHE_DIR} + - name: Echo CCACHE_DIR + shell: bash -l {0} + run: | + echo CCACHE_DIR=${CCACHE_DIR} # Run industrial_ci - - uses: 'ros-industrial/industrial_ci@master' + - uses: 'ros-industrial/industrial_ci@6a8f546cbd31fbd5c9f77e3409265c8b39abc3d6' env: ${{ matrix.env }} diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml index b25a078e342af433186418a4ce928e18617cc503..aef42b10d234b53c487e3ee42d0a183935267f13 100644 --- a/.github/workflows/windows-conda.yml +++ b/.github/workflows/windows-conda.yml @@ -9,7 +9,7 @@ jobs: matrix: os: [windows-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Checkout submodules run: | git submodule update --init diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f821cc8519e6cf84400c161c2eba22be15fa920..b4b12e3773a362803c843fcfad18289be96542b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,10 @@ endif() set(PYTHON_EXPORT_DEPENDENCY ON) findpython(REQUIRED) +if(${NUMPY_VERSION} VERSION_LESS "1.16.0") + set(NUMPY_WITH_BROKEN_UFUNC_SUPPORT TRUE) +endif() + if(WIN32) link_directories(${PYTHON_LIBRARY_DIRS}) # # Set default Windows build paths SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY diff --git a/cmake b/cmake index 9403226002b930d592ca83b50d3cd714a1c2dc01..74c1e60e72c449b242c524d8406b1f4bf549f498 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 9403226002b930d592ca83b50d3cd714a1c2dc01 +Subproject commit 74c1e60e72c449b242c524d8406b1f4bf549f498 diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt index 7ef9001d42e311edf83ebfaa43fc22964b5d86f3..8e0f194a8953d33e4bde8a6815675551564ee6cd 100644 --- a/unittest/CMakeLists.txt +++ b/unittest/CMakeLists.txt @@ -32,7 +32,10 @@ add_lib_unit_test(include) if(NOT ${EIGEN3_VERSION} VERSION_LESS "3.2.0") add_lib_unit_test(eigen_ref) endif() -add_lib_unit_test(user_type) + +if(NOT NUMPY_WITH_BROKEN_UFUNC_SUPPORT) + add_lib_unit_test(user_type) +endif() add_lib_unit_test(std_vector) 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" "unittest") add_python_unit_test("py-eigen-ref" "unittest/python/test_eigen_ref.py" "unittest") -add_python_unit_test("py-user-type" "unittest/python/test_user_type.py" - "unittest") + +if(NOT NUMPY_WITH_BROKEN_UFUNC_SUPPORT) + add_python_unit_test("py-user-type" "unittest/python/test_user_type.py" + "unittest") +endif() add_python_unit_test("py-switch" "unittest/python/test_switch.py" "python;unittest")