From 37c2452e6930b8da47a650f93d466c12744cf0b2 Mon Sep 17 00:00:00 2001 From: Dave Kroezen Date: Thu, 2 May 2024 15:13:33 +0200 Subject: [PATCH] Add github ci --- .github/workflows/industrial_ci_action.yml | 36 ++++++++++++++++++++++ .gitlab-ci.yml | 34 -------------------- penelope_aerospace_pl_msgs/package.xml | 1 + 3 files changed, 37 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/industrial_ci_action.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml new file mode 100644 index 0000000..9a3e28d --- /dev/null +++ b/.github/workflows/industrial_ci_action.yml @@ -0,0 +1,36 @@ +# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). +# For troubleshooting, see README (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) + +name: CI + +on: + push: + branches: [main] # when there is a pull request against main + pull_request: + branches: [main] # when there is a pull request against main + workflow_dispatch: # allow manually starting this workflow + +jobs: + industrial_ci: + name: ROS ${{ matrix.ROS_DISTRO }} (${{ matrix.ROS_REPO }}) + runs-on: ubuntu-latest + strategy: + matrix: + ROS_DISTRO: [humble] + ROS_REPO: [testing, main] + env: + CCACHE_DIR: "${{ github.workspace }}/.ccache" # directory for ccache (and how we enable ccache in industrial_ci) + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v2 # fetch/store the directory used by ccache before/after the ci run + with: + path: ${{ env.CCACHE_DIR }} + # This configuration will always create a new ccache cache starting off from the previous one (if any). + # In this simple version it will be shared between all builds of the same ROS_REPO and ROS_REPO + # and might need some fine-tuning to match the use case + key: ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}-${{github.run_id}} + restore-keys: | + ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}- + - uses: 'ros-industrial/industrial_ci@master' + env: + ROS_DISTRO: ${{ matrix.ROS_DISTRO }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 8eba663..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,34 +0,0 @@ -image: docker:git -services: - - docker:24.0.3-dind -variables: - DOCKER_TLS_CERTDIR: "/certs" - TMPDIR: "${CI_PROJECT_DIR}.tmp" - CCACHE_DIR: ${CI_PROJECT_DIR}/ccache - -cache: - key: "${CI_JOB_NAME}" # https://docs.gitlab.com/ee/ci/caching/#sharing-caches-across-different-branches - paths: - - ccache - -before_script: - - apk add --update bash coreutils tar - - git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci .industrial_ci -b master - # Inject the CI JOB token to allow us to download from our private repos in the .rosinstall file - # - sed -i 's|https://gitlab.tudelft.nl|https://gitlab-ci-token:'${CI_JOB_TOKEN}'@gitlab.tudelft.nl|g' ${CI_PROJECT_DIR}/.rosinstall - -foxy: - script: - .industrial_ci/gitlab.sh - variables: - ROS_DISTRO: foxy - DOCKER_IMAGE: "ros:foxy" - DOCKER_RUN_OPTS: '-v /etc/ssl/certs:/etc/ssl/certs:ro' - -humble: - script: - .industrial_ci/gitlab.sh - variables: - ROS_DISTRO: humble - DOCKER_IMAGE: "ros:humble" - DOCKER_RUN_OPTS: '-v /etc/ssl/certs:/etc/ssl/certs:ro' diff --git a/penelope_aerospace_pl_msgs/package.xml b/penelope_aerospace_pl_msgs/package.xml index de8b474..75d0d06 100644 --- a/penelope_aerospace_pl_msgs/package.xml +++ b/penelope_aerospace_pl_msgs/package.xml @@ -14,6 +14,7 @@ geometry_msgs sensor_msgs + shape_msgs trajectory_msgs rosidl_interface_packages