Skip to content

Commit b2a9bf3

Browse files
authored
build: Add new binary builds (#2859)
1 parent aea0eab commit b2a9bf3

File tree

5 files changed

+295
-36
lines changed

5 files changed

+295
-36
lines changed

.github/workflows/release.yml

+170-36
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,167 @@ jobs:
6464
#draft: true
6565
prerelease: ${{ env.PRERELEASE }}
6666

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+
67228
build_mingw_job:
68229
needs: release_job
69230
if: ${{ needs.release_job.result != 'failure' }}
@@ -89,16 +250,18 @@ jobs:
89250
if: matrix.arch == 'x86-64'
90251
env:
91252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
253+
ZIP_FILE: rtl_433-win-x64-${{ needs.release_job.outputs.release_version }}.zip
92254
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
95257
- name: "Upload Release Asset"
96258
if: matrix.arch == 'x86-64'
97259
env:
98260
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
261+
ZIP_FILE: rtl_433-win-x32-${{ needs.release_job.outputs.release_version }}.zip
99262
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
102265
103266
build_msvc_job:
104267
needs: [downloads_job, release_job]
@@ -211,41 +374,12 @@ jobs:
211374
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
212375
GH_TOKEN: ${{ github.token }}
213376
GH_REPO: ${{ github.repository }}
377+
ZIP_FILE: rtl_433-win-msvc-x64-${{ needs.release_job.outputs.release_version }}.zip
214378
shell: bash
215379
working-directory: ${{ runner.workspace }}
216380
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
249383
250384
build_arch_job:
251385
if: ${{ false }} # disable for now
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set(CMAKE_SYSTEM_NAME Linux)
2+
set(CMAKE_SYSTEM_PROCESSOR aarch64)
3+
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc)
4+
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set(CMAKE_SYSTEM_NAME Linux)
2+
set(CMAKE_SYSTEM_PROCESSOR arm)
3+
set(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
4+
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)

