-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from Carter12s/add-iron-ci
Add iron CI
- Loading branch information
Showing
11 changed files
with
81 additions
and
23 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,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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
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 |
---|---|---|
|
@@ -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 | ||
|
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 |
---|---|---|
@@ -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 |
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,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"] |
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,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 |
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,2 @@ | ||
#!/bin/bash | ||
exec "$@" |
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,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" |
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