Skip to content

Package-Debian-Build #3

Package-Debian-Build

Package-Debian-Build #3

Workflow file for this run

name: Package-Debian-Build
on:
push:
tags:
- '*'
# allow manually starting this workflow
workflow_dispatch:
jobs:
get-tag:
# Pre-job to fetch the latest tag
runs-on: ubuntu-latest
outputs:
major: ${{ steps.extract_tag.outputs.major }}
minor: ${{ steps.extract_tag.outputs.minor }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure all history and tags are fetched
- name: Get latest tag
id: extract_tag
run: |
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Latest tag: $latest_tag"
# Extract major and minor version from the tag
IFS='.' read -r major minor patch <<< "$latest_tag"
echo "Major: $major"
echo "Minor: $minor"
# Set as output variables
echo "::set-output name=major::$major"
echo "::set-output name=minor::$minor"
Debian:
name: ${{ matrix.distro }}
needs: get-tag # Make sure the 'ci' job waits for the 'get-tag' job to finish
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro: [focal, jammy, noble]
container:
image: ghcr.io/tesseract-robotics/tesseract_planning:${{ matrix.distro }}-${{ needs.get-tag.outputs.major }}.${{ needs.get-tag.outputs.minor }}
env:
DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: target_ws/src
- name: Install Depends
shell: bash
run: |
apt update
apt upgrade -y
apt install -y wget
cd $GITHUB_WORKSPACE/target_ws/src
./.add-gazebo-ppa
- name: Install Depends (non-noble)
if: ${{ matrix.distro != 'noble' }}
shell: bash
run: |
apt install -y libgz-rendering7-dev libgz-common5-dev libgz-math7-dev
apt install -y qt-advanced-docking-system
- name: Install Depends (noble)
if: ${{ matrix.distro == 'noble' }}
shell: bash
run: |
apt install -y libgz-rendering8-dev libgz-common5-dev libgz-math7-dev
apt install -y libqt-advanced-docking-system-dev
- name: Build and test
uses: tesseract-robotics/colcon-action@v9
with:
before-script: source /opt/tesseract/install/setup.bash && source /opt/tesseract_planning/install/setup.bash
ccache-enabled: false
target-path: target_ws/src
target-args: --cmake-args -DCMAKE_BUILD_TYPE=Release -DTESSERACT_PACKAGE=ON
run-tests: false
- name: Create artifacts directory
run: |
mkdir $GITHUB_WORKSPACE/artifacts
- name: Package
working-directory: target_ws/build/tesseract_qt
shell: bash
run: |
cpack --config CPackConfig.cmake
cp ./*.deb $GITHUB_WORKSPACE/artifacts
cp ./*.tar.xz $GITHUB_WORKSPACE/artifacts
- uses: actions/upload-artifact@v4
with:
name: debian_package_${{ matrix.distro }}
path: ${{ github.workspace }}/artifacts/*.deb
- uses: actions/upload-artifact@v4
with:
name: archive_package_${{ matrix.distro }}
path: ${{ github.workspace }}/artifacts/*.tar.xz