From 35cdd5a47084473bcc24e38657e15134206a3489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCnther?= Date: Tue, 9 Apr 2024 11:11:12 +0200 Subject: [PATCH 1/2] Add GitHub CI --- .github/workflows/github-actions.yml | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/github-actions.yml diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml new file mode 100644 index 0000000..330806f --- /dev/null +++ b/.github/workflows/github-actions.yml @@ -0,0 +1,42 @@ +name: Build and run ROS tests +on: [push, pull_request] +jobs: + build: + strategy: + matrix: + rosdistro: [noetic] + runs-on: ubuntu-latest + container: + image: ros:${{ matrix.rosdistro }}-ros-core + steps: + - name: Install apt dependencies + run: | + sudo apt-get update + sudo apt-get install -y build-essential clang-format-10 file git python3-catkin-lint python3-catkin-tools python3-pip python3-rosdep + - name: Install pip dependencies + run: pip install pre-commit + - name: Checkout repository + uses: actions/checkout@v3 + with: + path: src/grasplan + - name: Use rosdep to install remaining dependencies + run: | + sudo rosdep init + rosdep update + rosdep install --from-paths src -i -y --rosdistro ${{ matrix.rosdistro }} + - name: Build + run: | + . /opt/ros/${{ matrix.rosdistro }}/setup.sh + catkin init + catkin config -j 1 -p 1 + catkin build --limit-status-rate 0.1 --no-notify + catkin build --limit-status-rate 0.1 --no-notify --make-args tests + - name: Run tests + run: | + . devel/setup.sh + catkin run_tests + catkin_test_results + - name: Run pre-commit hooks + run: | + cd src/grasplan + pre-commit run -a From cdc622cea65960c8149665af03f810d1a35d1a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCnther?= Date: Tue, 9 Apr 2024 11:17:37 +0200 Subject: [PATCH 2/2] Update to actions/checkout@v4 ... to fix the following warning: Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/. --- .github/workflows/github-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 330806f..2b88183 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -16,7 +16,7 @@ jobs: - name: Install pip dependencies run: pip install pre-commit - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: src/grasplan - name: Use rosdep to install remaining dependencies