Compare commits

...

15 commits

Author SHA1 Message Date
Jacob Perron
d1071443ff
Update Autonomy Lab link
All checks were successful
Build and test / test (push) Successful in 1m59s
Package / package (map[dpkg:arm64 runs-on:debian-12-arm64]) (push) Successful in 5m44s
(cherry picked from commit 116be443e7970de1574b5dc5f91e414828854c08)
2025-06-06 23:03:42 +02:00
ac3968e055
ci: package: fix whitespace errors
Signed-off-by: Christoph Heiss <christoph.heiss@robo4you.at>
2025-06-06 23:01:25 +02:00
661fa82f6e
ci: also include Botball repo
All checks were successful
Build and test / test (push) Successful in 2m2s
Build and test / test (pull_request) Successful in 1m56s
2025-06-06 20:39:07 +02:00
6c8a7b3acc
ci: switch to forgejo actions
All checks were successful
Build and test / test (push) Successful in 2m2s
Package / package (map[dpkg:arm64 runs-on:debian-12-arm64]) (push) Successful in 5m41s
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2025-06-06 20:15:42 +02:00
f07973e426
Revert "ci: switch workflows to Default runner group"
This reverts commit 8df56b61ba.
2024-10-08 11:48:52 +02:00
8df56b61ba
ci: switch workflows to Default runner group
Signed-off-by: Christoph Heiss <christoph.heiss@robo4you.at>
2024-10-07 11:55:33 +02:00
f49a76c7e4
gitignore: add cmake/cpack output directories
Signed-off-by: Christoph Heiss <christoph.heiss@robo4you.at>
2024-09-26 09:21:10 +02:00
d07add7a91
chore: delete empty file
Signed-off-by: Christoph Heiss <christoph.heiss@robo4you.at>
2024-09-26 09:20:57 +02:00
d5885d4d39
Merge pull request #2 from F-WuTS/feature/ci-packing 2024-09-26 09:18:37 +02:00
Konstantin Lampalzer
5a591cfbba ci: remove Werror from entrypoint 2024-09-25 21:58:36 +02:00
Konstantin Lampalzer
e51895fa18 cmake: add default Werror, extract version only from GITHUB_REF if tag 2024-09-25 21:54:46 +02:00
Konstantin Lampalzer
3ac90c382e ci: change target-dir in comprep to debs/libcreate 2024-09-23 22:46:52 +02:00
Konstantin Lampalzer
78424d187c cmake: do not install to opt
Some checks failed
Package / package (linux/arm64/v8) (push) Failing after 46s
2024-09-23 21:13:21 +02:00
Konstantin Lampalzer
f3cafc241d ci: change from ubuntu base to debian base 2024-09-23 17:12:41 +02:00
Konstantin Lampalzer
52201a3932 ci: fix SSH_DEPLOY_KEY env var 2024-09-23 15:51:44 +02:00
12 changed files with 118 additions and 106 deletions

View 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}"

View 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 }}

View file

@ -1,39 +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
with:
source-directory: "output/"
target-directory: "debs/complib/"
destination-github-username: "F-WuTS"
destination-repository-name: "compREP"
target-branch: master

View file

@ -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
View file

@ -0,0 +1,3 @@
# CMake/CPack
build/
_packages/

View file

@ -2,6 +2,8 @@
# Setup #
#########
cmake_minimum_required(VERSION 3.25)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(Versioning)
@ -17,13 +19,12 @@ include(Versioning)
# target_link_libraries(... ${libcreate_LIBRARIES})
#
cmake_minimum_required(VERSION 3.28)
project(
libcreate
VERSION ${TAG_VERSION_MAJOR}.${TAG_VERSION_MINOR}.${TAG_VERSION_PATCH}
)
add_compile_options(-Wall -Wextra -Wpedantic)
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
set(PACKAGE_VERSION ${TAG_VERSION_MAJOR}.${TAG_VERSION_MINOR}.${TAG_VERSION_PATCH})

View file

@ -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 ##

View file

@ -1,14 +0,0 @@
FROM ubuntu:24.04
RUN apt update && \
apt install -y \
build-essential cmake git file \
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"]

View file

@ -1,10 +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

View file

@ -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/some")#/${CMAKE_PROJECT_VERSION}")
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
@ -40,11 +37,5 @@ set(
# package name for deb. If set, then instead of some-application-0.9.2-Linux.deb
# you'll get some-application_0.9.2_amd64.deb (note the underscores too)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
# that is if you want every group to have its own package,
# although the same will happen if this is not set (so it defaults to ONE_PER_GROUP)
# and CPACK_DEB_COMPONENT_INSTALL is set to YES
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)#ONE_PER_GROUP)
# without this you won't be able to pack only specified component
set(CPACK_DEB_COMPONENT_INSTALL YES)
include(CPack)

View file

@ -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()

View file