Skip to content

Commit ffe602c

Browse files
authored
Merge pull request #17 from jorisv/topic/python-310
Update pixi.toml
2 parents e139b3f + 7b98bd5 commit ffe602c

18 files changed

+7844
-1502
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
target-branch: devel
6+
schedule:
7+
interval: weekly

.github/workflows/macos-linux-windows-conda.yml renamed to .github/workflows/macos-linux-windows-pixi.yml

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: CI - MacOS/Linux/Windows via Pixi
22

33
on:
44
push:
5+
branches:
6+
- devel
57
paths-ignore:
68
- .gitignore
79
- '*.md'
@@ -19,67 +21,100 @@ concurrency:
1921

2022
jobs:
2123
loik-pixi:
22-
name: ${{ matrix.os }} - Env ${{ matrix.environment }} ${{ matrix.build_type }}
24+
name: Standard - ${{ matrix.os }} - Env ${{ matrix.environment }} ${{ matrix.build_type }}
2325
runs-on: ${{ matrix.os }}
2426
env:
2527
CCACHE_BASEDIR: ${GITHUB_WORKSPACE}
2628
CCACHE_DIR: ${GITHUB_WORKSPACE}/.ccache
2729
CCACHE_COMPRESS: true
2830
CCACHE_COMPRESSLEVEL: 6
31+
# Since pixi will install a compiler, the compiler mtime will be changed.
32+
# This can invalidate the cache (https://ccache.dev/manual/latest.html#config_compiler_check)
33+
CCACHE_COMPILERCHECK: content
2934

3035
strategy:
3136
fail-fast: false
3237
matrix:
3338
os: [ubuntu-latest, macos-latest, macos-15-intel]
34-
environment: [default]
39+
environment: [default, python-oldest]
3540
build_type: [Release, Debug]
3641

3742
include:
3843
- os: windows-latest
44+
build_type: Release
3945
environment: default
4046
- os: windows-latest
47+
build_type: Release
48+
environment: python-oldest
49+
- os: windows-latest
50+
build_type: Release
4151
environment: clang-cl
4252

4353
steps:
44-
- uses: actions/checkout@v4
54+
- uses: actions/checkout@v5
4555
with:
4656
submodules: recursive
4757

4858
- uses: actions/cache@v4
4959
with:
5060
path: .ccache
5161
key: ccache-macos-linux-windows-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.environment }}-${{ github.sha }}
52-
restore-keys: ccache-macos-linux-windows-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.environment }}}
62+
restore-keys: ccache-macos-linux-windows-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.environment }}-
5363

54-
- uses: prefix-dev/setup-pixi@v0.9.1
64+
- uses: prefix-dev/setup-pixi@v0.9.3
5565
with:
5666
cache: true
5767
environments: ${{ matrix.environment }}
5868

59-
- name: Build LoIK [MacOS/Linux]
60-
shell: pixi run bash -el {0}
61-
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
69+
- name: Clear ccache statistics [MacOS/Linux/Windows]
70+
run: |
71+
pixi run -e ${{ matrix.environment }} ccache -z
72+
73+
- name: Build LoIK [MacOS/Linux/Windows]
74+
shell: bash -el {0}
6275
env:
63-
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
76+
LOIK_BUILD_TYPE: ${{ matrix.build_type }}
6477
CMAKE_BUILD_PARALLEL_LEVEL: 4
6578
run: |
6679
pixi run -e ${{ matrix.environment }} test
6780
68-
- name: Build LoIK [Windows]
69-
shell: pixi run bash -el {0}
70-
if: contains(matrix.os, 'windows')
81+
- name: Display ccache statistics [MacOS/Linux/Windows]
82+
shell: bash -el {0}
83+
run: |
84+
pixi run -e ${{ matrix.environment }} ccache -sv
85+
86+
loik-pixi-build:
87+
name: Pixi build - ${{ matrix.os }}
88+
runs-on: ${{ matrix.os }}
89+
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
os: [ubuntu-latest, macos-latest, macos-15-intel, windows-latest]
94+
95+
steps:
96+
- uses: actions/checkout@v5
97+
with:
98+
submodules: recursive
99+
100+
- uses: prefix-dev/setup-pixi@v0.9.3
71101
env:
72-
CMAKE_BUILD_TYPE: Release
73102
CMAKE_BUILD_PARALLEL_LEVEL: 4
103+
with:
104+
cache: true
105+
environments: test-pixi-build
106+
107+
- name: Test package [MacOS/Linux/Windows]
74108
run: |
75-
pixi run -e ${{ matrix.environment }} test
109+
pixi run -e test-pixi-build test
76110
77111
check:
78112
if: always()
79113
name: check-macos-linux-windows-pixi
80114

81115
needs:
82116
- loik-pixi
117+
- loik-pixi-build
83118

84119
runs-on: Ubuntu-latest
85120

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI - Update Pixi lockfile
2+
permissions:
3+
contents: write
4+
pull-requests: write
5+
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: 0 5 1 * *
10+
11+
jobs:
12+
pixi-update:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/create-github-app-token@v2
17+
id: generate-token
18+
with:
19+
app-id: ${{ secrets.APP_ID }}
20+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
21+
22+
- uses: actions/checkout@v5
23+
with:
24+
token: ${{ steps.generate-token.outputs.token }}
25+
ref: devel
26+
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
27+
persist-credentials: false
28+
29+
- name: Set up pixi
30+
uses: prefix-dev/setup-pixi@v0.9.2
31+
with:
32+
run-install: false
33+
34+
- name: Update lockfile
35+
run: |
36+
set -o pipefail
37+
pixi update --json | pixi exec pixi-diff-to-markdown >> diff.md
38+
39+
- name: Create pull request
40+
uses: peter-evans/create-pull-request@v7
41+
with:
42+
token: ${{ steps.generate-token.outputs.token }}
43+
commit-message: 'pixi: Update pixi lockfile'
44+
title: Update pixi lockfile
45+
body-path: diff.md
46+
branch: topic/update-pixi
47+
base: devel
48+
labels: |
49+
pixi
50+
no changelog
51+
delete-branch: true
52+
add-paths: pixi.lock

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111
- Formating of the project
12+
- Python version update ([#17](https://github.com/Simple-Robotics/LoIK/pull/17)):
13+
- Project is now tested with Python 3.10 and 3.14
14+
- Python 3.10 is the minimal supported Python version
1215

1316
### Added
1417
- Add compatibility with jrl-cmakemodules workspace ([#2](https://github.com/Simple-Robotics/LoIK/pull/2))
18+
- Add pixi-build support ([#17](https://github.com/Simple-Robotics/LoIK/pull/17))
1519

1620
### Fixed
1721
- Remove CMake CMP0167 warnings ([#7](https://github.com/Simple-Robotics/LoIK/pull/7))
22+
- Remove pixi 0.57 warnings ([#17](https://github.com/Simple-Robotics/LoIK/pull/17))
1823

1924
## [1.0.0] - 2024-07-17
2025

CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (C) 2024 INRIA
33
#
44

5-
cmake_minimum_required(VERSION 3.16)
5+
cmake_minimum_required(VERSION 3.22)
66

77
set(PROJECT_NAME loik)
88
set(PROJECT_DESCRIPTION "Low-Order Inverse Kinematics")
@@ -56,9 +56,12 @@ set(DOXYGEN_USE_MATHJAX YES)
5656
set(DOXYGEN_USE_TEMPLATE_CSS YES)
5757

5858
# Use BoostConfig module distributed by boost library instead of using FindBoost module distributed
59-
# by CMake
60-
if(POLICY CMP0167)
61-
cmake_policy(SET CMP0167 NEW)
59+
# by CMake (to remove in 3.30). This policy is not working when using clang-cl.
60+
if(NOT WIN32 OR NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
61+
if(POLICY CMP0167)
62+
cmake_policy(SET CMP0167 NEW)
63+
set(CMAKE_POLICY_DEFAULT_CMP0167 NEW)
64+
endif()
6265
endif()
6366
include(${JRL_CMAKE_MODULES}/base.cmake)
6467
compute_project_args(PROJECT_ARGS LANGUAGES CXX)

cmake

Submodule cmake updated 436 files

development/release.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Release with Pixi
2+
3+
To create a release with Pixi run the following commands on the **devel** branch:
4+
5+
```bash
6+
LOIK_VERSION=X.Y.Z pixi run release-new-version
7+
git push origin
8+
git push origin vX.Y.Z
9+
```
10+
11+
Where `X.Y.Z` is the new version.
12+
Be careful to follow the [Semantic Versioning](https://semver.org/spec/v2.0.0.html) rules.
13+
14+
You will find the following assets:
15+
- `./build_new_version/loik-X.Y.Z.tar.gz`
16+
- `./build_new_version/loik-X.Y.Z.tar.gz.sig`
17+
18+
Then, create a new release on [GitHub](https://github.com/Simple-Robotics/LoIK/releases/new) with:
19+
20+
* Tag: vX.Y.Z
21+
* Title: LoIK X.Y.Z
22+
* Body:
23+
```
24+
## What's Changed
25+
26+
CHANGELOG CONTENT
27+
28+
**Full Changelog**: https://github.com/Simple-Robotics/LoIK/compare/vXX.YY.ZZ...vX.Y.Z
29+
```
30+
31+
Where `XX.YY.ZZ` is the last release version.
32+
33+
Then upload `loik-X.Y.Z.tar.gz` and `loik-X.Y.Z.tar.gz.sig` and publish the release.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:: Set default build value only if not previously set
2+
if not defined LOIK_BUILD_TYPE (set LOIK_BUILD_TYPE=Release)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#! /bin/bash
2+
# Remove flags setup from cxx-compiler
3+
unset CFLAGS
4+
unset CPPFLAGS
5+
unset CXXFLAGS
6+
unset DEBUG_CFLAGS
7+
unset DEBUG_CPPFLAGS
8+
unset DEBUG_CXXFLAGS
9+
unset LDFLAGS
10+
11+
if [[ $host_alias == *"apple"* ]];
12+
then
13+
# On OSX setting the rpath and -L it's important to use the conda libc++ instead of the system one.
14+
# If conda-forge use install_name_tool to package some libs, -headerpad_max_install_names is then mandatory
15+
export LDFLAGS="-Wl,-headerpad_max_install_names -Wl,-rpath,$CONDA_PREFIX/lib -L$CONDA_PREFIX/lib"
16+
elif [[ $host_alias == *"linux"* ]];
17+
then
18+
# On GNU/Linux, I don't know if these flags are mandatory with g++ but
19+
# it allow to use clang++ as compiler
20+
export LDFLAGS="-Wl,-rpath,$CONDA_PREFIX/lib -Wl,-rpath-link,$CONDA_PREFIX/lib -L$CONDA_PREFIX/lib"
21+
22+
# Conda compiler is named x86_64-conda-linux-gnu-c++, ccache can't resolve it
23+
# (https://ccache.dev/manual/latest.html#config_compiler_type)
24+
export CCACHE_COMPILERTYPE=gcc
25+
fi
26+
# Without -isystem, some LSP can't find headers
27+
export LOIK_CXX_FLAGS="$CXXFLAGS $LOIK_CXX_FLAGS -isystem $CONDA_PREFIX/include"
28+
29+
# Set default build value only if not previously set
30+
export LOIK_BUILD_TYPE=${LOIK_BUILD_TYPE:=Release}

include/loik/loik-loid-data-optimized.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <boost/fusion/algorithm.hpp>
2929
#include <boost/range/combine.hpp>
3030

31+
#include <iostream>
3132
#include <cstddef>
3233
#include <set>
3334

0 commit comments

Comments
 (0)