Skip to content

Ubuntu [Focal, Jammy, Noble] #453

Ubuntu [Focal, Jammy, Noble]

Ubuntu [Focal, Jammy, Noble] #453

Workflow file for this run

name: Ubuntu
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '0 5 * * *'
release:
types:
- released
jobs:
ci:
name: ${{ matrix.distro }}
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
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker meta-information
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=false
prefix=
suffix=
tags: |
type=ref,event=branch,prefix=${{ matrix.distro }}-
type=semver,pattern={{major}}.{{minor}},prefix=${{ matrix.distro }}-
- name: Build repository
uses: 'tesseract-robotics/industrial_ci@2f4c8ab919f0aafddd514e586325defabd2911ea'
env:
DOCKER_IMAGE: ubuntu:${{ matrix.distro }}
ROS_DISTRO: false
PREFIX: ${{ github.repository }}_
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: 'apt remove *-dev -y -qq'
BEFORE_RUN_TARGET_TEST_EMBED: 'ici_with_unset_variables source $BASEDIR/${PREFIX}target_ws/install/setup.bash'
AFTER_RUN_TARGET_TEST: 'python3 -m pytest -v'
AFTER_SCRIPT: 'rm -rf $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' || github.ref_type == 'tag' }}
run: docker push ${{ steps.meta.outputs.tags }}