docs/.vuepress/config.js

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = {
3232
sidebar: [
3333
{ text: 'Overview', link: '/' },
3434
'BUILDING',
35+
'BINARY_BUILDS',
3536
'STARTING',
3637
'CHANGELOG',
3738
'CONTRIBUTING',

docs/BINARY_BUILDS.md

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Binary Builds
2+
3+
First check to see if your distribution already has a recent enough version packaged for you.
4+
E.g. check [Repology](https://repology.org/project/rtl-433/versions) for a quick overview.
5+
6+
We currently provide 18 [binary builds](https://github.com/merbanan/rtl_433/releases) for different OS, Platform, Version and Features.
7+
This is intended to quickly test out `rtl_433` or update to the newest version.
8+
Due to library dependencies and versions we can't guarantee our binaries to work
9+
(safe to try though, the worst is a "executable not supported" or "library is missing" message).
10+
11+
Let us know in [with a comment](https://github.com/merbanan/rtl_433/issues/2859) if a binary unexpectedly does work or does not work.
12+
13+
OS and Platform:
14+
- Windows: x32 and x64
15+
- MacOS: x86_64/Intel and arm64/M1
16+
- Linux: x86_64/amd64, arm64 (Raspberry Pi OS 64-bit), and armhf (Raspberry Pi OS 64-bit)
17+
18+
Version (only Linux):
19+
- Variant for OpenSSL 1.1: Ubuntu 20.04 focal, Debian 11 Bullseye, Raspberry Pi OS Legacy
20+
- Variant for OpenSSL 3: Ubuntu 22.04 jammy, Debian 12 Bookworm, Raspberry Pi OS
21+
22+
Features:
23+
- with only rtlsdr
24+
- with rtlsdr and SoapySDR
25+
26+
## Choosing a binary
27+
28+
Without SoapySDR:
29+
- `rtl_433-rtlsdr-MacOS-arm64.zip`: MacOS-14 for arm64/M1
30+
- `rtl_433-rtlsdr-MacOS-x86_64.zip`: MacOS-12 for x86_64/Intel
31+
- `rtl_433-rtlsdr-openssl11-Linux-amd64.zip`: Linux for x86_64/amd64 with OpenSSL 1.1
32+
- `rtl_433-rtlsdr-openssl11-Linux-arm64.zip`: Linux for aarch64/arm64 with OpenSSL 1.1
33+
- `rtl_433-rtlsdr-openssl11-Linux-armhf.zip`: Linux for armhf with OpenSSL 1.1
34+
- `rtl_433-rtlsdr-openssl3-Linux-amd64.zip`: Linux for x86_64/amd64 with OpenSSL 3
35+
- `rtl_433-rtlsdr-openssl3-Linux-arm64.zip`: Linux for aarch64/arm64 with OpenSSL 3
36+
- `rtl_433-rtlsdr-openssl3-Linux-armhf.zip`: Linux for armhf with OpenSSL 3
37+
38+
With SoapySDR:
39+
- `rtl_433-soapysdr-MacOS-arm64.zip`: MacOS-arm64
40+
- `rtl_433-soapysdr-MacOS-x86_64.zip`: MacOS-x86_64
41+
- `rtl_433-soapysdr-openssl11-Linux-amd64.zip`: Linux for x86_64/amd64 with OpenSSL 1.1
42+
- `rtl_433-soapysdr-openssl11-Linux-arm64.zip`: Linux for aarch64/arm64 with OpenSSL 1.1
43+
- `rtl_433-soapysdr-openssl11-Linux-armhf.zip`: Linux for armhf with OpenSSL 1.1
44+
- `rtl_433-soapysdr-openssl3-Linux-amd64.zip`: Linux for x86_64/amd64 with OpenSSL 3
45+
- `rtl_433-soapysdr-openssl3-Linux-arm64.zip`: Linux for aarch64/arm64 with OpenSSL 3
46+
- `rtl_433-soapysdr-openssl3-Linux-armhf.zip`: Linux for armhf with OpenSSL 3
47+
48+
49+
## Easy Install
50+
51+
Easiest install would be to first install a distribution provided `rtl_433` package for the dependencies,
52+
then use one of these binaries instead.
53+
54+
## Install
55+
56+
Otherwise you need to install libusb, openssl (1.1 or 3), librtlsdr, and optionally SoapySDR (plus driver modules).
57+
58+
### MacOS
59+
60+
After unpacking the binary you need to clear the file attributes:
61+
```
62+
xattr -c rtl_433
63+
```
64+
Note that `com.apple.quarantine` attributes are a useful safety feature and you should only perform this with genuine downloads from trusted sources.
65+
66+
::: warning
67+
Note that [Homebrew](https://formulae.brew.sh/formula/librtlsdr) uses librtlsdr version 2.0 (with rtl-sdr blog v4 support)
68+
while [MacPorts](https://ports.macports.org/port/rtl-sdr/details/) uses version 0.6
69+
but those are compatible.
70+
You'll need to update the binary to run on MacPorts:
71+
```
72+
install_name_tool -change @rpath/librtlsdr.2.dylib @rpath/librtlsdr.0.dylib rtl_433
73+
```
74+
:::
75+
76+
#### MacPorts
77+
78+
(s.a. the [MacPorts port](https://ports.macports.org/port/rtl_433/))
79+
```
80+
sudo port install libusb openssl3 rtl-sdr
81+
```
82+
optionally add
83+
```
84+
sudo port install SoapySDR
85+
```
86+
87+
#### HomeBrew
88+
89+
(s.a. the [Homebrew Formula](https://formulae.brew.sh/formula/rtl_433))
90+
```
91+
brew install libusb
92+
brew install openssl@3
93+
brew install librtlsdr
94+
```
95+
optionally add
96+
```
97+
brew install soapysdr
98+
```
99+
100+
### Linux
101+
102+
On Debian, Ubuntu, and Raspberry Pi OS (and similar Debian-based OS supporting the `apt` package manager):
103+
104+
```
105+
sudo apt-get install -y rtl-sdr openssl soapysdr-tools
106+
```
107+
108+
Or with out any tools, just the libs for Bullseye / Focal
109+
```
110+
sudo apt-get install -y librtlsdr0 libssl1.1 libsoapysdr0.7
111+
```
112+
113+
Similar for Bookworm / Jammy
114+
```
115+
sudo apt-get install -y librtlsdr0 libssl3 libsoapysdr0.8
116+
```

0 commit comments

Comments
 (0)