Skip to content

Commit d033684

Browse files
authored
Merge pull request #427 from nim65s/eigen5
nix: add build with eigen 5, ref #426
2 parents 92970b5 + 26f4bff commit d033684

File tree

3 files changed

+92
-25
lines changed

3 files changed

+92
-25
lines changed

.github/workflows/nix.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,29 @@ jobs:
2121
with:
2222
name: gepetto
2323
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
24-
- run: nix build -L
24+
- run: nix build -L .#proxsuite
25+
26+
nix-eigen5:
27+
runs-on: "${{ matrix.os }}"
28+
strategy:
29+
matrix:
30+
os: ["ubuntu-24.04", "macos-15"]
31+
steps:
32+
- uses: actions/checkout@v5
33+
- uses: cachix/install-nix-action@v31
34+
- uses: cachix/cachix-action@v16
35+
with:
36+
name: gepetto
37+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
38+
- run: nix build -L .#proxsuite-eigen_5
2539

2640
check:
2741
if: always()
2842
name: check-macos-linux-nix
2943

3044
needs:
3145
- nix
46+
- nix-eigen5
3247

3348
runs-on: Ubuntu-latest
3449

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 67 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,16 @@
88

99
outputs =
1010
inputs:
11-
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
12-
systems = inputs.nixpkgs.lib.systems.flakeExposed;
13-
perSystem =
14-
{ pkgs, self', ... }:
15-
{
16-
apps.default = {
17-
type = "app";
18-
program = pkgs.python3.withPackages (_: [ self'.packages.default ]);
19-
};
20-
packages = {
21-
default = self'.packages.proxsuite;
22-
proxsuite = pkgs.python3Packages.proxsuite.overrideAttrs {
23-
src = pkgs.lib.fileset.toSource {
11+
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
12+
{ self, lib, ... }:
13+
{
14+
systems = inputs.nixpkgs.lib.systems.flakeExposed;
15+
flake.overlays = {
16+
default = final: prev: {
17+
proxsuite = prev.proxsuite.overrideAttrs {
18+
src = lib.fileset.toSource {
2419
root = ./.;
25-
fileset = pkgs.lib.fileset.unions [
20+
fileset = lib.fileset.unions [
2621
./benchmark
2722
./bindings
2823
./cmake-external
@@ -34,8 +29,65 @@
3429
./test
3530
];
3631
};
32+
postPatch = "";
33+
nativeCheckInputs = [
34+
final.ctestCheckHook
35+
];
36+
# ref. https://github.com/Simple-Robotics/proxsuite/issues/426
37+
preCheck = ''
38+
disabledTests+=(
39+
"ProxQP::dense: test primal infeasibility solving"
40+
"dense maros meszaros using the api"
41+
"sparse maros meszaros using the API"
42+
)
43+
'';
3744
};
3845
};
46+
eigen5 = final: prev: {
47+
eigen = prev.eigen.overrideAttrs (super: rec {
48+
version = "5.0.0";
49+
src = final.fetchFromGitLab {
50+
inherit (super.src) owner repo;
51+
tag = version;
52+
hash = "sha256-L1KUFZsaibC/FD6abTXrT3pvaFhbYnw+GaWsxM2gaxM=";
53+
};
54+
patches = [ ];
55+
postPatch = "";
56+
});
57+
};
3958
};
40-
};
59+
perSystem =
60+
{
61+
pkgs,
62+
pkgs-eigen_5,
63+
self',
64+
system,
65+
...
66+
}:
67+
{
68+
_module.args = {
69+
pkgs = import inputs.nixpkgs {
70+
inherit system;
71+
overlays = [ self.overlays.default ];
72+
};
73+
pkgs-eigen_5 = import inputs.nixpkgs {
74+
inherit system;
75+
overlays = [
76+
self.overlays.eigen5
77+
self.overlays.default
78+
];
79+
};
80+
};
81+
apps.default = {
82+
type = "app";
83+
program = pkgs.python3.withPackages (_: [ self'.packages.default ]);
84+
};
85+
packages = {
86+
default = self'.packages.proxsuite;
87+
proxsuite = pkgs.python3Packages.proxsuite;
88+
proxsuite-eigen_5 = pkgs-eigen_5.python3Packages.proxsuite;
89+
};
90+
};
91+
}
92+
);
4193
}

0 commit comments

Comments
 (0)