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
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"
39 changes: 39 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CI - Nix"
on:
push:
branches:
- devel
- master
- main
pull_request:
branches:
- devel
- master
- main
jobs:
nix:
runs-on: "${{ matrix.os }}-latest"
strategy:
fail-fast: false
matrix:
os: [ubuntu]
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
- uses: cachix/cachix-action@v17
with:
name: mc-rtc-nix
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: "ros,gepetto"
- run: nix flake check -L
- run: nix build -L
check:
if: always()
name: check-macos-linux-nix
runs-on: ubuntu-latest
needs:
- nix
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'
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build
build/
.direnv/
result
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "cmake"]
path = cmake
url = https://github.com/jrl-umi3218/jrl-cmakemodules.git
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"
merge_queue:
queue_controls_comment: false
40 changes: 40 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
ci:
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.26.1
hooks:
- id: gersemi
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.9
hooks:
- id: ruff-check
- id: ruff-format
- repo: https://github.com/pappasam/toml-sort
rev: v0.24.4
hooks:
- id: toml-sort-fix
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.2
hooks:
- id: clang-format
args:
- --style=Google
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
24 changes: 13 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.22)

set(PROJECT_NAME footsteps_planner_plugin)
set(PROJECT_DESCRIPTION "")
set(PROJECT_URL "")
set(PROJECT_VERSION 0.0.1)
set(PROJECT_USE_CMAKE_EXPORT FALSE)
set(CMAKE_CXX_STANDARD 11)
set(CXX_DISABLE_WERROR True)
set(CMAKE_CXX_STANDARD 17)

include(cmake/base.cmake)
include(cmake/get-jrl-cmakemodules.cmake)

project(${PROJECT_NAME} LANGUAGES CXX VERSION ${PROJECT_VERSION})
option(AUTOLOAD_${PROJECT_NAME}_PLUGIN "Automatically load ${PROJECT_NAME} plugin" OFF)
project(footsteps_planner_plugin
VERSION 0.0.1
LANGUAGES CXX
)
jrl_configure_defaults()

###########
# OPTIONS
###########
jrl_option(AUTOLOAD_${PROJECT_NAME}_PLUGIN "Automatically load ${PROJECT_NAME} plugin" OFF)

# Find mc_rtc if we are not building inside mc_rtc itself
if(NOT TARGET mc_rtc::mc_control)
Expand Down
1 change: 0 additions & 1 deletion cmake
Submodule cmake deleted from 929612
48 changes: 48 additions & 0 deletions cmake/get-jrl-cmakemodules.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Get jrl-cmakemodules package

# Upstream (https://github.com/jrl-umi3218/jrl-cmakemodules), the new v2 version
# is located in a subfolder, We need to set this variable to bypass the v1 and
# load the v2.
set(JRL_CMAKEMODULES_USE_V2
ON
CACHE BOOL "Use jrl-cmakemodules v2 on https://github.com/jrl-umi3218/jrl-cmakemodules")

# Option 1: pass -DJRL_CMAKEMODULES_SOURCE_DIR=... to cmake command line
if(JRL_CMAKEMODULES_SOURCE_DIR)
message(
STATUS
"JRL_CMAKEMODULES_SOURCE_DIR variable set, adding jrl-cmakemodules from source directory: ${JRL_CMAKEMODULES_SOURCE_DIR}"
)
add_subdirectory(${JRL_CMAKEMODULES_SOURCE_DIR} jrl-cmakemodules)
return()
endif()

# Option 2: use JRL_CMAKEMODULES_SOURCE_DIR environment variable (pixi might
# unset it, prefer option 1)
if(ENV{JRL_CMAKEMODULES_SOURCE_DIR})
message(
STATUS
"JRL_CMAKEMODULES_SOURCE_DIR environement variable set, adding jrl-cmakemodules from source directory: $ENV{JRL_CMAKEMODULES_SOURCE_DIR}"
)
add_subdirectory($ENV{JRL_CMAKEMODULES_SOURCE_DIR} jrl-cmakemodules)
return()
endif()

# Option 3: Try to look for the installed package
message(STATUS "Looking for jrl-cmakemodules (version: >=2.1.0) package...")
find_package(jrl-cmakemodules 2.1.0 CONFIG QUIET)

# If we have the package, we are done here.
if(jrl-cmakemodules_FOUND)
message(STATUS "Found jrl-cmakemodules (version: ${jrl-cmakemodules_VERSION}) package.")
return()
endif()

# Option 4: Fallback to FetchContent
message(STATUS "Fetching jrl-cmakemodules using FetchContent...")
include(FetchContent)
FetchContent_Declare(
jrl-cmakemodules
GIT_REPOSITORY https://github.com/jrl-umi3218/jrl-cmakemodules
GIT_TAG master)
FetchContent_MakeAvailable(jrl-cmakemodules)
Loading
Loading