Skip to content

Commit 51b864f

Browse files
committed
ci: use a matrix for modern ubuntu versions
1 parent b695dad commit 51b864f

File tree

1 file changed

+32
-33
lines changed

1 file changed

+32
-33
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,37 @@ jobs:
2424
- uses: quentinguidee/pep8-action@v1
2525
with:
2626
arguments: '--max-line-length=120 --ignore E265,E266,E402,E501,E704,E712,E713,E714,E711,E722,E741,W504,W605 --exclude *.yml.py,docs/*,python/bindings/* --filename=*.py,iridium-extractor'
27-
ubuntu-24-04:
28-
name: Ubuntu 24.04
29-
runs-on: ubuntu-24.04
27+
ubuntu:
28+
name: Ubuntu
29+
strategy:
30+
matrix:
31+
os:
32+
- version: ubuntu-20.04
33+
ppa: gnuradio/gnuradio-releases
34+
packages: libsndfile-dev libspdlog-dev pybind11-dev
35+
osmosdr-from-source: True
36+
- version: ubuntu-20.04
37+
ppa: gnuradio/gnuradio-releases-3.9
38+
packages: libsndfile-dev libspdlog-dev pybind11-dev gr-osmosdr
39+
- version: ubuntu-22.04
40+
packages: libsndfile1-dev gr-osmosdr
41+
- version: ubuntu-24.04
42+
packages: gr-osmosdr
43+
runs-on: ${{matrix.os.version}}
3044
steps:
3145
- uses: actions/checkout@v4
32-
46+
- name: Add PPA
47+
if: ${{matrix.os.ppa}}
48+
run: |
49+
sudo add-apt-repository ppa:${{matrix.os.ppa}}
3350
- name: Install GNU Radio
3451
run: |
3552
sudo apt update
3653
sudo apt install gnuradio-dev cmake
54+
- name: Install extra packages
55+
if: ${{matrix.os.packages}}
56+
run: |
57+
sudo apt install ${{matrix.os.packages}}
3758
- name: Build
3859
run: |
3960
cmake -B build
@@ -51,44 +72,22 @@ jobs:
5172
run: |
5273
iridium-extractor examples/hackrf-soapy.conf 2>&1 | tee stderr-out
5374
cat stderr-out | grep "RuntimeError: no hackrf device matches"
54-
- name: Open SDR with gr-osmosdr
55-
run: |
56-
sudo apt install gr-osmosdr
57-
iridium-extractor examples/hackrf-10msps.conf 2>&1 | tee stderr-out
58-
cat stderr-out | grep "RuntimeError: Failed to use '0' as HackRF device index: not enough devices"
59-
60-
ubuntu-22-04:
61-
name: Ubuntu 22.04
62-
runs-on: ubuntu-22.04
63-
steps:
64-
- uses: actions/checkout@v4
65-
66-
- name: Install GNU Radio
67-
run: |
68-
sudo apt update
69-
sudo apt install gnuradio-dev cmake libsndfile1-dev
70-
- name: Build
75+
- name: Install gr-osmosdr from source
76+
if: ${{matrix.os.osmosdr-from-source}}
7177
run: |
78+
git clone https://github.com/osmocom/gr-osmosdr
79+
cd gr-osmosdr
7280
cmake -B build
7381
cmake --build build
74-
- name: Install
75-
run: |
7682
cd build
7783
sudo make install
7884
sudo ldconfig
79-
- name: Unit Tests
80-
run: |
81-
cd build
82-
make test
83-
- name: Open SDR with gr-soapy
84-
run: |
85-
iridium-extractor examples/hackrf-soapy.conf 2>&1 | tee stderr-out
86-
cat stderr-out | grep "RuntimeError: no hackrf device matches"
85+
8786
- name: Open SDR with gr-osmosdr
8887
run: |
89-
sudo apt install gr-osmosdr
9088
iridium-extractor examples/hackrf-10msps.conf 2>&1 | tee stderr-out
91-
cat stderr-out | grep "RuntimeError: Failed to use '0' as HackRF device index: not enough devices"
89+
cat stderr-out | grep "RuntimeError: Failed to use '0' as HackRF device index: not enough devices\|RuntimeError: no hackrf device matches"
90+
9291
gr-ppa:
9392
name: Ubuntu 20.04 + GNURadio PPA
9493
runs-on: ubuntu-20.04

0 commit comments

Comments
 (0)