Add Dockerfile to build a UPF4ROS2 container #71
This file contains hidden or 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
| name: main | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| env: | |
| up_tamer_commit: "869e7ab06cf23c5541a47f46209159fd51d8021f" | |
| up_pyperplan_commit: "ac2b04d2d41c20b15f7c4143c19947f9704d1888" | |
| up_fast_downward_commit: "eb1f0d801e140fffbdd6c1eb2b13e483299ab240" | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up ROS 2 sources and key | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y curl gnupg lsb-release | |
| sudo curl -fsSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key | \ | |
| gpg --dearmor | sudo tee /usr/share/keyrings/ros-archive-keyring.gpg > /dev/null | |
| echo "deb [arch=amd64 signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | \ | |
| sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | |
| sudo apt-get update | |
| - name: Install missing dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libunwind-dev | |
| - name: Install ROS 2 Humble and tools | |
| run: | | |
| sudo apt install -y ros-humble-desktop \ | |
| ros-humble-behaviortree-cpp-v3 \ | |
| ros-humble-test-msgs \ | |
| ros-humble-qt-gui-cpp \ | |
| ros-humble-rqt-gui-cpp \ | |
| ros-humble-navigation2 \ | |
| ros-humble-nav2-bringup \ | |
| python3-colcon-common-extensions \ | |
| python3-vcstool python3-pytest python3-colcon-coveragepy-result libfl-dev | |
| - name: Install deps | |
| run: sudo apt-get update && sudo apt-get install -y wget python3-vcstool python3-pytest python3-colcon-coveragepy-result libfl-dev pip && pip install ConfigSpace && pip install typing_extensions==4.7.1 --upgrade | |
| - name: fix pytest name | |
| run: sudo ln -s /usr/bin/pytest-3 /usr/bin/pytest | |
| - name: Install unified planning from sources | |
| run: | | |
| git clone https://github.com/aiplan4eu/unified-planning.git | |
| cd unified-planning | |
| python3 -m pip install -r requirements.txt | |
| python3 -m pip install -r dev-requirements.txt | |
| python3 -m pip install tarski[arithmetic] | |
| sudo apt install -y gringo | |
| python3 -m pip install black==22.6.0 | |
| python3 -m black --check --exclude=unified_planning/grpc/generated/ . | |
| python3 -m mypy unified_planning | |
| python3 scripts/test_imports.py | |
| cd .. | |
| git clone https://github.com/aiplan4eu/up-tamer | |
| python3 -m pip install up-tamer/ | |
| git clone https://github.com/aiplan4eu/up-pyperplan | |
| python3 -m pip install up-pyperplan/ | |
| pip install unified_planning[tamer] | |
| - name: Create custom repos | |
| run: cp upf.repos /tmp/all.repos | |
| - name: Initialize rosdep | |
| run: | | |
| sudo apt install -y python3-rosdep | |
| sudo rosdep init || true | |
| rosdep update | |
| - name: build and test | |
| uses: ros-tooling/action-ros-ci@0.3.15 | |
| with: | |
| package-name: upf4ros2 upf_msgs | |
| target-ros2-distro: humble | |
| vcs-repo-file-url: /tmp/all.repos | |
| colcon-defaults: | | |
| { | |
| "test": { | |
| "parallel-workers" : 4 | |
| } | |
| } | |
| colcon-extra-args: "--return-code-on-test-failure" | |
| colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/main/index.yaml | |
| - name: Codecov | |
| uses: codecov/codecov-action@v1.2.1 | |
| with: | |
| file: ros_ws/lcov/total_coverage.info | |
| flags: unittests | |
| name: codecov-umbrella | |
| # yml: ./codecov.yml | |
| fail_ci_if_error: false |