Skip to content

SDRangel Nightly Build #5

SDRangel Nightly Build

SDRangel Nightly Build #5

Workflow file for this run

name: SDRangel Nightly Build
on:
workflow_dispatch:
inputs:
arch:
description: 'Architecture to build'
required: true
default: 'all'
type: choice
options:
- all
- amd64
- arm64
# Uncomment to enable nightly schedule:
# schedule:
# - cron: '0 3 * * *'
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-24.04
qemu: false
timeout: 60
- arch: arm64
runner: ubuntu-24.04
qemu: true
docker_platform: linux/arm64
timeout: 360
runs-on: ${{ matrix.runner }}
timeout-minutes: ${{ matrix.timeout }}
steps:
# Skip matrix entries that don't match the selected architecture
- name: Check if this matrix entry should run
id: guard
run: |
if [[ "${{ github.event_name }}" == "schedule" || "${{ inputs.arch }}" == "all" || "${{ inputs.arch }}" == "${{ matrix.arch }}" ]]; then
echo "skip=false" >> "$GITHUB_OUTPUT"
else
echo "skip=true" >> "$GITHUB_OUTPUT"
fi
- uses: actions/checkout@v4
if: steps.guard.outputs.skip == 'false'
with:
submodules: true
fetch-depth: 0
- name: Get version info
if: steps.guard.outputs.skip == 'false'
id: version
run: |
VERSION=$(dpkg-parsechangelog -S Version | cut -d- -f1)
DATE=$(date -u +%Y%m%d)
SHA7=$(echo "${{ github.sha }}" | cut -c1-7)
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "date=${DATE}" >> "$GITHUB_OUTPUT"
echo "sha7=${SHA7}" >> "$GITHUB_OUTPUT"
echo "deb_name=sdrangel_${VERSION}-nightly-${DATE}-${SHA7}_ubuntu-24.04_${{ matrix.arch }}.deb" >> "$GITHUB_OUTPUT"
# ── Native amd64 build ──────────────────────────────────────────────
- name: Install dependencies (native)
if: ${{ !matrix.qemu && steps.guard.outputs.skip == 'false' }}
run: |
sudo apt-get update
sudo apt-get -y install build-essential cmake git xxd \
devscripts fakeroot debhelper libfftw3-dev qtbase5-dev libopengl-dev libqt5opengl5-dev \
qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins libqt5websockets5-dev \
libqt5quick5 qtwebengine5-dev qtbase5-private-dev \
qml-module-qtlocation qml-module-qtpositioning qml-module-qtquick-window2 qml-module-qtquick-dialogs \
qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtgraphicaleffects \
libqt5serialport5-dev qtdeclarative5-dev qtpositioning5-dev qtlocation5-dev \
libqt5charts5-dev libqt5texttospeech5-dev libqt5gamepad5-dev libqt5svg5-dev libfaad-dev libflac-dev zlib1g-dev \
libusb-1.0-0-dev libhidapi-dev libboost-all-dev libasound2-dev libopencv-dev libopencv-imgcodecs-dev \
libxml2-dev bison flex ffmpeg libpostproc-dev libavcodec-dev libavformat-dev \
libavdevice-dev libavfilter-dev libswscale-dev libswresample-dev \
libopus-dev libcodec2-dev libairspy-dev libairspyhf-dev libhackrf-dev \
librtlsdr-dev libbladerf-dev libsoapysdr-dev libiio-dev libuhd-dev libhamlib-dev libunwind-dev \
python3-mako python3-cheetah python3-numpy \
autoconf automake libtool ninja-build libavahi-client-dev libavahi-common-dev libaio-dev
- name: Build SDRplay (native)
if: ${{ !matrix.qemu && steps.guard.outputs.skip == 'false' }}
run: bash cmake/ci/build_sdrplay.sh
- name: Build external dependencies (native)
if: ${{ !matrix.qemu && steps.guard.outputs.skip == 'false' }}
run: bash cmake/ci/build_externals.sh
- name: Build .deb (native)
if: ${{ !matrix.qemu && steps.guard.outputs.skip == 'false' }}
run: debuild -i -us -uc -b
- name: Rename .deb (native)
if: ${{ !matrix.qemu && steps.guard.outputs.skip == 'false' }}
run: mv ../sdrangel_*_amd64.deb "${{ steps.version.outputs.deb_name }}"
# ── QEMU cross-architecture build ───────────────────────────────────
- name: Set up QEMU
if: ${{ matrix.qemu && steps.guard.outputs.skip == 'false' }}
uses: docker/setup-qemu-action@v3
- name: Build .deb (QEMU)
if: ${{ matrix.qemu && steps.guard.outputs.skip == 'false' }}
run: |
docker run --rm \
--platform ${{ matrix.docker_platform }} \
-v "${{ github.workspace }}:/src" \
-w /src \
-e ARCH="${{ matrix.arch }}" \
-e DEBIAN_FRONTEND=noninteractive \
ubuntu:24.04 bash -c '
set -e
apt-get update
apt-get -y install build-essential cmake git xxd \
devscripts fakeroot debhelper libfftw3-dev qtbase5-dev libopengl-dev libqt5opengl5-dev \
qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins libqt5websockets5-dev \
libqt5quick5 qtwebengine5-dev qtbase5-private-dev \
qml-module-qtlocation qml-module-qtpositioning qml-module-qtquick-window2 qml-module-qtquick-dialogs \
qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtgraphicaleffects \
libqt5serialport5-dev qtdeclarative5-dev qtpositioning5-dev qtlocation5-dev \
libqt5charts5-dev libqt5texttospeech5-dev libqt5gamepad5-dev libqt5svg5-dev libfaad-dev libflac-dev zlib1g-dev \
libusb-1.0-0-dev libhidapi-dev libboost-all-dev libasound2-dev libopencv-dev libopencv-imgcodecs-dev \
libxml2-dev bison flex ffmpeg libpostproc-dev libavcodec-dev libavformat-dev \
libavdevice-dev libavfilter-dev libswscale-dev libswresample-dev \
libopus-dev libcodec2-dev libairspy-dev libairspyhf-dev libhackrf-dev \
librtlsdr-dev libbladerf-dev libsoapysdr-dev libiio-dev libuhd-dev libhamlib-dev libunwind-dev \
python3-mako python3-cheetah python3-numpy \
autoconf automake libtool ninja-build libavahi-client-dev libavahi-common-dev libaio-dev
bash cmake/ci/build_sdrplay.sh
bash cmake/ci/build_externals.sh
debuild -i -us -uc -b
'
- name: Rename .deb (QEMU)
if: ${{ matrix.qemu && steps.guard.outputs.skip == 'false' }}
run: |
# debuild places the .deb one directory up from the source
mv ../sdrangel_*_${{ matrix.arch }}.deb "${{ steps.version.outputs.deb_name }}"
# ── Upload ──────────────────────────────────────────────────────────
- name: Upload artifact
if: steps.guard.outputs.skip == 'false'
uses: actions/upload-artifact@v4
with:
name: ${{ steps.version.outputs.deb_name }}
path: ${{ steps.version.outputs.deb_name }}