Skip to content
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
5 changes: 5 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if command -v nix >/dev/null; then
use flake
fi

export PYTHONPATH="$PWD/build/binding/python/Python/sva:$PYTHONPATH"
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,13 @@ jobs:
slack-channel: '#ci'
slack-text: >
[SpaceVecAlg] Build *${{ matrix.os }}/${{ matrix.build-type }}* failed on ${{ github.ref }}
check:
if: always()
name: check-build
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
10 changes: 10 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,13 @@ jobs:
secrets:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
GH_TOKEN: ${{ secrets.GH_PAGES_TOKEN }}
check:
if: always()
name: check-package
runs-on: ubuntu-latest
needs:
- package
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
32 changes: 32 additions & 0 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: update-flake-lock
on:
workflow_dispatch:
schedule:
# runs at 2:00 AM on the 25th day of every month
- cron: '0 2 25 * *'
jobs:
update-flake-inputs:
runs-on: ubuntu-slim
permissions:
contents: write
pull-requests: write
steps:
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.MC_RTC_NIX_APP_ID }}
private-key: ${{ secrets.MC_RTC_NIX_APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ steps.app-token.outputs.token }}
- name: Setup Nix
uses: cachix/install-nix-action@v31
- name: Update flake inputs
uses: mic92/update-flake-inputs@v1
with:
github-token: ${{ steps.app-token.outputs.token }}
pr-labels: 'no-changelog'
git-author-name: 'arntanguy[bot]'
git-author-email: '67139+arntanguy@users.noreply.github.com'
27 changes: 27 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
pull_request_rules:
# automatically queues when a bot pr succeeds (see queue_rules)
- name: merge [bot] PRs when CI pass
conditions:
- or:
- author = dependabot[bot]
- author = gepetto-flake-updater[bot]
- author = mc-rtc-nixpkgs-flake-updater[bot]
- author = github-actions[bot]
- author = pre-commit-ci[bot]
actions:
queue:

# runs when commenting @mergifyio queue
- name: queue PRs with "queue" label when all CI checks pass
conditions:
- label = queued
actions:
queue:

# ensure that required CI jobs suceed
queue_rules:
- name: default
merge_conditions:
- check-success = "check-macos-linux-nix"
- check-success = "check-build"
- check-success = "check-package"
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,39 @@ All this implementation is based on appendix A of [Roy Featherstone Rigid Body D
Installing
------

## Ubuntu LTS (16.04, 18.04, 20.04, 22.04, 24.04)
## Nix

### Run

To get a python shell with SpaceVecAlg installed

```sh
nix run github:jrl-umi3218/SpaceVecAlg
```

Then
```python
import eigen
```

### Develop

To develop, use

```
gh repo clone jrl-umi3218/SpaceVecAlg
direnv allow # activates a nix develop environment and set the python path
cmake -B build $cmakeFlags
cmake --build build
```

Then
```python
import eigen
# latest bindings built from source
```

## Ubuntu LTS (22.04, 24.04, 26.04)

You must first setup our package mirror:

Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 3 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

inputs = {
mc-rtc-nix.url = "github:mc-rtc/nixpkgs";
# mc-rtc-nix.url = "path:/home/arnaud/devel/mc-rtc-nix/nixpkgs";
# mc-rtc-nix.url = "github:arntanguy/nixpkgs-1?ref=topic/flakoboros";
};

outputs =
Expand All @@ -13,14 +11,9 @@
{ lib, ... }:
{
extraPackages = [ "ninja" ];
overrideAttrs.spacevecalg =
{ drv-prev, ... }:
{
src = lib.cleanSource ./.;
cmakeFlags = drv-prev.cmakeFlags ++ [
"-DPYTHON_BINDINGS=OFF"
];
};
pyOverrideAttrs.spacevecalg = {
src = lib.cleanSource ./.;
};
}
);
}
Loading