Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pixi support #240

Merged
merged 8 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
22 changes: 0 additions & 22 deletions .github/workflows/conda/conda-env.yml

This file was deleted.

109 changes: 0 additions & 109 deletions .github/workflows/macos-linux-conda.yml

This file was deleted.

83 changes: 83 additions & 0 deletions .github/workflows/macos-linux-pixi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CI - OSX/Linux via Pixi

on:
push:
paths-ignore:
- 'doc/**'
- 'scripts/**'
- '.gitlab-ci.yml'
- '.gitignore'
- '*.md'
- 'CHANGELOG.md'
- 'CITATION.cff'
- 'CITATIONS.bib'
pull_request:
paths-ignore:
- 'doc/'
- 'scripts/'
- '.gitlab-ci.yml'
- '.gitignore'
- '*.md'
- 'CHANGELOG.md'
- 'CITATION.cff'
- 'CITATIONS.bib'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
aligator-pixi:
name: ${{ matrix.os }} - Env ${{ matrix.environment }} ${{ matrix.build_type }}
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-13]
environment: [all, all-py39]
build_type: [Release, Debug]

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/cache@v4
with:
path: .ccache
key: ccache-macos-linux-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ github.sha }}
restore-keys: ccache-macos-linux-pixi-${{ matrix.os }}-${{ matrix.build_type }}-

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.34.0
cache: true
environments: ${{ matrix.environment }}

- name: Build aligator
shell: bash -l {0}
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
ALIGATOR_BUILD_TYPE: ${{ matrix.build_type }}
run: |
pixi run -e ${{ matrix.environment }} test

check:
if: always()
name: check-macos-linux-pixi

needs:
- aligator-pixi

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) }}
86 changes: 0 additions & 86 deletions .github/workflows/publish.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/update_pixi_lockfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI - Update Pixi lockfile
permissions:
contents: write
pull-requests: write

on:
workflow_dispatch:
schedule:
- cron: 0 5 1 * *

jobs:
pixi-update:
runs-on: ubuntu-latest

steps:
- uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
ref: devel
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false

- name: Set up pixi
uses: prefix-dev/[email protected]
with:
run-install: false

- name: Update lockfile
run: |
set -o pipefail
pixi update --json | pixi exec pixi-diff-to-markdown >> diff.md

- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: 'pixi: Update pixi lockfile'
title: Update pixi lockfile
body-path: diff.md
branch: topic/update-pixi
base: devel
labels: pixi
delete-branch: true
add-paths: pixi.lock
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
assets/
build*/
!build_scripts/
*.pyc
**/__pycache__
*.aux
*.log
.cache/

*.mp4

# pixi environments
.pixi
*.egg-info
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Add a multibody friction cone cost ([#234](https://github.com/Simple-Robotics/aligator/pull/234))
- Add a `GravityCompensationResidual`, modelling $r(x,u) = Bu - G(q)$ ([#235](https://github.com/Simple-Robotics/aligator/pull/235))
- Add Pixi support ([#240](https://github.com/Simple-Robotics/aligator/pull/240))

### Changed

Expand Down
Loading
Loading