Skip to content

Commit

Permalink
Updated CI configuration to be ROS-independent
Browse files Browse the repository at this point in the history
  • Loading branch information
marip8 committed Jul 7, 2023
1 parent 71eccfc commit a780fbc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/add_ros_apt_sources.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/bash
sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -
apt update -qq
38 changes: 21 additions & 17 deletions .github/workflows/focal_noetic.yml → .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Focal Noetic
name: Ubuntu

on:
push:
Expand All @@ -13,17 +13,20 @@ on:
types:
- released

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
ROS_DISTRO: noetic
PREFIX: ${{ github.repository }}_

jobs:
ci:
name: ${{ matrix.distro }}
strategy:
fail-fast: false
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro: [focal, jammy]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
PREFIX: ${{ github.repository }}_
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -45,23 +48,24 @@ jobs:
prefix=
suffix=
tags: |
type=ref,event=branch,prefix=${{ env.ROS_DISTRO }}-
type=semver,pattern={{major}}.{{minor}},prefix=${{ env.ROS_DISTRO }}-
type=ref,event=branch,prefix=${{ matrix.distro }}-
type=semver,pattern={{major}}.{{minor}},prefix=${{ matrix.distro }}-
- name: Build repository
uses: 'ros-industrial/industrial_ci@master'
uses: 'tesseract-robotics/industrial_ci@2f4c8ab919f0aafddd514e586325defabd2911ea'
env:
CI_NAME: focal
OS_NAME: ubuntu
OS_CODE_NAME: focal
UPSTREAM_WORKSPACE: dependencies.repos
DOCKER_IMAGE: ubuntu:${{ matrix.distro }}
ROS_DISTRO: false
PREFIX: ${{ github.repository }}_
CMAKE_ARGS: '-DENABLE_TESTING=ON -DENABLE_RUN_TESTING=OFF'
DOCKER_IMAGE: 'ros:${{ env.ROS_DISTRO }}'
DOCKER_COMMIT: ${{ steps.meta.outputs.tags }}
UPSTREAM_WORKSPACE: dependencies.repos
ADDITIONAL_DEBS: 'curl lsb-release'
AFTER_INIT: './.github/workflows/add_ros_apt_sources.sh'
TARGET_CMAKE_ARGS: '-DENABLE_TESTING=ON -DENABLE_RUN_TESTING=OFF -DCMAKE_BUILD_TYPE=Release'
AFTER_INSTALL_TARGET_DEPENDENCIES: 'python3 -m pip install -r requirements.txt -qq'
BEFORE_RUN_TARGET_TEST_EMBED: 'ici_with_unset_variables source $BASEDIR/${PREFIX}target_ws/install/setup.bash'
AFTER_RUN_TARGET_TEST: 'rosenv python3 -m pytest -v'
AFTER_SCRIPT: 'rm -r $BASEDIR/${PREFIX}upstream_ws/build $BASEDIR/${PREFIX}target_ws/build'
DOCKER_COMMIT: ${{ steps.meta.outputs.tags }}

- name: Push post-build Docker
if: ${{ github.ref == 'refs/heads/master' || github.event_name == 'release' }}
Expand Down

0 comments on commit a780fbc

Please sign in to comment.