-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uses ros-action-ci in build.yaml workflow. (#67)
* Uses ros-action-ci in build.yaml workflow. * Modifies tests to use compile definitions. Signed-off-by: Franco Cipollone <[email protected]>
- Loading branch information
1 parent
9667048
commit 1645672
Showing
6 changed files
with
38 additions
and
121 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
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,6 +1,7 @@ | ||
name: gcc | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
|
@@ -9,7 +10,6 @@ on: | |
env: | ||
PACKAGE_NAME: maliput_dragway | ||
ROS_DISTRO: foxy | ||
ROS_WS: maliput_ws | ||
|
||
jobs: | ||
compile_and_test: | ||
|
@@ -18,86 +18,12 @@ jobs: | |
container: | ||
image: ubuntu:20.04 | ||
steps: | ||
# setup-ros first since it installs git, which is needed to fetch all branches from actions/checkout | ||
- uses: ros-tooling/[email protected] | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: ros-tooling/[email protected] | ||
- uses: ros-tooling/[email protected] | ||
id: action_ros_ci_step | ||
with: | ||
path: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }} | ||
# clone private dependencies | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ToyotaResearchInstitute/maliput | ||
fetch-depth: 0 | ||
path: ${{ env.ROS_WS }}/src/maliput | ||
token: ${{ secrets.MALIPUT_TOKEN }} | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ToyotaResearchInstitute/maliput_py | ||
fetch-depth: 0 | ||
path: ${{ env.ROS_WS }}/src/maliput_py | ||
token: ${{ secrets.MALIPUT_TOKEN }} | ||
- name: check if dependencies have a matching branch | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }}/src | ||
run: ./${PACKAGE_NAME}/.github/try_vcs_checkout ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} . | ||
# clone public dependencies | ||
- name: vcs import | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }} | ||
run: vcs import src < src/${PACKAGE_NAME}/.github/dependencies.repos | ||
- run: colcon graph | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }} | ||
- name: rosdep install | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }} | ||
run: | | ||
rosdep update --include-eol-distros; | ||
rosdep install -i -y --rosdistro ${ROS_DISTRO} --skip-keys "pybind11" --from-paths src | ||
# Build libraries. | ||
- name: colcon build libraries | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }} | ||
run: | | ||
. /opt/ros/${ROS_DISTRO}/setup.bash; | ||
colcon build --packages-up-to ${PACKAGE_NAME} \ | ||
--event-handlers=console_direct+ \ | ||
--cmake-args -DBUILD_TESTING=OFF -DBUILD_DOCS=OFF; | ||
# Build tests for current package. | ||
- name: colcon build tests | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }} | ||
run: | | ||
. /opt/ros/${ROS_DISTRO}/setup.bash; | ||
colcon build --packages-select ${PACKAGE_NAME} \ | ||
--event-handlers=console_direct+ \ | ||
--cmake-args -DBUILD_TESTING=ON -DBUILD_DOCS=OFF; | ||
# Test package. | ||
- name: colcon test | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }} | ||
run: | | ||
. /opt/ros/${ROS_DISTRO}/setup.bash; | ||
. install/setup.bash; | ||
colcon test --packages-select ${PACKAGE_NAME} --event-handlers=console_direct+; | ||
colcon test-result --verbose; | ||
# Build documentation. | ||
- name: colcon build doxygen documentation | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }} | ||
run: | | ||
. /opt/ros/${ROS_DISTRO}/setup.bash; | ||
colcon build --packages-up-to ${PACKAGE_NAME} \ | ||
--event-handlers=console_direct+ \ | ||
--cmake-args -DBUILD_TESTING=OFF -DBUILD_DOCS=ON; | ||
# Test doxygen documentation. | ||
- name: colcon test doxygen documentation | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }} | ||
run: | | ||
. /opt/ros/${ROS_DISTRO}/setup.bash; | ||
. install/setup.bash; | ||
colcon test --packages-select ${PACKAGE_NAME} \ | ||
--ctest-args ' -R' ' maliput_dragway_doxygen_warnings' \ | ||
--event-handlers=console_direct+; | ||
colcon test-result --verbose; | ||
package-name: ${{ env.PACKAGE_NAME }} | ||
target-ros2-distro: ${{ env.ROS_DISTRO }} | ||
vcs-repo-file-url: ${GITHUB_WORKSPACE}/.github/dependencies.repos | ||
rosdep-skip-keys: pybind11 |
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