Compare commits
13 commits
Author | SHA1 | Date | |
---|---|---|---|
|
d1071443ff | ||
ac3968e055 | |||
661fa82f6e | |||
6c8a7b3acc | |||
f07973e426 | |||
8df56b61ba | |||
f49a76c7e4 | |||
d07add7a91 | |||
d5885d4d39 | |||
|
5a591cfbba | ||
|
e51895fa18 | ||
|
3ac90c382e | ||
|
78424d187c |
12 changed files with 179 additions and 124 deletions
76
.forgejo/workflows/package.yaml
Normal file
76
.forgejo/workflows/package.yaml
Normal file
|
@ -0,0 +1,76 @@
|
|||
---
|
||||
name: Package
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
package:
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
- dpkg: arm64
|
||||
runs-on: debian-12-arm64
|
||||
|
||||
runs-on: debian-12-arm64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt update
|
||||
apt install -y \
|
||||
build-essential cmake git libboost-system-dev libboost-thread-dev file libgtest-dev googletest
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: configure
|
||||
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCPACK_DEBIAN_PACKAGE_RELEASE=compair1
|
||||
|
||||
- name: build
|
||||
run: cmake --build build --config Release -j2
|
||||
|
||||
- name: test
|
||||
working-directory: build
|
||||
run: ctest -C Release
|
||||
|
||||
- name: build deb
|
||||
working-directory: build
|
||||
run: cpack --build . -G DEB
|
||||
|
||||
- name: get tag
|
||||
run: |
|
||||
echo "TAG=$(git describe --abbrev=0 --tags)-compair1" >>$GITHUB_ENV
|
||||
|
||||
# https://forgejo.org/docs/latest/user/packages/debian/#publish-a-package
|
||||
- name: push deb to apt repository
|
||||
env:
|
||||
REPO: ${{ github.repository }}
|
||||
run: |
|
||||
url="${GITHUB_SERVER_URL}/api/packages/${{ github.repository_owner }}/debian/pool/bookworm/compair/upload"
|
||||
urlBotball="${GITHUB_SERVER_URL}/api/packages/Botball/debian/pool/bookworm/wombatos/upload"
|
||||
|
||||
echo "api url: $url"
|
||||
debfile="_packages/libcreate_${TAG}_${{ matrix.platform.dpkg }}.deb"
|
||||
|
||||
echo "uploading file: $debfile"
|
||||
curl --fail-with-body \
|
||||
-X PUT \
|
||||
--user "oauth2:${{ secrets.PACKAGE_REGISTRY_TOKEN }}" \
|
||||
--upload-file "$debfile" \
|
||||
"$url"
|
||||
|
||||
echo "uploading file for WombatOs: $debfile"
|
||||
curl --fail-with-body \
|
||||
-X PUT \
|
||||
--user "oauth2:${{ secrets.PACKAGE_REGISTRY_TOKEN }}" \
|
||||
--upload-file "$debfile" \
|
||||
"$urlBotball"
|
||||
|
||||
echo "final url: ${GITHUB_SERVER_URL}/${{ github.repository_owner }}/-/packages/debian/libcreate/${TAG}"
|
||||
echo "final url for Botball: ${GITHUB_SERVER_URL}/Botball/-/packages/debian/libcreate/${TAG}"
|
34
.forgejo/workflows/test.yaml
Normal file
34
.forgejo/workflows/test.yaml
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
name: Build and test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: debian-12
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt update
|
||||
apt install -y \
|
||||
build-essential cmake git libboost-system-dev libboost-thread-dev file libgtest-dev googletest
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }}
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ github.workspace }}/build
|
||||
run: ctest -C ${{ env.BUILD_TYPE }}
|
41
.github/workflows/package.yaml
vendored
41
.github/workflows/package.yaml
vendored
|
@ -1,41 +0,0 @@
|
|||
name: Package
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
package:
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [linux/arm64/v8]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
|
||||
- name: Prepare container
|
||||
run: docker buildx build -f ci/Dockerfile . -t libcreate --platform ${{ matrix.platform }} --load
|
||||
- name: Build
|
||||
run: docker run --platform ${{ matrix.platform }} -v ./output:/libcreate/_packages libcreate
|
||||
- name: Push deb to compREP
|
||||
uses: cpina/github-action-push-to-another-repository@main
|
||||
env:
|
||||
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
||||
with:
|
||||
source-directory: "output/"
|
||||
target-directory: "debs/complib/"
|
||||
destination-github-username: "F-WuTS"
|
||||
destination-repository-name: "compREP"
|
||||
target-branch: master
|
30
.github/workflows/test.yaml
vendored
30
.github/workflows/test.yaml
vendored
|
@ -1,30 +0,0 @@
|
|||
name: Build and test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt install build-essential cmake git libboost-system-dev libboost-thread-dev file libgtest-dev googletest
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_FLAGS="-Werror"
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: ctest -C ${{env.BUILD_TYPE}}
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
# CMake/CPack
|
||||
build/
|
||||
_packages/
|
|
@ -15,7 +15,8 @@ include(Versioning)
|
|||
# After installation this project can be found by 'find_package' command:
|
||||
#
|
||||
# find_package(libcreate REQUIRED)
|
||||
# target_link_libraries(... libcreate)
|
||||
# include_directores(${libcreate_INCLUDE_DIRS})
|
||||
# target_link_libraries(... ${libcreate_LIBRARIES})
|
||||
#
|
||||
|
||||
project(
|
||||
|
@ -23,6 +24,8 @@ project(
|
|||
VERSION ${TAG_VERSION_MAJOR}.${TAG_VERSION_MINOR}.${TAG_VERSION_PATCH}
|
||||
)
|
||||
|
||||
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
|
||||
|
||||
set(PACKAGE_VERSION ${TAG_VERSION_MAJOR}.${TAG_VERSION_MINOR}.${TAG_VERSION_PATCH})
|
||||
|
||||
option(LIBCREATE_BUILD_TESTS "Enable the build of tests." ON)
|
||||
|
@ -57,8 +60,6 @@ add_library(${LIBRARY_NAME} SHARED
|
|||
src/types.cpp
|
||||
)
|
||||
|
||||
target_compile_options(${LIBRARY_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror)
|
||||
|
||||
# Manually link to thread library for build on ARM
|
||||
if(THREADS_HAVE_PTHREAD_ARG)
|
||||
set_property(TARGET ${LIBRARY_NAME} PROPERTY COMPILE_OPTIONS "-pthread")
|
||||
|
@ -99,10 +100,44 @@ endforeach()
|
|||
# Configuration #
|
||||
#################
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# set(CMAKE_INSTALL_PREFIX "/usr/") // complib needs this, riplib doesn't
|
||||
|
||||
# Install directories layout:
|
||||
# * <prefix>/lib/
|
||||
# * <prefix>/bin/
|
||||
# * <prefix>/include/
|
||||
# * <prefix>/lib/cmake/<PROJECT-NAME>
|
||||
# * <prefix>/share/<PROJECT_NAME>
|
||||
set(LIB_INSTALL_DIR "lib")
|
||||
set(BIN_INSTALL_DIR "bin")
|
||||
set(INCLUDE_INSTALL_DIR "include")
|
||||
set(CONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME}")
|
||||
set(SHARE_INSTALL_DIR "share/${PROJECT_NAME}")
|
||||
|
||||
set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
||||
set(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}-config-version.cmake")
|
||||
set(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}-config.cmake")
|
||||
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}-targets")
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
# Configure '<PROJECT-NAME>-config-version.cmake'
|
||||
write_basic_package_version_file(
|
||||
"${VERSION_CONFIG}"
|
||||
VERSION "${PACKAGE_VERSION}"
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
|
||||
# Configure '<PROJECT-NAME>-config.cmake'
|
||||
configure_package_config_file(
|
||||
"config.cmake.in"
|
||||
"${PROJECT_CONFIG}"
|
||||
INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}"
|
||||
PATH_VARS
|
||||
INCLUDE_INSTALL_DIR
|
||||
LIBRARY_NAME
|
||||
)
|
||||
|
||||
###########
|
||||
# Install #
|
||||
###########
|
||||
|
@ -110,25 +145,37 @@ include(GNUInstallDirs)
|
|||
# Install targets
|
||||
install(
|
||||
TARGETS ${LIBRARY_NAME}
|
||||
EXPORT ${LIBRARY_NAME}-config
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
|
||||
ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
|
||||
RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
|
||||
INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}"
|
||||
)
|
||||
|
||||
# Install headers
|
||||
install(
|
||||
DIRECTORY include/
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR}
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
|
||||
# Install config
|
||||
install(
|
||||
EXPORT ${LIBRARY_NAME}-config
|
||||
NAMESPACE create::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LIBRARY_NAME})
|
||||
FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}"
|
||||
DESTINATION "${CONFIG_INSTALL_DIR}"
|
||||
)
|
||||
|
||||
# Install headers
|
||||
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/${LIBRARY_NAME}/
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${LIBRARY_NAME})
|
||||
# Install targets
|
||||
install(
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
DESTINATION "${CONFIG_INSTALL_DIR}"
|
||||
)
|
||||
|
||||
# Install package.xml (for catkin)
|
||||
install(
|
||||
FILES package.xml
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}
|
||||
DESTINATION ${SHARE_INSTALL_DIR}
|
||||
)
|
||||
|
||||
###########
|
||||
|
|
|
@ -7,7 +7,7 @@ C++ library for interfacing with iRobot's Create 1 and 2 as well as most models
|
|||
- [`V_1`](https://drive.google.com/file/d/0B9O4b91VYXMdUHlqNklDU09NU0k/view?usp=sharing&resourcekey=0-KxMpRPBMsGAj7eSYC_9ewA) (Roomba 400 series )
|
||||
- [`V_2`](https://drive.google.com/file/d/0B9O4b91VYXMdMmFPMVNDUEZ6d0U/view?usp=sharing&resourcekey=0-bqKH8xhtWdYtTik_LLWo9Q) (Create 1, Roomba 500 series)
|
||||
- [`V_3`](https://drive.google.com/file/d/0B9O4b91VYXMdSVk4amw1N09mQ3c/view?usp=sharing&resourcekey=0-rKvug2IzC7nj4zV31EJtww) (Create 2, Roomba 600-800 series)
|
||||
* Author: [Jacob Perron](http://jacobperron.ca) ([Autonomy Lab](http://autonomylab.org), [Simon Fraser University](http://www.sfu.ca))
|
||||
* Author: [Jacob Perron](http://jacobperron.ca) ([Autonomy Lab](https://autonomy.cs.sfu.ca), [Simon Fraser University](http://www.sfu.ca))
|
||||
* Contributors: [Mani Monajjemi](http:mani.im), [Ben Wolsieffer](https://github.com/lopsided98), [Josh Gadeken](https://github.com/process1183)
|
||||
|
||||
## Build Status ##
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
FROM debian:bookworm
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y \
|
||||
build-essential cmake git file tree \
|
||||
libboost-system-dev libboost-thread-dev \
|
||||
libgtest-dev googletest && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /libcreate
|
||||
COPY . .
|
||||
|
||||
WORKDIR /libcreate/build
|
||||
ENTRYPOINT ["/bin/bash", "/libcreate/ci/entrypoint.sh"]
|
|
@ -1,15 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
cmake -B /libcreate/build -S /libcreate -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS='-Werror'
|
||||
cmake --build /libcreate/build --config Release
|
||||
ctest -C Release --output-on-failure
|
||||
cpack --build /libcreate/build -G DEB
|
||||
|
||||
debs=(/libcreate/_packages/*.deb)
|
||||
cp "${debs[0]}" /tmp/libcreate.deb
|
||||
dpkg-deb -R /tmp/libcreate.deb /tmp/libcreate
|
||||
tree /tmp/libcreate
|
|
@ -13,9 +13,6 @@ set(CPACK_VERBATIM_VARIABLES YES)
|
|||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
|
||||
SET(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_SOURCE_DIR}/_packages")
|
||||
|
||||
# https://unix.stackexchange.com/a/11552/254512
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/${CPACK_PACKAGE_NAME}")
|
||||
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
||||
|
@ -41,6 +38,4 @@ set(
|
|||
# you'll get some-application_0.9.2_amd64.deb (note the underscores too)
|
||||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
||||
|
||||
message(STATUS "Components to pack: ${CPACK_COMPONENTS_ALL}")
|
||||
|
||||
include(CPack)
|
|
@ -8,7 +8,7 @@ if(GIT_EXECUTABLE)
|
|||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if(DEFINED ENV{GITHUB_REF})
|
||||
if(DEFINED ENV{GITHUB_REF} AND ENV{GITHUB_REF_TYPE} EQUAL "tag")
|
||||
set(TAG_VERSION $ENV{GITHUB_REF})
|
||||
message(STATUS "Extracted version from GITHUB_REF")
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue