Skip to content

Commit 9b46885

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

File tree

1 file changed

+23
-36
lines changed

1 file changed

+23
-36
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,49 +24,35 @@ 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+
- version: ubuntu-20.04
36+
ppa: gnuradio/gnuradio-releases-3.9
37+
packages: libsndfile-dev libspdlog-dev pybind11-dev
38+
- version: ubuntu-22.04
39+
packages: libsndfile1-dev
40+
- version: ubuntu-24.04
41+
runs-on: ${{matrix.os.version}}
3042
steps:
3143
- uses: actions/checkout@v4
32-
44+
- name: Add PPA
45+
if: ${{matrix.os.ppa}}
46+
run: |
47+
sudo add-apt-repository ppa:${{matrix.os.ppa}}
3348
- name: Install GNU Radio
3449
run: |
3550
sudo apt update
3651
sudo apt install gnuradio-dev cmake
37-
- name: Build
38-
run: |
39-
cmake -B build
40-
cmake --build build
41-
- name: Install
52+
- name: Install extra packages
53+
if: ${{matrix.os.packages}}
4254
run: |
43-
cd build
44-
sudo make install
45-
sudo ldconfig
46-
- name: Unit Tests
47-
run: |
48-
cd build
49-
make test
50-
- name: Open SDR with gr-soapy
51-
run: |
52-
iridium-extractor examples/hackrf-soapy.conf 2>&1 | tee stderr-out
53-
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
55+
sudo apt install ${{matrix.os.packages}}
7056
- name: Build
7157
run: |
7258
cmake -B build
@@ -89,6 +75,7 @@ jobs:
8975
sudo apt install gr-osmosdr
9076
iridium-extractor examples/hackrf-10msps.conf 2>&1 | tee stderr-out
9177
cat stderr-out | grep "RuntimeError: Failed to use '0' as HackRF device index: not enough devices"
78+
9279
gr-ppa:
9380
name: Ubuntu 20.04 + GNURadio PPA
9481
runs-on: ubuntu-20.04

0 commit comments

Comments
 (0)