-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add docker config * add github workflow * add badges * gitkeep meshes folder * remove publish
- Loading branch information
1 parent
cc6ffb8
commit 887c030
Showing
7 changed files
with
129 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ARG ROS_DISTRO="humble" | ||
FROM ros:${ROS_DISTRO} | ||
|
||
COPY . /ros2_dev/hk1d_ros2 | ||
|
||
RUN apt update && \ | ||
apt install autoconf libtool -y | ||
RUN mkdir ec_dev && cd ec_dev && \ | ||
git clone https://gitlab.com/etherlab.org/ethercat.git && \ | ||
cd ethercat && \ | ||
git checkout stable-1.5 && \ | ||
./bootstrap && \ | ||
./configure --prefix=/usr/local/etherlab --disable-kernel && \ | ||
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# hk1d ROS2 Docker Containers | ||
Provides a basic preconfigured docker container for development purposes. | ||
To use it, make sure you have [Docker](https://docs.docker.com/get-docker/) installed, then build and run the image : | ||
|
||
```shell | ||
$ docker build --tag hk1d_ros2:humble --file .docker/Dockerfile . | ||
$ docker run -it --privileged --network=host hk1d_ros2:humble | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
# Workflow files stored in the | ||
# default location of `.github/workflows` | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This is a format job. Pre-commit has a first-party GitHub action, so we use | ||
# that: https://github.com/pre-commit/action | ||
|
||
name: Format | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
pre-commit: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
- name: Install system hooks | ||
run: sudo apt install -qq clang-format-14 cppcheck | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files --hook-stage manual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
jobs: | ||
CI: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Prepare | ||
run: | | ||
mkdir -p ${{github.workspace}}/src | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: src/hk1d_ros2 | ||
|
||
- name: Build Docker Image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
tags: hk1d_ros2:humble | ||
file: .docker/Dockerfile | ||
push: false | ||
|
||
- name: Build | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: hk1d_ros2:humble | ||
options: -v ${{github.workspace}}/:/ros/ | ||
run: | | ||
cd /ros | ||
. /opt/ros/humble/setup.sh | ||
vcs import . < src/hk1d_ros2/hk1d_ros2.repos | ||
rosdep install --ignore-src --from-paths . -y -r && \ | ||
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release | ||
- name: Tests | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: hk1d_ros2:humble | ||
options: -v ${{github.workspace}}/:/ros/ | ||
run: | | ||
cd /ros | ||
. /opt/ros/humble/setup.sh | ||
vcs import . < src/hk1d_ros2/hk1d_ros2.repos | ||
rosdep install --ignore-src --from-paths . -y -r && \ | ||
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release | ||
colcon test | ||
colcon test-result | ||
# - name: Upload Tests to Artifacts | ||
# uses: actions/upload-artifact@v3 | ||
# if: always() | ||
# with: | ||
# name: test-results | ||
# path: build/*/test_results/*/*.xml | ||
|
||
# - name: Publish Unit Test Results | ||
# uses: EnricoMi/publish-unit-test-result-action@v2 | ||
# if: always() | ||
# with: | ||
# files: build/*/test_results/*/*.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.