@@ -64,6 +64,167 @@ jobs:
64
64
# draft: true
65
65
prerelease : ${{ env.PRERELEASE }}
66
66
67
+ macos_build_job :
68
+ needs : release_job
69
+ strategy :
70
+ fail-fast : false
71
+ matrix :
72
+ os : [macos-12, macos-14]
73
+ feat : [rtlsdr, soapysdr]
74
+ include :
75
+ - os : macos-12
76
+ arch : x86_64
77
+ - os : macos-14
78
+ arch : arm64
79
+ runs-on : ${{ matrix.os }}
80
+ name : Build ${{ matrix.feat }} on ${{ matrix.os }} for ${{ matrix.arch }}
81
+ steps :
82
+ - uses : actions/checkout@v4
83
+ - name : Setup tools
84
+ run : brew install librtlsdr openssl@3
85
+ - name : Setup SoapySDR deps
86
+ if : matrix.feat == 'soapysdr'
87
+ run : brew install soapysdr
88
+ - name : Build
89
+ run : |
90
+ cmake -B build
91
+ cmake --build build
92
+ - name : Adjust binary to run with MacPorts or Homebrew
93
+ # Homebrew has x86 in /usr/local and arm64 in /opt/homebrew
94
+ run : >
95
+ install_name_tool
96
+ -change /opt/homebrew/opt/openssl@3/lib/libssl.3.dylib @rpath/libssl.3.dylib
97
+ -change /opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib
98
+ -change /opt/homebrew/opt/libusb/lib/libusb-1.0.0.dylib @rpath/libusb-1.0.0.dylib
99
+ -change /opt/homebrew/opt/librtlsdr/lib/librtlsdr.2.dylib @rpath/librtlsdr.2.dylib
100
+ -change /opt/homebrew/opt/soapysdr/lib/libSoapySDR.0.8.dylib @rpath/libSoapySDR.0.8.dylib
101
+ -change /usr/local/opt/openssl@3/lib/libssl.3.dylib @rpath/libssl.3.dylib
102
+ -change /usr/local/opt/openssl@3/lib/libcrypto.3.dylib @rpath/libcrypto.3.dylib
103
+ -change /usr/local/opt/libusb/lib/libusb-1.0.0.dylib @rpath/libusb-1.0.0.dylib
104
+ -change /usr/local/opt/librtlsdr/lib/librtlsdr.2.dylib @rpath/librtlsdr.2.dylib
105
+ -change /usr/local/opt/soapysdr/lib/libSoapySDR.0.8.dylib @rpath/libSoapySDR.0.8.dylib
106
+ -add_rpath /opt/homebrew/opt/openssl@3/lib
107
+ -add_rpath /opt/homebrew/opt/libusb/lib
108
+ -add_rpath /opt/homebrew/opt/librtlsdr/lib
109
+ -add_rpath /opt/homebrew/opt/soapysdr/lib
110
+ -add_rpath /usr/local/opt/openssl@3/lib
111
+ -add_rpath /usr/local/opt/libusb/lib
112
+ -add_rpath /usr/local/opt/librtlsdr/lib
113
+ -add_rpath /usr/local/opt/soapysdr/lib
114
+ -add_rpath /opt/local/libexec/openssl3/lib
115
+ -add_rpath /opt/local/lib
116
+ build/src/rtl_433
117
+ - name : Check final binary
118
+ run : otool -L build/src/rtl_433
119
+ - name : " Upload Release Asset"
120
+ env :
121
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
122
+ ZIP_FILE : rtl_433-${{ matrix.feat }}-MacOS-${{ matrix.arch }}-${{ needs.release_job.outputs.release_version }}.zip
123
+ run : |
124
+ zip --junk-paths $ZIP_FILE build/src/rtl_433
125
+ gh release upload ${{ needs.release_job.outputs.release_version }} $ZIP_FILE
126
+
127
+ # 22.04 jammy / bookworm uses OpenSSL 3
128
+ # 20.04 focal / bullseye uses OpenSSL 1.1
129
+ native_build_job :
130
+ needs : release_job
131
+ strategy :
132
+ fail-fast : false
133
+ matrix :
134
+ os : [ubuntu-20.04, ubuntu-22.04]
135
+ feat : [rtlsdr, soapysdr]
136
+ include :
137
+ - os : ubuntu-20.04
138
+ libs : openssl11
139
+ - os : ubuntu-22.04
140
+ libs : openssl3
141
+ runs-on : ${{ matrix.os }}
142
+ name : Build ${{ matrix.feat }} on ${{ matrix.os }} for amd64
143
+ steps :
144
+ - uses : actions/checkout@v4
145
+ - name : Setup tools
146
+ run : |
147
+ sudo apt-get update -q -y
148
+ sudo apt-get install -y --no-install-recommends cmake ninja-build
149
+ - name : Setup deps
150
+ run : |
151
+ sudo apt-get install -q -y librtlsdr-dev libssl-dev
152
+ - name : Setup SoapySDR deps
153
+ if : matrix.feat == 'soapysdr'
154
+ run : |
155
+ sudo apt-get install -q -y libsoapysdr-dev
156
+ - name : Build
157
+ run : |
158
+ cmake -GNinja -B build
159
+ cmake --build build
160
+ - name : Check final binary
161
+ run : ldd build/src/rtl_433
162
+ - name : " Upload Release Asset"
163
+ env :
164
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
165
+ ZIP_FILE : rtl_433-${{ matrix.feat }}-${{ matrix.libs }}-Linux-amd64-${{ needs.release_job.outputs.release_version }}.zip
166
+ run : |
167
+ zip --junk-paths $ZIP_FILE build/src/rtl_433
168
+ gh release upload ${{ needs.release_job.outputs.release_version }} $ZIP_FILE
169
+
170
+ cross_build_job :
171
+ needs : release_job
172
+ strategy :
173
+ fail-fast : false
174
+ matrix :
175
+ os : [ubuntu-20.04, ubuntu-22.04]
176
+ arch : [armhf, arm64]
177
+ feat : [rtlsdr, soapysdr]
178
+ include :
179
+ - arch : armhf
180
+ compiler : arm-linux-gnueabihf
181
+ - arch : arm64
182
+ compiler : aarch64-linux-gnu
183
+ - os : ubuntu-20.04
184
+ libs : openssl11
185
+ - os : ubuntu-22.04
186
+ libs : openssl3
187
+ runs-on : ${{ matrix.os }}
188
+ name : Build ${{ matrix.feat }} on ${{ matrix.os }} for ${{ matrix.arch }}
189
+ steps :
190
+ - uses : actions/checkout@v4
191
+ - name : Setup tools
192
+ run : |
193
+ sudo apt-get update -q -y
194
+ sudo apt-get install -y --no-install-recommends cmake ninja-build
195
+ - name : Purge conflicting dev that confuse cross linking
196
+ run : |
197
+ sudo apt-get purge -y libssl-dev libusb-1.0-0-dev
198
+ - name : Setup compiler
199
+ run : |
200
+ sudo apt-get install -q -y gcc-${{ matrix.compiler }} g++-${{ matrix.compiler }}
201
+ - name : Restrict sources.list
202
+ run : |
203
+ sudo sed -i'' -E 's/^(deb|deb-src) mirror\+file/\1 [arch=amd64,i386] mirror\+file/' /etc/apt/sources.list
204
+ -
uses :
ryankurte/[email protected]
205
+ if : matrix.feat != 'soapysdr'
206
+ with :
207
+ arch : ${{ matrix.arch }}
208
+ packages : " librtlsdr-dev:${{ matrix.arch }} libssl-dev:${{ matrix.arch }}"
209
+ -
uses :
ryankurte/[email protected]
210
+ if : matrix.feat == 'soapysdr'
211
+ with :
212
+ arch : ${{ matrix.arch }}
213
+ packages : " librtlsdr-dev:${{ matrix.arch }} libssl-dev:${{ matrix.arch }} libsoapysdr-dev:${{ matrix.arch }}"
214
+ - name : Build
215
+ run : |
216
+ cmake -DCMAKE_TOOLCHAIN_FILE="$(pwd)/cmake/Toolchain-${{ matrix.compiler }}.cmake" -GNinja -B build
217
+ cmake --build build
218
+ - name : Check final binary
219
+ run : ${{ matrix.compiler }}-readelf -a build/src/rtl_433 | grep "Shared library:"
220
+ - name : " Upload Release Asset"
221
+ env :
222
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
223
+ ZIP_FILE : rtl_433-${{ matrix.feat }}-${{ matrix.libs }}-Linux-${{ matrix.arch }}-${{ needs.release_job.outputs.release_version }}.zip
224
+ run : |
225
+ zip --junk-paths $ZIP_FILE build/src/rtl_433
226
+ gh release upload ${{ needs.release_job.outputs.release_version }} $ZIP_FILE
227
+
67
228
build_mingw_job :
68
229
needs : release_job
69
230
if : ${{ needs.release_job.result != 'failure' }}
@@ -89,16 +250,18 @@ jobs:
89
250
if : matrix.arch == 'x86-64'
90
251
env :
91
252
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
253
+ ZIP_FILE : rtl_433-win-x64-${{ needs.release_job.outputs.release_version }}.zip
92
254
run : |
93
- mv rtl_433-win-x64.zip rtl_433-win-x64-${{ needs.release_job.outputs.release_version }}.zip
94
- gh release upload ${{ needs.release_job.outputs.release_version }} rtl_433-win-x64-${{ needs.release_job.outputs.release_version }}.zip
255
+ mv rtl_433-win-x64.zip $ZIP_FILE
256
+ gh release upload ${{ needs.release_job.outputs.release_version }} $ZIP_FILE
95
257
- name : " Upload Release Asset"
96
258
if : matrix.arch == 'x86-64'
97
259
env :
98
260
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
261
+ ZIP_FILE : rtl_433-win-x32-${{ needs.release_job.outputs.release_version }}.zip
99
262
run : |
100
- mv rtl_433-win-x32.zip rtl_433-win-x32-${{ needs.release_job.outputs.release_version }}.zip
101
- gh release upload ${{ needs.release_job.outputs.release_version }} rtl_433-win-x32-${{ needs.release_job.outputs.release_version }}.zip
263
+ mv rtl_433-win-x32.zip $ZIP_FILE
264
+ gh release upload ${{ needs.release_job.outputs.release_version }} $ZIP_FILE
102
265
103
266
build_msvc_job :
104
267
needs : [downloads_job, release_job]
@@ -211,41 +374,12 @@ jobs:
211
374
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
212
375
GH_TOKEN : ${{ github.token }}
213
376
GH_REPO : ${{ github.repository }}
377
+ ZIP_FILE : rtl_433-win-msvc-x64-${{ needs.release_job.outputs.release_version }}.zip
214
378
shell : bash
215
379
working-directory : ${{ runner.workspace }}
216
380
run : |
217
- mv rtl_433-win-msvc-x64.zip rtl_433-win-msvc-x64-${{ needs.release_job.outputs.release_version }}.zip
218
- gh release upload ${{ needs.release_job.outputs.release_version }} rtl_433-win-msvc-x64-${{ needs.release_job.outputs.release_version }}.zip
219
-
220
- build_linux_job :
221
- strategy :
222
- fail-fast : false
223
- matrix :
224
- os : [ubuntu-20.04, ubuntu-22.04]
225
- runs-on : ${{ matrix.os }}
226
- name : Build with CMake on ${{ matrix.os }}
227
- steps :
228
- - uses : actions/checkout@v4
229
- - name : Install SDR
230
- run : |
231
- sudo apt-get update -q
232
- sudo apt-get install -y librtlsdr-dev libsoapysdr-dev libssl-dev
233
- - name : Get latest CMake and Ninja
234
- uses : lukka/get-cmake@latest
235
- - name : Run CMake+Ninja
236
- uses : lukka/run-cmake@v10
237
- with :
238
- configurePreset : dummy
239
- configurePresetCmdString : " [`-B`, `${{ runner.workspace }}/b/ninja`, `-GNinja`, `-DENABLE_RTLSDR=ON`, `-DENABLE_SOAPYSDR=ON`, `-DENABLE_OPENSSL=ON`]"
240
- buildPreset : dummy
241
- buildPresetCmdString : " [`--build`, `${{ runner.workspace }}/b/ninja`, `--config`, `Release`]"
242
- - name : Run CMake+UnixMakefiles
243
- uses : lukka/run-cmake@v10
244
- with :
245
- configurePreset : dummy
246
- configurePresetCmdString : " [`-B`, `${{ runner.workspace }}/b/unixmakefiles`, `-GUnix Makefiles`, `-DENABLE_RTLSDR=ON`, `-DENABLE_SOAPYSDR=ON`, `-DENABLE_OPENSSL=ON`]"
247
- buildPreset : dummy
248
- buildPresetCmdString : " [`--build`, `${{ runner.workspace }}/b/unixmakefiles`, `--config`, `Release`]"
381
+ mv rtl_433-win-msvc-x64.zip $ZIP_FILE
382
+ gh release upload ${{ needs.release_job.outputs.release_version }} $ZIP_FILE
249
383
250
384
build_arch_job :
251
385
if : ${{ false }} # disable for now
0 commit comments