Skip to content

🛠️ Bump actions/upload-artifact from 5 to 6 #200

🛠️ Bump actions/upload-artifact from 5 to 6

🛠️ Bump actions/upload-artifact from 5 to 6 #200

Workflow file for this run

name: debian
on:
push:
branches:
- main
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
types: [opened, synchronize]
jobs:
debian-build:
runs-on: ubuntu-latest
container:
image: ${{ matrix.debian-distro }}
strategy:
fail-fast: false
matrix:
debian-distro:
- debian:bookworm
- debian:trixie
- ubuntu:24.04
steps:
- name: Sync repository
uses: actions/checkout@v6
- name: Define short Distribution name
id: dist_short
shell: bash
working-directory: ${{ github.workspace }}
run: |
SHORT="$(echo '${{ matrix.debian-distro }}' | cut -d':' -f2)"
echo "short_name=$SHORT" >> $GITHUB_OUTPUT
DISTNAME="$(echo '${{ matrix.debian-distro }}' | cut -d':' -f1)"
echo "dist_name=$DISTNAME" >> $GITHUB_OUTPUT
- name: install apt packages
shell: bash
run: |
apt update
apt install -y git qtbase5-dev libqt5svg5-dev libqt5websockets5-dev libqt5opengl5-dev libqt5x11extras5-dev libprotoc-dev libzmq3-dev ccache libmosquitto-dev ca-certificates lsb-release wget zsync
- name: Install Apache Arrow for Parquet support
shell: bash
run: |
apt update
apt install -y -V ca-certificates lsb-release wget
wget https://packages.apache.org/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
apt update
apt install -y -V libarrow-dev # For C++
apt install -y -V libparquet-dev # For Apache Parquet C++
- name: Prepare ccache
shell: bash
run: |
mkdir -p ${{ runner.temp }}/ccache/tmp
- name: Save ccache folder
uses: actions/cache@v5
with:
path: ${{ runner.temp }}/ccache
key: ${{ runner.os }}-${{ steps.dist_short.outputs.short_name }}
- name: Build Plotjuggler
shell: bash
working-directory: ${{ github.workspace }}
env:
CCACHE_DIR: ${{ runner.temp }}/ccache
run: |
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DPJ_INSTALLATION=${{ steps.dist_short.outputs.short_name }} \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build build
- name: Define version
id: define_version
shell: bash
working-directory: ${{ github.workspace }}
run: |
VERSION="0.0"
if [ '${{github.ref_type}}' == 'tag' ]; then
VERSION=${{github.ref_name}}
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Build debian package
shell: bash
working-directory: ${{ github.workspace }}
env:
CCACHE_DIR: ${{ runner.temp }}/ccache
run: |
mkdir plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64
cp -rp DEBIAN plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/
chmod ogu+x plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/DEBIAN/postinst
chmod ogu+x plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/DEBIAN/preinst
chmod ogu+x plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/DEBIAN/postrm
mv plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/DEBIAN/_control.'${{ steps.dist_short.outputs.short_name }}' plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/DEBIAN/control
rm plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/DEBIAN/_*
if [ '${{github.ref_type}}' == 'tag' ]; then
sed -i 's:0\.0:${{github.ref_name}}:g' plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/DEBIAN/control
fi
cat plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/DEBIAN/control
mkdir -p plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/usr/lib/plotjuggler
cp -p build/bin/* plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/usr/lib/plotjuggler/
mkdir -p plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/usr/bin
mkdir -p plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/usr/share/applications
cp PlotJuggler.desktop plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/usr/share/applications/
mkdir -p plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/usr/share/icons/hicolor/512x512/apps/
cp plotjuggler.png plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/usr/share/icons/hicolor/512x512/apps/
mkdir -p plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/usr/share/icons/hicolor/scalable/apps/
cp plotjuggler.svg plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64/usr/share/icons/hicolor/scalable/apps/
dpkg-deb --build ./plotjuggler_'${{ steps.define_version.outputs.version }}'_amd64
- name: Rename deb with distro suffix
run: mv plotjuggler_${{ steps.define_version.outputs.version }}_amd64.deb plotjuggler_${{ steps.define_version.outputs.version }}_amd64_${{ steps.dist_short.outputs.short_name }}.deb
- name: Upload deb
uses: actions/upload-artifact@v6
with:
name: plotjuggler_${{ steps.define_version.outputs.version }}_amd64_${{ steps.dist_short.outputs.short_name }}.deb
path: plotjuggler_${{ steps.define_version.outputs.version }}_amd64_${{ steps.dist_short.outputs.short_name }}.deb
- name: Upload to Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: plotjuggler_${{ steps.define_version.outputs.version }}_amd64_${{ steps.dist_short.outputs.short_name }}.deb
generate_release_notes: false
fail_on_unmatched_files: false