Skip to content

Update linux.yml

Update linux.yml #16

Workflow file for this run

name: Linux build
on:
push:
branches:
- master
- next
- 'next*'
tags:
- 'v*'
jobs:
qtbuild:
name: Build with Qt
runs-on: ubuntu-22.04
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.7.2'
modules: 'qtcharts qtmultimedia'
- name: Checkout
uses: actions/checkout@v3
- run: git fetch --prune --unshallow --tags
- name: Set environment variables
run: |
echo "DATE=`date +%Y%m%d`" >> $GITHUB_ENV
echo "GIT_HASH=`git rev-parse --short HEAD`" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Display environment variables
run: env | sort
- name: Install build dependencies
run: |
set -x
sudo apt-get -y install build-essential libfaad-dev libmpg123-dev libfftw3-dev librtlsdr-dev libusb-1.0-0-dev mesa-common-dev libglu1-mesa-dev libpulse-dev libsoapysdr-dev libairspy-dev libmp3lame-dev libflac++-dev
- name: Build
id: build
run: |
mkdir build
cd build
qmake PREFIX=/usr ..
make
cd ..
echo $PWD
- name: Prepare welle-cli AppImage
id: prepare_app_image
run: |
find build/
mkdir -p ./appdir/usr/share/applications
cp welle-io.desktop ./appdir/usr/share/applications
mkdir -p ./appdir/usr/bin
cp build/src/welle-gui/welle-io ./appdir/usr/bin
mkdir -p ./appdir/usr/lib
mkdir -p ./appdir/usr/share/icons/hicolor/512x512/apps/
cp src/welle-gui/icons/icon.png appdir/usr/share/icons/hicolor/512x512/apps/welle-io.png
- name: Create AppImage
id: create_appimage
run: |
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
chmod +x appimagetool-*.AppImage
./appimagetool-*.AppImage -s deploy ./appdir/usr/share/applications/*.desktop # Bundle EVERYTHING
VERSION=1.0 ./appimagetool-*.AppImage ./appdir # turn AppDir into AppImage
- name: Archive artifacts (welle.io build dir)
if: always() && steps.build.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: welle.io build dir
path: build/*
if-no-files-found: error