Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several changes for ros build farm compatibility #118

Merged
merged 4 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions .github/dependencies.repos
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,31 @@ repositories:
type: git
url: https://github.com/ToyotaResearchInstitute/ament_cmake_doxygen
version: main
pybind11:
maliput:
type: git
url: https://github.com/RobotLocomotion/pybind11.git
version: c39ede1eedd4f39aa167d7b30b53ae45967c39b7
url: https://github.com/maliput/maliput
version: main
maliput_drake:
type: git
url: https://github.com/maliput/maliput_drake
version: main
maliput_dragway:
type: git
url: https://github.com/maliput/maliput_dragway
version: main
maliput_malidrive:
type: git
url: https://github.com/maliput/maliput_malidrive
version: main
maliput_multilane:
type: git
url: https://github.com/maliput/maliput_multilane
version: main
maliput_object:
type: git
url: https://github.com/maliput/maliput_object
version: main
maliput_py:
type: git
url: https://github.com/maliput/maliput_py
version: main
106 changes: 10 additions & 96 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: gcc

on:
push:
pull_request:
branches:
- main
Expand All @@ -9,106 +10,19 @@ on:
env:
PACKAGE_NAME: maliput_integration
ROS_DISTRO: foxy
ROS_WS: maliput_ws

jobs:
compile_and_test:
name: Compile and test
runs-on: ubuntu-latest
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]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- uses: actions/checkout@v2
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 }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_malidrive
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_malidrive
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_dragway
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_dragway
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_multilane
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_multilane
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_object
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_object
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_drake
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_drake
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=ON -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;
- uses: actions/checkout@v3
- uses: ros-tooling/[email protected]
- uses: ros-tooling/[email protected]
id: action_ros_ci_step
with:
package-name: ${{ env.PACKAGE_NAME }}
target-ros2-distro: ${{ env.ROS_DISTRO }}
vcs-repo-file-url: ${GITHUB_WORKSPACE}/.github/dependencies.repos
57 changes: 7 additions & 50 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,59 +34,12 @@ jobs:
LDFLAGS: -fuse-ld=lld-8
steps:
# setup-ros first since it installs git, which is needed to fetch all branches from actions/checkout
- uses: ros-tooling/setup-ros@0.2.1
- uses: ros-tooling/setup-ros@v0.3
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- uses: actions/checkout@v2
- uses: actions/checkout@v3
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 }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_malidrive
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_malidrive
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_dragway
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_dragway
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_multilane
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_multilane
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_object
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_object
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_drake
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_drake
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/}} .
- name: clang 8 install
shell: bash
run: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }}/.github/clang_suite_installation.sh
Expand All @@ -95,6 +48,10 @@ jobs:
shell: bash
working-directory: ${{ env.ROS_WS }}
run: vcs import src < src/${PACKAGE_NAME}/.github/dependencies.repos
- 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/}} .
- run: colcon graph
shell: bash
working-directory: ${{ env.ROS_WS }}
Expand All @@ -103,7 +60,7 @@ jobs:
working-directory: ${{ env.ROS_WS }}
run: |
rosdep update --include-eol-distros;
rosdep install -i -y --rosdistro ${ROS_DISTRO} --skip-keys "pybind11" --from-paths src
rosdep install -i -y --rosdistro ${ROS_DISTRO} --from-paths src
- name: colcon build
shell: bash
working-directory: ${{ env.ROS_WS }}
Expand Down
57 changes: 7 additions & 50 deletions .github/workflows/scan_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,59 +23,12 @@ jobs:
LDFLAGS: -fuse-ld=lld-8
steps:
# setup-ros first since it installs git, which is needed to fetch all branches from actions/checkout
- uses: ros-tooling/setup-ros@0.2.1
- uses: ros-tooling/setup-ros@v0.3
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- uses: actions/checkout@v2
- uses: actions/checkout@v3
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 }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_malidrive
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_malidrive
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_dragway
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_dragway
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_multilane
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_multilane
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_object
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_object
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_drake
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/maliput_drake
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/}} .
- name: clang 8 install
shell: bash
run: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }}/.github/clang_suite_installation.sh
Expand All @@ -84,6 +37,10 @@ jobs:
shell: bash
working-directory: ${{ env.ROS_WS }}
run: vcs import src < src/${PACKAGE_NAME}/.github/dependencies.repos
- 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/}} .
- run: colcon graph
shell: bash
working-directory: ${{ env.ROS_WS }}
Expand All @@ -92,7 +49,7 @@ jobs:
working-directory: ${{ env.ROS_WS }}
run: |
rosdep update --include-eol-distros;
rosdep install -i -y --rosdistro ${ROS_DISTRO} --skip-keys "pybind11" --from-paths src
rosdep install -i -y --rosdistro ${ROS_DISTRO} --from-paths src
- name: colcon build up-to
shell: bash
working-directory: ${{ env.ROS_WS }}
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<build_depend>ament_cmake_doxygen</build_depend>
<doc_depend>ament_cmake_doxygen</doc_depend>

<depend>libgflags-dev</depend>
<depend>maliput</depend>
Expand Down
6 changes: 6 additions & 0 deletions src/applications/maliput_query.cc
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ class RoadNetworkQuery {
PrintQueryTime(duration.count());
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
/// Gets all right-of-way rules for the given `lane_s_range`.
void GetRightOfWay(const maliput::api::LaneSRange& lane_s_range) {
const auto start = std::chrono::high_resolution_clock::now();
Expand Down Expand Up @@ -517,6 +519,7 @@ class RoadNetworkQuery {
const std::chrono::duration<double> duration = (end - start);
PrintQueryTime(duration.count());
}
#pragma GCC diagnostic pop

/// Gets all discrete-value-rules rules for the given `lane_s_range`.
void GetDiscreteValueRule(const maliput::api::LaneSRange& lane_s_range) {
Expand Down Expand Up @@ -611,6 +614,8 @@ class RoadNetworkQuery {

const maliput::api::rules::Phase& phase = it->second;
(*out_) << "Right of way for " << phase_id.string() << ":" << std::endl;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
for (const auto& rule_id_to_rule_state_id : phase.rule_states()) {
const maliput::api::rules::RightOfWayRule rule = road_rule_book->GetRule(rule_id_to_rule_state_id.first);
const maliput::api::rules::RightOfWayRule::State& rule_state = rule.states().at(rule_id_to_rule_state_id.second);
Expand All @@ -620,6 +625,7 @@ class RoadNetworkQuery {
<< std::endl
<< std::endl;
}
#pragma GCC diagnostic pop
const auto end = std::chrono::high_resolution_clock::now();
const std::chrono::duration<double> duration = (end - start);
PrintQueryTime(duration.count());
Expand Down
6 changes: 6 additions & 0 deletions src/integration/tools.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ std::unique_ptr<api::RoadNetwork> CreateDragwayRoadNetwork(const DragwayBuildPro
std::unique_ptr<ManualPhaseProvider> phase_provider = std::make_unique<ManualPhaseProvider>();
std::unique_ptr<IntersectionBook> intersection_book = std::make_unique<IntersectionBook>(rg.get());

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
std::unique_ptr<ManualRightOfWayRuleStateProvider> right_of_way_rule_state_provider =
std::make_unique<ManualRightOfWayRuleStateProvider>();
#pragma GCC diagnostic pop
std::unique_ptr<ManualDiscreteValueRuleStateProvider> discrete_value_rule_state_provider =
std::make_unique<ManualDiscreteValueRuleStateProvider>(rulebook.get());
std::unique_ptr<ManualRangeValueRuleStateProvider> range_value_rule_state_provider =
Expand All @@ -139,8 +142,11 @@ std::unique_ptr<api::RoadNetwork> CreateMultilaneRoadNetwork(const MultilaneBuil
LoadIntersectionBookFromFile(yaml_file_path, *rulebook, *phase_ring_book, rg.get(), phase_provider.get());
std::unique_ptr<api::rules::RuleRegistry> rule_registry = std::make_unique<api::rules::RuleRegistry>();

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
std::unique_ptr<ManualRightOfWayRuleStateProvider> right_of_way_rule_state_provider =
std::make_unique<ManualRightOfWayRuleStateProvider>();
#pragma GCC diagnostic pop
std::unique_ptr<ManualDiscreteValueRuleStateProvider> discrete_value_rule_state_provider =
std::make_unique<ManualDiscreteValueRuleStateProvider>(rulebook.get());
std::unique_ptr<ManualRangeValueRuleStateProvider> range_value_rule_state_provider =
Expand Down