Skip to content

Commit

Permalink
Merge pull request #143 from Carter12s/add-iron-ci
Browse files Browse the repository at this point in the history
Add iron CI
  • Loading branch information
Carter12s authored Oct 24, 2023
2 parents 923a6a6 + 9254352 commit fe2827e
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 23 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/iron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Iron

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
HOME: /root
# Coupled with our use of the test_log crate this should give us good CI output on failure
RUST_LOG: debug

jobs:
humble:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container: carter12s/roslibrust-ci-iron:latest
timeout-minutes: 20
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Lint
run: source /root/.cargo/env; cargo fmt --all -- --check
- name: Build Main Lib
run: source /root/.cargo/env; cargo build
# This step is required to confirm feature combinations work, the main workspace build does all features
- name: Build Proc Macro
run: source /root/.cargo/env; cargo build -p roslibrust_codegen_macro
- name: Unit Tests
run: source /root/.cargo/env; cargo test
- name: Start rosbridge
run: source /opt/ros/iron/setup.bash; ros2 launch rosbridge_server rosbridge_websocket_launch.xml & disown; ros2 run rosapi rosapi_node & sleep 1
- name: Integration Tests
run: source /root/.cargo/env; cargo test --features ros2_test -- --test-threads 1
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Noetic](https://github.com/Carter12s/roslibrust/actions/workflows/noetic.yml/badge.svg)](https://github.com/Carter12s/roslibrust/actions/workflows/noetic.yml)
[![Galactic](https://github.com/Carter12s/roslibrust/actions/workflows/galactic.yml/badge.svg)](https://github.com/Carter12s/roslibrust/actions/workflows/galactic.yml)
[![Humble](https://github.com/Carter12s/roslibrust/actions/workflows/humble.yml/badge.svg)](https://github.com/Carter12s/roslibrust/actions/workflows/humble.yml)
[![Iron](https://github.com/Carter12s/roslibrust/actions/workflows/iron.yml/badge.svg)](https://github.com/Carter12s/roslibrust/actions/workflows/iron.yml)
[![License:MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

This package aims to provide a convenient intermediary between ROS1's rosbridge and Rust similar to roslibpy and roslibjs.
Expand Down
5 changes: 0 additions & 5 deletions docker/galactic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ LABEL maintainer="Carter Schultz <[email protected]>"
# Required by github CI for submodule support
RUN apt update && apt install -y git

# Adapted from https://github.com/JoaquinGimenez1/docker-noetic-rosbridge/blob/main/Dockerfile
RUN apt update && apt install -y ros-galactic-rosbridge-suite

# Curl required to install rust, build-essential required to build quote & proc-macro2
RUN apt update && apt install -y --fix-missing curl build-essential
# Install latest stable rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

# Update Cargo Registry
# See this for why we do it so wierd https://github.com/rust-lang/cargo/issues/3377
RUN /root/.cargo/bin/cargo install lazy_static; exit 0

WORKDIR /
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
Expand Down
5 changes: 0 additions & 5 deletions docker/humble/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ LABEL maintainer="Carter Schultz <[email protected]>"
# Required by github CI for submodule support
RUN apt update && apt install -y git

# Adapted from https://github.com/JoaquinGimenez1/docker-noetic-rosbridge/blob/main/Dockerfile
RUN apt update && apt install -y ros-humble-rosbridge-suite

# Curl required to install rust, build-essential required to build quote & proc-macro2
RUN apt update && apt install -y --fix-missing curl build-essential
# Install latest stable rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

# Update Cargo Registry
# See this for why we do it so wierd https://github.com/rust-lang/cargo/issues/3377
RUN /root/.cargo/bin/cargo install lazy_static; exit 0

WORKDIR /
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
Expand Down
10 changes: 5 additions & 5 deletions docker/humble/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Galactic CI Docker Image
Produces a docker image including both galactic rosbridge and needed rust.
# Humble CI Docker Image
Produces a docker image including both humble rosbridge and needed rust.

# Building / Publishing (currently only carter has access, need to fix)
- docker build -t carter12s/roslibrust-ci-galactic:latest .
- docker build -t carter12s/roslibrust-ci-humble:latest .
- Maybe needed: docker login
- docker push carter12s/roslibrust-ci-galactic:latest
- docker push carter12s/roslibrust-ci-humble:latest

For debug:
docker run -it carter12s/roslibrust-ci-galactic /bin/bash
docker run -it carter12s/roslibrust-ci-humble /bin/bash
17 changes: 17 additions & 0 deletions docker/iron/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ros:iron-ros-core
LABEL maintainer="Carter Schultz <[email protected]>"

# Required by github CI for submodule support
RUN apt update && apt install -y git

RUN apt update && apt install -y ros-iron-rosbridge-suite

# Curl required to install rust, build-essential required to build quote & proc-macro2
RUN apt update && apt install -y --fix-missing curl build-essential
# Install latest stable rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

WORKDIR /
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
10 changes: 10 additions & 0 deletions docker/iron/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Iron CI Docker Image
Produces a docker image including both iron rosbridge and needed rust.

# Building / Publishing (currently only carter has access, need to fix)
- docker build -t carter12s/roslibrust-ci-iron:latest .
- Maybe needed: docker login
- docker push carter12s/roslibrust-ci-iron:latest

For debug:
docker run -it carter12s/roslibrust-ci-iron /bin/bash
2 changes: 2 additions & 0 deletions docker/iron/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
exec "$@"
7 changes: 7 additions & 0 deletions docker/iron_compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: "3.9"
services:
rosbridge:
image: carter12s/roslibrust-ci-iron:latest
ports:
- "9090:9090"
command: bash -c "source /opt/ros/humble/setup.bash; ros2 launch rosbridge_server rosbridge_websocket_launch.xml & disown; ros2 run rosapi rosapi_node --ros-args --log-level debug"
4 changes: 0 additions & 4 deletions docker/noetic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ RUN apt update && apt install -y --fix-missing curl build-essential
# Install latest stable rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

# Update Cargo Registry
# See this for why we do it so wierd https://github.com/rust-lang/cargo/issues/3377
RUN /root/.cargo/bin/cargo install lazy_static; exit 0

WORKDIR /
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
Expand Down
4 changes: 0 additions & 4 deletions docker/noetic_cpp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ RUN apt update && apt install -y ros-noetic-ros-base
# Install latest stable rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

# Update Cargo Registry
# See this for why we do it so weird https://github.com/rust-lang/cargo/issues/3377
RUN /root/.cargo/bin/cargo install lazy_static; exit 0

WORKDIR /
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
Expand Down

0 comments on commit fe2827e

Please sign in to comment.