-
Notifications
You must be signed in to change notification settings - Fork 81
134 lines (130 loc) · 5.75 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
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
check-formatting:
name: Check C++ Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gnuradio/clang-format-lint-action@v0.5-4
with:
source: '.'
exclude: './python'
extensions: 'h,hpp,cpp,cc,cc.in'
check-python-formatting:
name: Check Python Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: quentinguidee/pep8-action@v1
with:
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'
ubuntu:
name: Ubuntu
strategy:
matrix:
os:
-version: ubuntu-22.04
packets: "gnuradio-dev cmake libsndfile1-dev"
-version: ubuntu-24.04
packets: "gnuradio-dev cmake"
runs-on: ${{matrix.os.version}}
steps:
- uses: actions/checkout@v4
- name: Install GNU Radio
run: |
sudo apt update
sudo apt install ${{matrix.os.packets}}
- name: Build
run: |
cmake -B build
cmake --build build
- name: Install
run: |
cd build
sudo make install
sudo ldconfig
- name: Unit Tests
run: |
cd build
make test
- name: Open SDR with gr-soapy
run: |
iridium-extractor examples/hackrf-soapy.conf 2>&1 | tee stderr-out
cat stderr-out | grep "RuntimeError: no hackrf device matches"
- name: Open SDR with gr-osmosdr
run: |
sudo apt install gr-osmosdr
iridium-extractor examples/hackrf-10msps.conf 2>&1 | tee stderr-out
cat stderr-out | grep "RuntimeError: Failed to use '0' as HackRF device index: not enough devices"
gr-ppa:
name: Ubuntu 20.04 + GNURadio PPA
runs-on: ubuntu-20.04
strategy:
matrix:
ppa: [gnuradio/gnuradio-releases, gnuradio/gnuradio-releases-3.9]
steps:
- uses: actions/checkout@v4
- name: Install GNURadio
run: |
sudo add-apt-repository ppa:${{matrix.ppa}}
sudo apt update
sudo apt install gnuradio-dev
sudo apt install cmake libsndfile-dev libspdlog-dev
sudo apt install pybind11-dev
- name: Build
run: |
cmake -B build
cmake --build build
- name: Install
run: |
cd build
sudo make install
sudo ldconfig
- name: Unit Tests
run: |
cd build
make test
- name: Demod PRBS15 SigMF
run: |
iridium-extractor test-data/prbs15-2M-20dB.sigmf-meta |grep ^RAW > prbs15-2M-20dB.bits
grep "RAW: prbs15-2M-20dB 0000599.9996 1622000000 N:32.12-80.05 I:00000000000 100% 0.13551 179 0011000000110000111100111000000000000011000000000000101000000000001111000000000010001000000000110011000000001010101000000011111111000000100000001000001100000011000010100000101000111100001111001000100010001011001100110011101010101010100111111111111101000000000000111000000000001001000000000011011000000000101101000000001110111000000010011001000000110101011000001011111101000011100000" prbs15-2M-20dB.bits
- name: Demod with decimation 4
run: |
iridium-extractor -D 4 test-data/prbs15-2M-20dB.sigmf-meta |grep ^RAW > prbs15-2M-20dB-D4.bits
grep "RAW: prbs15-2M-20dB 0000599.9996 1622000000 N:32.12-80.05 I:00000000000 100% 0.13577 179 0011000000110000111100111000000000000011000000000000101000000000001111000000000010001000000000110011000000001010101000000011111111000000100000001000001100000011000010100000101000111100001111001000100010001011001100110011101010101010100111111111111101000000000000111000000000001001000000000011011000000000101101000000001110111000000010011001000000110101011000001011111101000011100000" prbs15-2M-20dB-D4.bits
- name: Demod with decimation 8
run: |
iridium-extractor -D 8 test-data/prbs15-2M-20dB.sigmf-meta |grep ^RAW > prbs15-2M-20dB-D8.bits
grep "RAW: prbs15-2M-20dB 0000599.9996 1622000000 N:32.12-80.05 I:00000000000 100% 0.13643 179 0011000000110000111100111000000000000011000000000000101000000000001111000000000010001000000000110011000000001010101000000011111111000000100000001000001100000011000010100000101000111100001111001000100010001011001100110011101010101010100111111111111101000000000000111000000000001001000000000011011000000000101101000000001110111000000010011001000000110101011000001011111101000011100000" prbs15-2M-20dB-D8.bits
- name: Test raw samples
run: |
ln -s prbs15-2M-20dB.sigmf-data test-data/prbs15-2M-20dB.fc32
iridium-extractor --offline -c 1622000000 -r 2000000 -f float test-data/prbs15-2M-20dB.fc32 |grep ^RAW > prbs15-2M-20dB.bits.raw
cmp prbs15-2M-20dB.bits prbs15-2M-20dB.bits.raw
- name: Test SigMF Archive support
run: |
tar cf test-data/prbs15-2M-20dB.sigmf test-data/prbs15-2M-20dB.sigmf-*
iridium-extractor test-data/prbs15-2M-20dB.sigmf |grep ^RAW > prbs15-2M-20dB.bits.archive
cmp prbs15-2M-20dB.bits prbs15-2M-20dB.bits.archive
- name: Install gr-osmosdr
run: |
git clone https://github.com/osmocom/gr-osmosdr
cd gr-osmosdr
cmake -B build
cmake --build build
cd build
sudo make install
sudo ldconfig
- name: Open SDR
run: |
iridium-extractor examples/hackrf-10msps.conf 2>&1 | tee stderr-out
cat stderr-out | grep "No supported devices found"
- name: Test Open SDR with soapy
run: |
iridium-extractor examples/hackrf-soapy.conf 2>&1 | tee stderr-out
cat stderr-out | grep "RuntimeError: no hackrf device matches"