Skip to content

Fix compatibility issue with NumPy 2.x on Windows #1278

Fix compatibility issue with NumPy 2.x on Windows

Fix compatibility issue with NumPy 2.x on Windows #1278

name: CI - OSX/Linux via Conda
on:
push:
paths-ignore:
- 'doc/**'
- '.gitlab-ci.yml'
- '.gitignore'
- '*.md'
- 'LICENSE'
- 'colcon.pkg'
- '.pre-commit-config.yaml'
pull_request:
paths-ignore:
- 'doc/**'
- '.gitlab-ci.yml'
- '.gitignore'
- '*.md'
- 'LICENSE'
- 'colcon.pkg'
- '.pre-commit-config.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
eigenpy-conda:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }} ${{ matrix.cxx_options }}
runs-on: ${{ matrix.os }}
env:
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest","macos-14"]
cxx_options: ['', '-mavx2']
build_type: [Release, Debug]
python-version: ["3.8", "3.12"]
exclude:
- build_type: Debug
cxx_options: -mavx2
os: macos-latest
- build_type: Release
cxx_options: -mavx2
os: macos-latest
- build_type: Debug
cxx_options: -mavx2
os: macos-14
- build_type: Release
cxx_options: -mavx2
os: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: .ccache
key: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-${{ matrix.python-version }}-${{ github.sha }}
restore-keys: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-${{ matrix.python-version }}-
- uses: conda-incubator/setup-miniconda@v3
if: matrix.os != 'macos-14'
with:
activate-environment: eigenpy
auto-update-conda: true
environment-file: .github/workflows/conda/environment_all.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- uses: conda-incubator/setup-miniconda@v3
if: matrix.os == 'macos-14'
with:
activate-environment: eigenpy
auto-update-conda: true
environment-file: .github/workflows/conda/environment_all.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Mambaforge-23.11.0-0-MacOSX-arm64.sh
- name: Build EigenPy
shell: bash -el {0}
run: |
conda list
echo $CONDA_PREFIX
mkdir build
cd build
cmake .. \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DPYTHON_EXECUTABLE=$(which python3) \
-DGENERATE_PYTHON_STUBS=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS=${{ matrix.cxx_options }}
cmake --build . -j3
ctest --output-on-failure
cmake --install .
- name: Test packaging
shell: bash -el {0}
run: |
cmake -B test-packaging \
-S unittest/packaging/cmake \
-G "Ninja" \
-DPYTHON_EXECUTABLE=$(which python3)
- name: Configure hpp-fcl
shell: bash -el {0}
run: |
conda install -c conda-forge octomap assimp qhull
git clone https://github.com/humanoid-path-planner/hpp-fcl.git --recursive
cd hpp-fcl
mkdir build && cd build
cmake .. \
-G "Ninja" \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING_SCIPY=ON \
-DPYTHON_EXECUTABLE=$(which python3)
- name: Uninstall EigenPy
shell: bash -el {0}
run: |
cd build
cmake --build . --target uninstall
check:
if: always()
name: check-macos-linux-conda
needs:
- eigenpy-conda
runs-on: Ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}