-
Notifications
You must be signed in to change notification settings - Fork 47
184 lines (166 loc) · 5.65 KB
/
main.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: Build
on: [push, pull_request]
env:
# CMake flags used for default builds -- can be overridden by matrix.flags
FLAGS: >
-DWITH_QT5=ON
-DWITH_AKONADI=ON
-DWITH_ALSA=ON
-DWITH_DIAMONDCARD=ON
-DWITH_GSM=ON
-DWITH_SPEEX=ON
-DWITH_ZRTP=OFF
# Essential packages required by all builds
PACKAGES_REQUIRED: >
bison
cmake
flex
libccrtp-dev
libmagic-dev
libreadline-dev
libsndfile1-dev
libucommon-dev
libxml2-dev
linux-libc-dev
# Additional packages required by default builds -- can be overridden by
# matrix.packages
# (gettext is explitly added due to LP #1932371)
PACKAGES: >
gettext
libasound2-dev
libgsm1-dev
libkf5akonadi-dev
libkf5contacts-dev
libspeex-dev
libspeexdsp-dev
qtdeclarative5-dev
qttools5-dev
jobs:
build:
# Job name, including description and compiler if applicable
name: >
${{ format('Build {0} {1}',
((matrix.descr && format('({0})', matrix.descr)) || ''),
((matrix.gcc && format('[GCC {0}]', matrix.gcc)) ||
(matrix.clang && format('[Clang {0}]', matrix.clang)) || '')
) }}
# ' # Patch around Vim syntax bug
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
matrix:
include:
# Test building with GCC and Clang (current default version)
- gcc: default
- clang: default
# Test some other GCC/Clang versions, namely the lowest and highest
# available at the moment, making sure to include at least one for
# each Ubuntu release provided by GitHub Actions.
- gcc: 7
os: ubuntu-20.04
- gcc: 12
os: ubuntu-22.04
- clang: 6.0
os: ubuntu-20.04
- clang: 15
os: ubuntu-22.04
# Test with all options disabled
- descr: 'All options disabled'
flags: >
-DWITH_QT5=OFF
-DWITH_ALSA=OFF
-DWITH_GSM=OFF
-DWITH_SPEEX=OFF
-DWITH_ZRTP=OFF
# The empty string would evaluate to false and fail to override
# $PACKAGES, so we use this true-but-still-empty hack instead.
packages: ' '
# Test with Qt enabled and Akonadi disabled
- descr: 'w/o Akonadi'
flags: >
-DWITH_QT5=ON
-DWITH_AKONADI=OFF
-DWITH_ALSA=OFF
-DWITH_GSM=OFF
-DWITH_SPEEX=OFF
-DWITH_ZRTP=OFF
packages: >
qtdeclarative5-dev
qttools5-dev
# Test building with bcg729
- descr: 'w/ bcg729'
bcg729-branch: 'master'
flags: >
-DWITH_QT5=OFF
-DWITH_ALSA=OFF
-DWITH_G729=ON
packages: ' ' # true-but-empty value
# Also test the old pre-1.0.2 API (see issue #104)
- descr: 'w/ bcg729 (old API)'
bcg729-branch: '1.0.1'
# (bcg729 1.0.1 used Autotools instead of CMake)
bcg729-autotools: true
flags: >
-DWITH_QT5=OFF
-DWITH_ALSA=OFF
-DWITH_G729=ON
packages: >
autoconf
automake
libtool
pkg-config
steps:
# Install all packages necessary for this build
- name: Install packages
run: |
sudo apt-get update
sudo apt-get -y install $PACKAGES $PACKAGES_REQUIRED
env:
PACKAGES: ${{ matrix.packages || env.PACKAGES }}
PACKAGES_REQUIRED: ${{ env.PACKAGES_REQUIRED }}
# Set up a specific version of GCC or Clang if matrix.gcc/clang is set
#
# Note: This must come *after* `apt-get update` above, see:
# https://github.com/egor-tensin/setup-clang/issues/5
- name: Set up GCC (${{ matrix.gcc || 'n/a' }})
if: ${{ matrix.gcc }}
uses: egor-tensin/setup-gcc@v1
with:
# Note that these actions use 'latest' to designate the (usually not
# latest) default version. This would result in somewhat confusing
# output, so we use 'default' instead and perform our own renaming.
version: ${{ ((matrix.gcc == 'default') && 'latest') || matrix.gcc }}
- name: Set up Clang (${{ matrix.clang || 'n/a' }})
if: ${{ matrix.clang }}
uses: egor-tensin/setup-clang@v1
with:
version: ${{ ((matrix.clang == 'default') && 'latest') || matrix.clang }}
# Download and build bcg729 if necessary for this build
- name: Download and build bcg729 (${{ matrix.bcg729-branch || 'n/a' }})
if: ${{ matrix.bcg729-branch }}
run: |
git clone https://github.com/BelledonneCommunications/bcg729.git \
--branch "$BCG729_BRANCH"
cd bcg729
if $BCG729_AUTOTOOLS; then
./autogen.sh
./configure
else
cmake .
fi
make
sudo make install
env:
BCG729_BRANCH: ${{ matrix.bcg729-branch }}
BCG729_AUTOTOOLS: ${{ (matrix.bcg729-autotools && 'true') || 'false' }}
# Everything is now set up, ready to checkout/configure/build/install
- name: Checkout
uses: actions/checkout@v3
- name: Configure
run: cmake -B ${{github.workspace}}/build ${{env.FLAGS}}
env:
FLAGS: ${{ matrix.flags || env.FLAGS }}
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Install
run: cmake --install ${{github.workspace}}/build
--prefix ${{github.workspace}}/_install