-
Notifications
You must be signed in to change notification settings - Fork 23
244 lines (221 loc) · 8.57 KB
/
ci.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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
name: CI
on: [push, pull_request]
jobs:
linux-ci:
name: Linux
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]
config:
- cc: gcc-9
cxx: g++-9
os: ubuntu-20.04
- cc: gcc-10
cxx: g++-10
os: ubuntu-20.04
- cc: gcc-11
cxx: g++-11
os: ubuntu-22.04
- cc: gcc-12
cxx: g++-12
os: ubuntu-22.04
- cc: clang-10
cxx: clang++-10
os: ubuntu-20.04
- cc: clang-11
cxx: clang++-11
os: ubuntu-20.04
- cc: clang-12
cxx: clang++-12
os: ubuntu-20.04
- cc: clang-13
cxx: clang++-13
os: ubuntu-22.04
- cc: clang-14
cxx: clang++-14
os: ubuntu-22.04
runs-on: ${{matrix.config.os}}
env:
CC: ${{matrix.config.cc}}
CXX: ${{matrix.config.cxx}}
INSTALL_PREFIX: /usr/local
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt install -y libavahi-client-dev libavahi-common-dev
# Build against earliest supported SoapySDR
git clone https://github.com/pothosware/SoapySDR -b soapy-sdr-0.8.1
mkdir SoapySDR/build
cd SoapySDR/build
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DENABLE_PYTHON=OFF -DENABLE_PYTHON3=OFF ..
sudo make install
sudo ldconfig
- name: Build SoapyRemote
run: |
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{github.workspace}}
sudo make install
- name: Test module registration
run: |
SoapySDRUtil --check=remote
osx-ci:
name: OS X
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]
config:
- cc: gcc-9
cxx: g++-9
os: macos-11
- cc: gcc-10
cxx: g++-10
os: macos-11
- cc: gcc-11
cxx: g++-11
os: macos-11
- cc: clang
cxx: clang++
os: macos-11
- cc: clang
cxx: clang++
os: macos-11
# TODO: re-enable after MacOS Monterey Python issue fixed
#- cc: clang
# cxx: clang++
# os: macos-12
runs-on: ${{matrix.config.os}}
env:
CC: ${{matrix.config.cc}}
CXX: ${{matrix.config.cxx}}
INSTALL_PREFIX: /usr/local
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
# Build SoapySDR that supports OS X GCC modules
git clone https://github.com/pothosware/SoapySDR
cd SoapySDR
git checkout f8d57652d12f9d212f373a81e493eba1a0b058c5
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ..
sudo make install
- name: Build SoapyRemote
run: |
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{github.workspace}}
sudo make install
- name: Test module registration
run: |
SoapySDRUtil --check=remote
windows-ci:
name: Windows
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]
config:
#
# MSVC
#
- cmake_config: -G "Visual Studio 14 2015" -A "Win32"
arch: win32
os: windows-2019
msvc: true
- cmake_config: -G "Visual Studio 14 2015" -A "x64"
arch: x64
os: windows-2019
msvc: true
- cmake_config: -G "Visual Studio 16 2019" -A "Win32"
arch: win32
os: windows-2019
msvc: true
- cmake_config: -G "Visual Studio 16 2019" -A "x64"
arch: x64
os: windows-2019
msvc: true
- cmake_config: -G "Visual Studio 17 2022" -A "Win32"
arch: win32
os: windows-2022
msvc: true
- cmake_config: -G "Visual Studio 17 2022" -A "x64"
arch: x64
os: windows-2022
msvc: true
runs-on: ${{matrix.config.os}}
env:
INSTALL_PREFIX: 'C:\Program Files\SoapySDR'
steps:
- uses: actions/checkout@v2
- uses: ilammy/msvc-dev-cmd@v1
if:
${{matrix.config.msvc == true}}
with:
arch: ${{matrix.config.arch}}
- name: Install SoapySDR
run: |
cd ${{runner.workspace}}
# Build against earliest compatible SoapySDR
git clone https://github.com/pothosware/SoapySDR
cd SoapySDR
git checkout 6f48f370fc5a196bb850cc4146143d7bd98f43bc
mkdir build
cd build
cmake ${{matrix.config.cmake_config}} -DENABLE_PYTHON=OFF -DCMAKE_INSTALL_PREFIX="$Env:INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ..
cmake --build . --config ${{matrix.build_type}}
cmake --install . --config ${{matrix.build_type}}
- name: Build SoapyRemote
run: |
$Env:INCLUDE += ";$Env:INSTALL_PREFIX\include"
$Env:LIB += ";$Env:INSTALL_PREFIX\lib"
mkdir build
cd build
cmake ${{matrix.config.cmake_config}} -DCMAKE_INSTALL_PREFIX="$Env:INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ..
cmake --build . --config ${{matrix.build_type}}
cmake --install . --config ${{matrix.build_type}}
- name: Test module registration
run: |
$Env:PATH += ";$Env:INSTALL_PREFIX\bin"
SoapySDRUtil --check=remote
freebsd-ci:
name: FreeBSD
runs-on: macos-12
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]
release: ["12.3", "13.0", "13.1"]
steps:
- uses: actions/checkout@v2
- uses: vmactions/freebsd-vm@v0
name: Test in FreeBSD
with:
release: ${{matrix.release}}
copyback: false
prepare: |
pkg install -y cmake SoapySDR net/avahi
run: |
# We can't separate these steps, so add prints for clarity.
echo
echo "----------------------------------"
echo "Building..."
echo "----------------------------------"
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ..
make
echo
echo "----------------------------------"
echo "Installing..."
echo "----------------------------------"
make install
echo
echo "----------------------------------"
echo "Testing module registration..."
echo "----------------------------------"
SoapySDRUtil --check=remote