Skip to content

Commit

Permalink
Merge pull request #57 from marrts/build-dockers
Browse files Browse the repository at this point in the history
Added commands in CI for building docker images when merged
  • Loading branch information
marip8 committed Jul 7, 2023
2 parents dd35d06 + 2fba5b5 commit aa9597e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 70 deletions.
62 changes: 0 additions & 62 deletions .github/workflows/jammy_build.yml

This file was deleted.

55 changes: 47 additions & 8 deletions .github/workflows/focal_build.yml → .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Focal-Build
name: Ubuntu

on:
push:
Expand All @@ -11,25 +11,31 @@ on:

jobs:
industrial_ci:
name: Foxy
runs-on: ubuntu-20.04
name: ${{ matrix.distro }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro: [foxy, humble, rolling]
env:
CI_NAME: Focal-Build
CI_NAME: ${{ matrix.distro }}-Build
OS_NAME: ubuntu
OS_CODE_NAME: focal
ROS_DISTRO: foxy
ROS_DISTRO: ${{ matrix.distro }}
ROS_REPO: main
BEFORE_INIT: './.add-gazebo-ppa'
UPSTREAM_WORKSPACE: 'dependencies_unstable.repos'
ROSDEP_SKIP_KEYS: "catkin taskflow fcl gz-common5 gz-math7 gz-rendering7"
ADDITIONAL_DEBS: "libgz-common5-dev libgz-math7-dev libgz-rendering7-dev"
DOCKER_IMAGE: "ros:foxy"
DOCKER_IMAGE: "ros:${{ matrix.distro }}"
PARALLEL_TESTS: false
NOT_TEST_BUILD: true
BEFORE_RUN_TARGET_TEST_EMBED: "source /root/target_ws/install/local_setup.bash"
CCACHE_DIR: "/home/runner/work/tesseract_ros2/tesseract_ros2/Focal-Build/.ccache"
CCACHE_DIR: "/home/runner/work/tesseract_ros2/tesseract_ros2/${{ matrix.distro }}-Build/.ccache"
UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release"
TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug"
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
PUSH_DOCKER_IMAGE: ${{ github.ref == 'refs/heads/master' || github.event_name == 'release' }}
steps:
- uses: actions/checkout@v1

Expand Down Expand Up @@ -58,5 +64,38 @@ jobs:
restore-keys: |
${{ env.CI_NAME }}-ccache-
- name: Login to Github container registry
uses: docker/login-action@v1
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=${{ env.ROS_DISTRO }}-
type=semver,pattern={{major}}.{{minor}},prefix=${{ env.ROS_DISTRO }}-
- name: Set build type
run: |
if [[ "${{ env.PUSH_DOCKER_IMAGE }}" = true ]]
then
echo "BUILD_TYPE=Release" >> $GITHUB_ENV
else
echo "BUILD_TYPE=Debug" >> $GITHUB_ENV
fi
- uses: 'ros-industrial/industrial_ci@master'
env: ${{env}}

- name: Push post-build Docker
if: ${{ env.PUSH_DOCKER_IMAGE == 'true' }}
run: docker push ${{ steps.meta.outputs.tags }}

0 comments on commit aa9597e

Please sign in to comment.