Skip to content

Commit e03c43a

Browse files
committed
Add CI checks for SoapySDR versions
1 parent f213fa6 commit e03c43a

File tree

2 files changed

+114
-41
lines changed

2 files changed

+114
-41
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: CI
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
macos-ci:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
os: [macos-14, macos-15]
13+
runs-on: ${{ matrix.os }}
14+
name: Build on ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Install SoapySDR
18+
run: brew install soapysdr
19+
- name: Build
20+
run: |
21+
cmake -B build
22+
cmake --build build
23+
24+
linux-ci:
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
os: [ubuntu-22.04, ubuntu-24.04]
29+
build_type: [Release, Debug]
30+
soapy: [0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.8.0, 0.8.1]
31+
runs-on: ${{ matrix.os }}
32+
name: Build on ${{ matrix.os }}
33+
env:
34+
INSTALL_PREFIX: /usr/local
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Setup tools
38+
run: |
39+
sudo apt-get update -q -y
40+
sudo apt-get install -y --no-install-recommends cmake ninja-build
41+
# sudo apt-get install -q -y libsoapysdr-dev
42+
- name: Install SoapySDR
43+
run: |
44+
# Build against all supported SoapySDR versions
45+
git clone https://github.com/pothosware/SoapySDR -b soapy-sdr-${{matrix.soapy}}
46+
cd SoapySDR
47+
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DENABLE_PYTHON=OFF -DENABLE_PYTHON3=OFF -B build
48+
cmake --build build
49+
sudo cmake --build build -- install
50+
sudo ldconfig
51+
52+
- name: Build
53+
run: |
54+
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -GNinja -B build
55+
cmake --build build
56+
sudo cmake --build build -- install
57+
58+
- name: Test module registration
59+
run: |
60+
SoapySDRUtil --info
61+
SoapySDRUtil --check=rtltcp
62+
63+
windows-ci:
64+
strategy:
65+
fail-fast: false
66+
matrix:
67+
build_type: [Release, Debug]
68+
config:
69+
- cmake_config: -G "Visual Studio 17 2022" -A "Win32"
70+
arch: win32
71+
os: windows-2022
72+
73+
- cmake_config: -G "Visual Studio 17 2022" -A "x64"
74+
arch: x64
75+
os: windows-2022
76+
77+
- cmake_config: -G "Visual Studio 17 2022" -A "Win32"
78+
arch: win32
79+
os: windows-2025
80+
81+
- cmake_config: -G "Visual Studio 17 2022" -A "x64"
82+
arch: x64
83+
os: windows-2025
84+
85+
runs-on: ${{ matrix.config.os }}
86+
name: Build on ${{ matrix.config.os }}
87+
env:
88+
INSTALL_PREFIX: 'C:\Program Files\SoapySDR'
89+
steps:
90+
- uses: actions/checkout@v4
91+
- uses: ilammy/msvc-dev-cmd@v1
92+
with:
93+
arch: ${{matrix.config.arch}}
94+
- name: Install SoapySDR
95+
run: |
96+
cd ${{runner.workspace}}
97+
# Build SoapySDR that supports OS X GCC modules
98+
git clone https://github.com/pothosware/SoapySDR
99+
cd SoapySDR
100+
git checkout f8d57652d12f9d212f373a81e493eba1a0b058c5
101+
cmake ${{matrix.config.cmake_config}} -DENABLE_PYTHON=OFF -DCMAKE_INSTALL_PREFIX="$Env:INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -B build
102+
cmake --build build --config ${{matrix.build_type}}
103+
cmake --install build --config ${{matrix.build_type}}
104+
- name: Build
105+
run: |
106+
$Env:INCLUDE += ";$Env:INSTALL_PREFIX\include"
107+
$Env:LIB += ";$Env:INSTALL_PREFIX\lib"
108+
cmake ${{matrix.config.cmake_config}} -DCMAKE_INSTALL_PREFIX="$Env:INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -B build
109+
cmake --build build --config ${{matrix.build_type}}
110+
cmake --install build --config ${{matrix.build_type}}
111+
- name: Test module registration
112+
run: |
113+
$Env:PATH += ";$Env:INSTALL_PREFIX\bin"
114+
SoapySDRUtil --check=rtltcp

0 commit comments

Comments
 (0)