From 5955787e1d082adece9bc44e446e284cf57ade41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Fri, 28 Jun 2024 13:00:02 +0200 Subject: [PATCH] Added CI Github action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- .github/workflows/basic-build-ci.yaml | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/basic-build-ci.yaml diff --git a/.github/workflows/basic-build-ci.yaml b/.github/workflows/basic-build-ci.yaml new file mode 100644 index 00000000..ced26fb0 --- /dev/null +++ b/.github/workflows/basic-build-ci.yaml @@ -0,0 +1,37 @@ +name: Basic Build Workflow + +on: + push: + branches: [rolling] + pull_request: + types: [opened, reopened, synchronize] + +jobs: + build-rolling: + runs-on: ubuntu-latest + strategy: + fail-fast: false + container: + image: osrf/ros2:testing + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Create Workspace + run: | + mkdir src_tmp + mv `find -maxdepth 1 -not -name . -not -name src_tmp` src_tmp/ + mv src_tmp/ src/ + - name: Install Prerequisites + run: | + bash -c 'source /opt/ros/$ROS_DISTRO/setup.bash; \ + apt-get update && apt-get upgrade -y && rosdep update; \ + rosdep install --from-paths src --ignore-src -y' + - name: Build Workspace + run: | + bash -c 'source /opt/ros/$ROS_DISTRO/setup.bash; \ + colcon build' + - name: Run Tests + run: | + bash -c 'source /opt/ros/$ROS_DISTRO/setup.bash; \ + colcon test; \ + colcon test-result --verbose'