Skip to content

Commit b8debe6

Browse files
authored
Merge pull request #75 from nim65s/gepetto-nix
Nix: update gepetto/nix use
2 parents 93f6fad + 6a181e3 commit b8debe6

File tree

3 files changed

+41
-30
lines changed

3 files changed

+41
-30
lines changed

.github/workflows/nix.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
11
name: "CI - Nix"
2-
32
on:
43
push:
54
branches:
65
- devel
76
- master
7+
- main
8+
- stable
89
pull_request:
910
branches:
1011
- devel
1112
- master
12-
13+
- main
14+
- stable
1315
jobs:
14-
tests:
15-
name: "Nix build on ${{ matrix.os }}"
16+
nix:
1617
runs-on: "${{ matrix.os }}-latest"
1718
strategy:
1819
matrix:
19-
os: [ubuntu]
20+
os: [ubuntu, macos]
2021
steps:
2122
- uses: actions/checkout@v4
2223
- uses: cachix/install-nix-action@v31
2324
- uses: cachix/cachix-action@v16
2425
with:
2526
name: gepetto
2627
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
27-
- run: nix build -L
28+
- run: nix flake check -L
29+
check:
30+
if: always()
31+
name: check-macos-linux-nix
32+
runs-on: ubuntu-latest
33+
needs:
34+
- nix
35+
steps:
36+
- uses: re-actors/alls-green@release/v1
37+
with:
38+
jobs: ${{ toJSON(needs) }}

.mergify.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
pull_request_rules:
2-
- name: merge automatically when CI passes and PR is approved
2+
- name: merge [bot] PRs when CI pass
33
conditions:
4-
- check-success = "gitlab-ci"
5-
- check-success = "Nix build on ubuntu"
4+
- check-success = "check-macos-linux-nix"
65
- check-success = "pre-commit.ci - pr"
76
- or:
8-
- author = dependabot[bot]
9-
- author = github-actions[bot]
10-
- author = hrp2-14
11-
- author = pre-commit-ci[bot]
7+
- author = dependabot[bot]
8+
- author = github-actions[bot]
9+
- author = hrp2-14
10+
- author = pre-commit-ci[bot]
1211
actions:
1312
merge:

flake.nix

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,33 @@
22
description = "Practicals for Humanoid Path Planner software";
33

44
inputs = {
5-
nixpkgs.url = "github:NixOS/nixpkgs/refs/pull/362956/head";
6-
flake-parts = {
7-
url = "github:hercules-ci/flake-parts";
8-
inputs.nixpkgs-lib.follows = "nixpkgs";
9-
};
5+
gepetto.url = "github:gepetto/nix";
6+
flake-parts.follows = "gepetto/flake-parts";
7+
nixpkgs.follows = "gepetto/nixpkgs";
8+
nix-ros-overlay.follows = "gepetto/nix-ros-overlay";
9+
systems.follows = "gepetto/systems";
10+
treefmt-nix.follows = "gepetto/treefmt-nix";
1011
};
1112

1213
outputs =
1314
inputs:
1415
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
15-
systems = [
16-
"x86_64-linux"
17-
"aarch64-linux"
18-
"aarch64-darwin"
19-
"x86_64-darwin"
20-
];
16+
systems = import inputs.systems;
17+
imports = [ inputs.gepetto.flakeModule ];
2118
perSystem =
22-
{ pkgs, self', ... }:
2319
{
24-
devShells.default = pkgs.mkShell { inputsFrom = [ self'.packages.default ]; };
20+
lib,
21+
pkgs,
22+
self',
23+
...
24+
}:
25+
{
2526
packages = {
2627
default = self'.packages.hpp-practicals;
27-
hpp-practicals = pkgs.python3Packages.hpp-practicals.overrideAttrs (_: {
28-
src = pkgs.lib.fileset.toSource {
28+
hpp-practicals = pkgs.python3Packages.hpp-practicals.overrideAttrs {
29+
src = lib.fileset.toSource {
2930
root = ./.;
30-
fileset = pkgs.lib.fileset.unions [
31+
fileset = lib.fileset.unions [
3132
./CMakeLists.txt
3233
./docker
3334
./instructions
@@ -41,7 +42,7 @@
4142
./urdf
4243
];
4344
};
44-
});
45+
};
4546
};
4647
};
4748
};

0 commit comments

Comments
 (0)