Skip to content
Snippets Groups Projects
Unverified Commit ccd8c368 authored by Joris Vaillant's avatar Joris Vaillant
Browse files

ci: Add a workflow that use Pixi and remove conda workflow

parent 01e90fa8
No related branches found
No related tags found
No related merge requests found
name: eigenpy
channels:
- conda-forge
dependencies:
- eigen
- cmake
- numpy
- pkg-config
- boost
- ccache
- cxx-compiler
- ninja
- scipy
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 }} \
-DCMAKE_CXX_STANDARD=11
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) }}
name: CI - Windows via Conda name: CI - MacOS/Linux/Windows via Pixi
on: on:
push: push:
...@@ -24,7 +24,8 @@ concurrency: ...@@ -24,7 +24,8 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
build: eigenpy-pixi:
name: ${{ matrix.os }} - Env ${{ matrix.environment }} ${{ matrix.build_type }} ${{ matrix.cxx_options }} ${{ matrix.compiler }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env: env:
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}" CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
...@@ -35,8 +36,26 @@ jobs: ...@@ -35,8 +36,26 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [windows-latest] os: [ubuntu-latest, macos-latest, macos-13]
compiler: ["cl", "clang-cl"] environment: [all, all-py39]
build_type: [Release, Debug]
cxx_options: ['', '-mavx2']
exclude:
- os: macos-latest
cxx_options: '-mavx2'
- os: macos-13
cxx_options: '-mavx2'
include:
- os: windows-latest
environment: all
cxx_options: ''
build_type: Release
- os: windows-latest
environment: all-clang-cl
cxx_options: ''
build_type: Release
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
...@@ -46,86 +65,29 @@ jobs: ...@@ -46,86 +65,29 @@ jobs:
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: .ccache path: .ccache
key: ccache-windows-conda-${{ matrix.compiler }}-${{ matrix.os }}-${{ github.sha }} key: ccache-macos-linux-windows-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-${{ matrix.environment }}-${{ github.sha }}
restore-keys: ccache-windows-conda-${{ matrix.compiler }}-${{ matrix.os }}- restore-keys: ccache-macos-linux-windows-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_options }}-${{ matrix.environment }}-
- uses: conda-incubator/setup-miniconda@v3 - uses: prefix-dev/setup-pixi@v0.8.1
with: with:
activate-environment: eigenpy pixi-version: v0.31.0
auto-update-conda: true cache: true
environment-file: .github/workflows/conda/environment_all.yml environments: ${{ matrix.environment }}
python-version: "3.10"
auto-activate-base: false
- name: Build Eigenpy - name: Build EigenPy [MacOS/Linux/Windows]
shell: cmd /C CALL {0}
env: env:
CC: ${{ matrix.compiler }} CMAKE_BUILD_PARALLEL_LEVEL: 2
CXX: ${{ matrix.compiler }} EIGENPY_BUILD_TYPE: ${{ matrix.build_type }}
EIGENPY_CXX_FLAGS: ${{ matrix.cxx_options }}
run: | run: |
call conda list pixi run -e ${{ matrix.environment }} test
mkdir build
pushd build
cmake ^
-G "Ninja" ^
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^
-DCMAKE_BUILD_TYPE=Release ^
-DGENERATE_PYTHON_STUBS=ON ^
-DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^
..
if errorlevel 1 exit 1
:: Build
cmake --build . -j3
if errorlevel 1 exit 1
:: Testing
ctest --output-on-failure
if errorlevel 1 exit 1
:: Install
cmake --install .
:: Test Python import
cd ..
python -c "import eigenpy"
if errorlevel 1 exit 1
:: Test packaging
cmake -B test-packaging -S unittest/packaging/cmake ^
-G "Ninja" ^
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe
if errorlevel 1 exit 1
:: Configure hpp-fcl
conda install -c conda-forge octomap assimp qhull
git clone --recursive https://github.com/humanoid-path-planner/hpp-fcl.git
pushd hpp-fcl
mkdir build
pushd build
cmake ^
-G "Ninja" ^
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
-DCMAKE_BUILD_TYPE=Release ^
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^
..
cd ..
if errorlevel 1 exit 1
:: Uninstall
cmake --build . --config Release --target uninstall
if errorlevel 1 exit 1
check: check:
if: always() if: always()
name: check-windows-conda name: check-macos-linux-windows-pixi
needs: needs:
- build - eigenpy-pixi
runs-on: Ubuntu-latest runs-on: Ubuntu-latest
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment