9 hours on this bro finally works #1863
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: CI | |
| on: | |
| pull_request: | |
| branches: [master] | |
| types: [closed] | |
| push: | |
| branches-ignore: | |
| - master | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-22.04 | |
| container: robojackets/urc-baseimage:humble | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| path: colcon_ws/src/urc-software | |
| - name: Update Dependencies | |
| shell: bash | |
| run: | | |
| # ensure tools | |
| sudo apt-get update | |
| sudo apt-get install -y curl gnupg lsb-release ca-certificates | |
| # Remove any old ROS repo/key files that may be invalid | |
| sudo rm -f /etc/apt/sources.list.d/ros2.list | |
| sudo rm -f /usr/share/keyrings/ros-archive-keyring.gpg | |
| # (optional) try to remove old apt-key entry if present | |
| sudo apt-key del F42ED6FBAB17C654 || true | |
| # Install fresh ROS apt keyring and repository (signed-by) | |
| curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \ | |
| | sudo gpg --dearmor -o /usr/share/keyrings/ros-archive-keyring.gpg | |
| echo "deb [signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] https://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" \ | |
| | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | |
| # Update & upgrade now that key/repo are correct | |
| sudo apt-get update | |
| sudo apt-get --with-new-pkgs upgrade -y | |
| - name: Build | |
| shell: bash | |
| working-directory: colcon_ws | |
| run: | | |
| source /opt/ros/humble/setup.bash | |
| rosdep update | |
| rosdep install --from-paths src --ignore-src -r -y | |
| colcon build | |
| cpp_linting: | |
| name: C++ Linting | |
| runs-on: ubuntu-22.04 | |
| container: robojackets/urc-baseimage:humble | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Run Uncrustify | |
| shell: bash | |
| run: | | |
| source /opt/ros/humble/setup.bash | |
| touch external/AMENT_IGNORE | |
| ament_uncrustify -c ament_code_style.cfg | |
| python_linting: | |
| name: Python Linting | |
| runs-on: ubuntu-22.04 | |
| container: robojackets/urc-baseimage:humble | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Run flake8 | |
| shell: bash | |
| run: | | |
| source /opt/ros/humble/setup.bash | |
| ament_flake8 --exclude external | |
| build_linting: | |
| name: Build Linting | |
| runs-on: ubuntu-22.04 | |
| container: robojackets/urc-baseimage:humble | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Run xmllint | |
| shell: bash | |
| run: | | |
| source /opt/ros/humble/setup.bash | |
| ament_xmllint --exclude external | |
| - name: Run ament_lint_cmake | |
| shell: bash | |
| run: | | |
| source /opt/ros/humble/setup.bash | |
| touch external/AMENT_IGNORE | |
| ament_lint_cmake |