Skip to content

Commit

Permalink
Merge pull request #22 from ichiro-its/20-source-build-result
Browse files Browse the repository at this point in the history
Add source install after build
  • Loading branch information
Nathan24zz authored Apr 7, 2021
2 parents 9411213 + c744de4 commit 51d9baf
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
name: Test ROS 2 CI
name: Workflows Test
on:
pull_request:
branches: [ master ]
branches: [ main ]
push:
branches: [ master ]
branches: [ main ]
jobs:
test:
workflows-test:
runs-on: ubuntu-latest
name: Test the ROS 2 CI
steps:
- name: Checking out
uses: actions/[email protected]
- name: Test the default configuration
- name: Testing the default configuration
uses: ./
- name: Test with different distribution
- name: Testing with different distribution
uses: ./
with:
ros2-distro: rolling
- name: Test with commands
- name: Testing with commands
uses: ./
with:
pre-install: FOO=fofofo
Expand All @@ -26,13 +25,13 @@ jobs:
post-build: cat ./LICENSE && cat ./README.md
pre-test: GOO=gogogo
post-test: test "${FOO}${GOO}" = 'fofofogogogo'
- name: Test with APT and pip install
- name: Testing with APT and pip install
uses: ./
with:
apt-packages: neofetch libopencv-dev
pip-packages: numpy matplotlib
post-install: neofetch && opencv_version && python3 -c 'import numpy; import matplotlib'
- name: Test with including external project
- name: Testing with including external project
uses: ./
with:
ros2-distro: foxy
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ROS 2 Continuous Integration

<a href="https://github.com/ichiro-its/ros2-ci/actions"><img alt="GitHub Actions status" src="https://github.com/ichiro-its/ros2-ci/actions/workflows/test-ros2-ci.yml/badge.svg"></a>
[![latest version](https://img.shields.io/github/v/release/ichiro-its/ros2-ci.svg)](https://github.com/ichiro-its/ros2-ci/releases/)
[![license](https://img.shields.io/github/license/ichiro-its/ros2-ci.svg)](./LICENSE)
[![workflows test status](https://github.com/ichiro-its/ros2-ci/actions/workflows/workflows-test.yml/badge.svg)](https://github.com/ichiro-its/ros2-ci/actions)

This action could be used as [a continuous integration (CI)](https://en.wikipedia.org/wiki/Continuous_integration) to build and test a [ROS 2](https://docs.ros.org/en/foxy/) project.

Expand All @@ -26,56 +28,55 @@ For more information, see [the action.yml](./action.yml) and [the GitHub Actions
### Default Usage

```yaml
name: ROS 2 CI
name: Build and Test
on:
pull_request:
branches: [ master ]
branches: [ main ]
push:
branches: [ master ]
branches: [ main ]
jobs:
build-and-test:
runs-on: ubuntu-latest
name: Build and test the project
steps:
- name: Checkout
- name: Checking out
uses: actions/[email protected]
- name: Build and test
uses: ichiro-its/[email protected].1
- name: Building and testing
uses: ichiro-its/[email protected].2
```
> This will be defaulted to use [ROS 2 Foxy Fitzroy](https://docs.ros.org/en/foxy/Releases/Release-Foxy-Fitzroy.html).
### Using Different ROS 2 Distributin
```yaml
- name: Build and test
uses: ichiro-its/[email protected].1
- name: Building and testing
uses: ichiro-its/[email protected].2
with:
ros2-distro: rolling
```
### Install Several Dependencies
```yaml
- name: Build and test
uses: ichiro-its/[email protected].1
- name: Building and testing
uses: ichiro-its/[email protected].2
with:
apt-packages: libssh-dev libopencv-dev
```
### Run Command During the Process
```yaml
- name: Build and test
uses: ichiro-its/[email protected].1
- name: Building and testing
uses: ichiro-its/[email protected].2
with:
post-test: ls .ws
```
### Include External Project
```yaml
- name: Build and test
uses: ichiro-its/[email protected].1
- name: Building and testing
uses: ichiro-its/[email protected].2
with:
apt-packages: git
pre-build: git clone https://github.com/ros2/examples /ws/examples
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'ROS 2 CI'
description: 'Continuous integration for ROS 2 project'
author: "Ichiro ITS"
branding:
icon: "box"
icon: "activity"
color: "gray-dark"
inputs:
ros2-distro:
Expand Down
2 changes: 2 additions & 0 deletions dind/ros2/entrypoint.bash
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ cd /ws && colcon build \
--event-handlers console_cohesion+ \
--cmake-args || exit $?

source install/setup.bash || exit $?

if [ ! -z "$POST_BUILD" ]; then
echo ''
echo '======== Running the post-build command ========'
Expand Down

0 comments on commit 51d9baf

Please sign in to comment.