Skip to content

Commit

Permalink
Consolidated regular Ubuntu jobs into single matrix job
Browse files Browse the repository at this point in the history
  • Loading branch information
marip8 committed Mar 9, 2023
1 parent 83a389d commit eac0580
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 115 deletions.
103 changes: 0 additions & 103 deletions .github/workflows/bionic_build.yml

This file was deleted.

31 changes: 19 additions & 12 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: Ubuntu Focal
name: Ubuntu

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
pull_request:
paths:
- 'tesseract**'
- '.github/workflows/focal_build.yml'
- '.github/workflows/ubuntu.yml'
- '**.repos'
schedule:
- cron: '0 5 * * *'
Expand All @@ -16,12 +16,19 @@ on:
- released

jobs:
industrial_ci:
name: Ubuntu Focal
ci:
name: Ubuntu
runs-on: ubuntu-latest
strategy:
matrix:
distro: [bionic, focal]
include:
- distro: bionic
image: ubuntu:18.04
- distro: focal
image: ubuntu:20.04
env:
CI_NAME: ubuntu-focal
CCACHE_DIR: "${{ github.workspace }}/${{ matrix.env.CI_NAME}}/.ccache"
CCACHE_DIR: "${{ github.workspace }}/${{ matrix.distro }}/.ccache"
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
PUSH_DOCKER_IMAGE: ${{ github.ref == 'refs/heads/master' || github.event_name == 'release' }}
Expand Down Expand Up @@ -49,10 +56,10 @@ jobs:
continue-on-error: true
uses: actions/cache@v1.1.0
with:
path: ${{ env.CI_NAME }}/.ccache
key: ${{ env.CI_NAME }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
path: ${{ matrix.distro }}/.ccache
key: ${{ matrix.distro }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
${{ env.CI_NAME }}-ccache-
${{ matrix.distro }}-ccache-
- name: Login to Github container registry
uses: docker/login-action@v1
Expand All @@ -71,8 +78,8 @@ jobs:
prefix=
suffix=
tags: |
type=ref,event=branch,prefix=${{ env.CI_NAME }}-
type=semver,pattern={{major}}.{{minor}},prefix=${{ env.CI_NAME }}-
type=ref,event=branch,prefix=${{ matrix.distro }}-
type=semver,pattern={{major}}.{{minor}},prefix=${{ matrix.distro }}-
- name: Set build type
run: |
Expand All @@ -86,7 +93,7 @@ jobs:
- name: Build repository
uses: 'marip8/industrial_ci@2f4c8ab919f0aafddd514e586325defabd2911ea'
env:
DOCKER_IMAGE: ubuntu:20.04
DOCKER_IMAGE: ${{ matrix.image }}
ROS_DISTRO: false
ADDITIONAL_DEBS: 'curl lsb-release liboctomap-dev'
AFTER_INIT: './.github/workflows/add_ros_apt_sources.sh'
Expand Down

0 comments on commit eac0580

Please sign in to comment.