-
Notifications
You must be signed in to change notification settings - Fork 123
81 lines (70 loc) · 2.74 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Linux build
on:
push:
branches:
- master
- next
- 'next*'
tags:
- 'v*'
jobs:
cmake:
name: Build with CMake
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- run: git fetch --prune --unshallow --tags
- name: Set environment variables
run: |
echo "ANDROID_NDK_MOUNT_DIR=${HOME}/android-ndk" >> $GITHUB_ENV
echo "LAST_COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "LAST_COMMIT_DATE=$(git log -1 --date=format:%Y%m%d --format=%cd)" >> $GITHUB_ENV
echo "[email protected]" >> $GITHUB_ENV
echo "DEBFULLNAME='Github Actions Android Builder for welle.io'" >> $GITHUB_ENV
echo "DATE=`date +%Y%m%d`" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Display environment variables
run: env | sort
# qt6-charts-dev is not available in ubuntu 22.04, neither Debian bullseye.
# So we use the packages from a newer repository
- name: "Add repo having qt6-charts-dev"
run: |
if ! dpkg-query -W qt6-charts-dev; then
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lunar main universe" -y
# Update packages list
sudo apt-get update -qq
fi
- name: Install build dependencies
run: |
set -x
sudo apt-get -y install build-essential cmake libairspy-dev libasound2-dev libfaad-dev libfftw3-dev libmp3lame-dev libmpg123-dev libpulse-dev libqt6opengl6-dev librtlsdr-dev libsoapysdr-dev qt6-base-dev qt6-charts-dev qt6-declarative-dev qt6-multimedia-dev
# Workarounds for packaging bugs
if dpkg --compare-versions $(dpkg-query -W qt6-charts-dev | cut -d " " -f 2) lt 6.4.2-3; then
sudo apt-get -y install qml6-module-qtcharts
fi
if dpkg --compare-versions $(dpkg-query -W qt6-multimedia-dev | cut -d " " -f 2) lt 6.4.2-5; then
sudo apt-get -y install qml6-module-qtquick3d-spatialaudio
fi
- name: Configure welle.io project
run: |
set -x
echo $PWD
mkdir -p build/install_root
cd build
cmake -DRTLSDR=1 -DSOAPYSDR=1 -DAIRSPY=1 -DCMAKE_INSTALL_PREFIX="$(realpath ./install_root)" ..
- name: Build
id: build
run: |
set -x
cd build
make
make install
ls -lR install_root
- 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