Skip to content

Commit

Permalink
Add github action for building r2r_minimal_node with colcon.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-dahl committed Dec 5, 2023
1 parent 27cc645 commit be617d1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/rust_and_ros2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,39 @@ jobs:
docs_no_ros:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: docker build . --file ./tests/Dockerfile_no_ros --tag r2r_no_ros
- run: docker run r2r_no_ros cargo build --features doc-only

minimal_workspace_humble:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout tools repo
uses: actions/checkout@v4
with:
repository: m-dahl/r2r_minimal_node
path: r2r_minimal_node
- run: docker build . --file ./tests/Dockerfile_humble --tag r2r_humble
- run: docker run r2r_humble /r2r/tests/build_minimal_node.bash

tests_humble:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: docker build . --file ./tests/Dockerfile_humble --tag r2r_humble
- run: docker run r2r_humble cargo test

tests_galactic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: docker build . --file ./tests/Dockerfile_galactic --tag r2r_galactic
- run: docker run r2r_galactic cargo test

tests_foxy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: docker build . --file ./tests/Dockerfile_foxy --tag r2r_foxy
- run: docker run r2r_foxy cargo test
18 changes: 18 additions & 0 deletions tests/build_minimal_node.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Use the local version of r2r when building the minimal node.
cat >> /r2r/r2r_minimal_node/r2r_minimal_node/Cargo.toml << EOF
[patch.crates-io]
r2r = { path = "../../r2r" }
[workspace]
EOF

# Overwrite r2r_cargo to make sure the version in the r2r repo is ok.
cp /r2r/r2r_cargo.cmake /r2r/r2r_minimal_node/r2r_minimal_node/

# Build using colcon.
cd /r2r/r2r_minimal_node
colcon build

0 comments on commit be617d1

Please sign in to comment.