-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add dockerfile * trim down zshrc * chenged docker file name * update readme * updated workflow for image pushing * readme update * rename tag * update dockerfile and action * change github branch to noetic * typo * add arm64 platform * try clang format * update for tag * remove additional gcc versions * sequential build * fix ifelse in dockerfile
- Loading branch information
Showing
23 changed files
with
564 additions
and
547 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 |
---|---|---|
|
@@ -5,14 +5,12 @@ on: | |
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- devel | ||
- noetic | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- main | ||
- devel | ||
- noetic | ||
|
||
jobs: | ||
|
||
|
@@ -35,6 +33,7 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-18.04, ubuntu-20.04] | ||
ROS_DISTRO: [melodic, noetic] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -75,48 +74,60 @@ jobs: | |
target-ros1-distro: noetic | ||
skip-tests: true | ||
|
||
|
||
ROS2-build: | ||
runs-on: ubuntu-20.04 | ||
docker-build: | ||
name: Build and Upload to Docker Hub | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ros_distribution: [foxy] | ||
|
||
fail-fast: false | ||
matrix: | ||
ROS_DISTRO: [noetic] | ||
env: | ||
PUSH: ${{ (github.event_name != 'pull_request') && (github.repository == 'luxonis/depthai-ros') && startsWith(github.ref, 'refs/tags/v') }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: ${{ matrix.ros_distribution }} build | ||
uses: ros-tooling/[email protected] | ||
with: | ||
required-ros-distributions: ${{ matrix.ros_distribution }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Installing libusb | ||
run: sudo apt-get install libusb-1.0-0-dev | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Installing DepthAi Core | ||
run: sudo wget -qO- https://raw.githubusercontent.com/luxonis/depthai-ros/$GITHUB_SHA/install_dependencies.sh | sudo bash | ||
|
||
- name: Build depthai-bridge ${{ matrix.ros_distribution }} | ||
uses: ros-tooling/[email protected] | ||
with: | ||
# vcs-repo-file-url: "${{ github.workspace }}/.github/workflows/examples.repos" | ||
# package-name: depthai_examples | ||
target-ros2-distro: ${{ matrix.ros_distribution }} | ||
skip-tests: true | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
if: env.PUSH == 'true' | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USER }} | ||
password: ${{ secrets.DOCKERHUB_PASS }} | ||
- name: Get Version | ||
if: env.PUSH == 'true' | ||
id: vars | ||
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/} | ||
|
||
- name: Build | ||
uses: docker/build-push-action@v3 | ||
if: env.PUSH == 'false' | ||
with: | ||
build-args: | | ||
ROS_DISTRO=${{ matrix.ROS_DISTRO }} | ||
USE_RVIZ=1 | ||
platforms: | | ||
amd64 | ||
arm64 | ||
no-cache: true | ||
|
||
# build_: | ||
# runs-on: ubuntu-18.04 | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: ros-tooling/[email protected] | ||
# with: | ||
# required-ros-distributions: melodic | ||
# - run: sudo wget -qO- https://raw.githubusercontent.com/luxonis/depthai-ros/noetic-devel/install_dependencies.sh | sudo bash | ||
# - uses: ros-tooling/[email protected] | ||
# with: | ||
# # vcs-repo-file-url: "${{ github.workspace }}/.github/workflows/examples.repos" | ||
# # package-name: depthai_examples | ||
# target-ros1-distro: melodic | ||
# skip-tests: true | ||
- name: Build and Push | ||
uses: docker/build-push-action@v3 | ||
if: env.PUSH == 'true' | ||
with: | ||
build-args: | | ||
ROS_DISTRO=${{ matrix.ROS_DISTRO }} | ||
USE_RVIZ=1 | ||
platforms: | | ||
amd64 | ||
arm64 | ||
push: ${{ env.PUSH }} | ||
no-cache: true | ||
tags: | | ||
luxonis/depthai-ros:${{ matrix.ROS_DISTRO }}-${{ steps.vars.outputs.short_ref }} | ||
luxonis/depthai-ros:${{ matrix.ROS_DISTRO }}-latest |
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 @@ | ||
export ZSH="$HOME/.oh-my-zsh" | ||
|
||
ZSH_THEME="robbyrussell" | ||
|
||
plugins=(git) | ||
|
||
source $ZSH/oh-my-zsh.sh | ||
|
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,21 @@ | ||
ARG ROS_DISTRO=noetic | ||
FROM ros:${ROS_DISTRO}-ros-base | ||
ARG USE_RVIZ | ||
ARG BUILD_SEQUENTIAL=0 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends software-properties-common git libusb-1.0-0-dev wget zsh python3-catkin-tools | ||
|
||
ENV DEBIAN_FRONTEND=dialog | ||
RUN sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" | ||
|
||
ENV WS=/ws | ||
RUN mkdir -p $WS/src | ||
COPY ./ .$WS/src/depthai_ros | ||
RUN cd .$WS/ && rosdep install --from-paths src --ignore-src -y | ||
RUN if [ "$BUILD_SEQUENTIAL" = "1" ] ; then cd .$WS/ && . /opt/ros/noetic/setup.sh && catkin build -p 1; else cd .$WS/ && . /opt/ros/noetic/setup.sh && catkin build; fi | ||
RUN if [ "$USE_RVIZ" = "1" ] ; then echo "RVIZ ENABLED" && sudo apt install -y ros-noetic-rviz ros-noetic-rviz-imu-plugin ; else echo "RVIZ NOT ENABLED"; fi | ||
RUN echo "if [ -f ${WS}/devel/setup.zsh ]; then source ${WS}/devel/setup.zsh; fi" >> $HOME/.zshrc | ||
RUN echo "if [ -f ${WS}/devel/setup.bash ]; then source ${WS}/devel/setup.bash; fi" >> $HOME/.bashrc | ||
ENTRYPOINT [ "/ws/src/depthai_ros/entrypoint.sh" ] | ||
CMD ["zsh"] |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.