Skip to content

Commit

Permalink
Merge pull request #2459 from jorisv/topic/pixi
Browse files Browse the repository at this point in the history
Add pixi support
  • Loading branch information
jorisv authored Oct 28, 2024
2 parents 2e55c8b + 141925c commit 68166cc
Show file tree
Hide file tree
Showing 25 changed files with 25,123 additions and 342 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GitHub syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
27 changes: 0 additions & 27 deletions .github/workflows/conda/environment_macos_linux.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/conda/environment_windows.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- COPYING.LESSER
- colcon.pkg
- .pre-commit-config.yaml
- CHANGELOG.md
pull_request:
paths-ignore:
- doc/**
Expand All @@ -21,6 +22,7 @@ on:
- COPYING.LESSER
- colcon.pkg
- .pre-commit-config.yaml
- CHANGELOG.md
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI - OSX/Linux via Conda
name: CI - MacOS/Linux/Windows via Pixi

on:
schedule:
Expand All @@ -13,6 +13,7 @@ on:
- COPYING.LESSER
- colcon.pkg
- .pre-commit-config.yaml
- CHANGELOG.md
pull_request:
paths-ignore:
- doc/**
Expand All @@ -23,13 +24,14 @@ on:
- COPYING.LESSER
- colcon.pkg
- .pre-commit-config.yaml
- CHANGELOG.md
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pinocchio-conda:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }} with Conda
pinocchio-pixi:
name: ${{ matrix.os }} - Env ${{ matrix.environment }} ${{ matrix.build_type }} ${{ matrix.compiler }}
runs-on: ${{ matrix.os }}
env:
CCACHE_BASEDIR: ${GITHUB_WORKSPACE}
Expand All @@ -41,20 +43,32 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, macos-13]
environment: [all, all-py39]
build_type: [Release, Debug]
python-version: ['3.8', '3.12']

include:
# Disable BUILD_ADVANCED_TESTING as the test can take many time to run
- os: ubuntu-latest
BUILD_ADVANCED_TESTING: OFF
# Disable BUILD_ADVANCED_TESTING as the test can take many time to run
- os: macos-latest
BUILD_ADVANCED_TESTING: OFF
- os: macos-13
BUILD_ADVANCED_TESTING: OFF
- os: windows-latest
environment: all
build_type: Release
BUILD_ADVANCED_TESTING: OFF
- os: windows-latest
environment: all-clang-cl
build_type: Release
BUILD_ADVANCED_TESTING: OFF


steps:
# extract branch name or checkout devel branch for scheduled events
- name: Get branch name or checkout devel
shell: bash -el {0}
run: |
if [ "${{ github.event_name }}" == "schedule" ]; then
echo "BRANCH_NAME=devel" >> $GITHUB_ENV
Expand All @@ -71,18 +85,16 @@ jobs:
- uses: actions/cache@v4
with:
path: .ccache
save-always: true
key: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.python-version }}-${{ github.sha }}
restore-keys: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.python-version }}-

- uses: conda-incubator/setup-miniconda@v3
- uses: prefix-dev/setup-[email protected]
with:
activate-environment: pinocchio-linux
auto-update-conda: true
environment-file: .github/workflows/conda/environment_macos_linux.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
pixi-version: v0.33.0
cache: true
environments: ${{ matrix.environment }}

# Avoid filling all disk space with debug symbols
- name: Setup CMAKE_TOOLCHAIN_FILE
if: (contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')) && contains(matrix.build_type, 'Debug')
run: |
Expand All @@ -99,38 +111,31 @@ jobs:
await script({github, context, core})
result-encoding: string

- name: Build Pinocchio
- name: Build Pinocchio [MacOS/Linux/Windows]
shell: bash -el {0}
env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
PINOCCHIO_BUILD_TYPE: ${{ matrix.build_type }}
run: |
conda list
echo $CONDA_PREFIX
mkdir build
cd build
cmake .. \
-G "Ninja" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
# Launch configure but overwrite default options
pixi run -e ${{ matrix.environment }} configure \
-DBUILD_ADVANCED_TESTING=${{ env.BUILD_ADVANCED_TESTING }} \
${{ steps.get_labels.outputs.cmakeFlags }}
cmake --build . -j2
ctest --output-on-failure
cmake --install .
pixi run -e ${{ matrix.environment }} cmake --build build --target all
pixi run -e ${{ matrix.environment }} ctest --test-dir build --output-on-failure
pixi run -e ${{ matrix.environment }} cmake --install build
- name: Uninstall Pinocchio
shell: bash -el {0}
run: |
cd build
cmake --build . --target uninstall
cmake --build build --target uninstall
check:
if: always()
name: check-macos-linux-conda
name: check-macos-linux-windows-pixi

needs:
- pinocchio-conda
- pinocchio-pixi

runs-on: Ubuntu-latest

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ros-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- CITATION.*
- COPYING.LESSER
- .pre-commit-config.yaml
- CHANGELOG.md
pull_request:
paths-ignore:
- doc/**
Expand All @@ -23,6 +24,7 @@ on:
- CITATION.*
- COPYING.LESSER
- .pre-commit-config.yaml
- CHANGELOG.md
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
Loading

0 comments on commit 68166cc

Please sign in to comment.