Skip to content

Commit 5e76779

Browse files
committed
build: Add armel armv6 builds
1 parent d206a40 commit 5e76779

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.github/workflows/release.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,70 @@ jobs:
217217
zip --junk-paths $ZIP_FILE build/src/rtl_433
218218
gh release upload ${{ needs.release_job.outputs.release_version }} $ZIP_FILE
219219
220+
container_build_job:
221+
needs: release_job
222+
strategy:
223+
fail-fast: false
224+
matrix:
225+
arch: [armel]
226+
feat: [rtlsdr, soapysdr]
227+
include:
228+
- arch: armel
229+
compiler: arm-linux-gnueabi
230+
#- arch: armhf
231+
# compiler: arm-linux-gnueabihf
232+
#- arch: arm64
233+
# compiler: aarch64-linux-gnu
234+
runs-on: ubuntu-latest
235+
name: Build with ${{ matrix.feat }} for ${{ matrix.arch }}
236+
container:
237+
image: debian:trixie-slim
238+
env:
239+
GH_VERSION: 2.83.2
240+
steps:
241+
- name: Setup base tools
242+
run: |
243+
apt-get update -q -y
244+
apt-get install -q -y --no-install-recommends git ca-certificates curl file zip
245+
- uses: actions/checkout@v4
246+
- name: Fix Ownership issue
247+
run: git config --global --add safe.directory $GITHUB_WORKSPACE
248+
- name: Add Architecture
249+
run: |
250+
dpkg --add-architecture ${{ matrix.arch }}
251+
apt-get update -q -y
252+
- name: Setup build tools
253+
run: apt-get install -q -y --no-install-recommends cmake ninja-build
254+
- name: Setup GH cli
255+
run: |
256+
curl -L -O https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_amd64.deb
257+
dpkg -i gh_${GH_VERSION}_linux_amd64.deb
258+
- name: Setup compiler
259+
run: apt-get install -q -y gcc-${{ matrix.compiler }}
260+
- name: Purge conflicting dev that confuse cross linking
261+
run: apt-get purge -y libssl-dev libusb-1.0-0-dev
262+
- name: Install deps
263+
if: matrix.feat != 'soapysdr'
264+
run: apt-get install -q -y librtlsdr-dev:${{ matrix.arch }} libssl-dev:${{ matrix.arch }}
265+
- name: Install deps
266+
if: matrix.feat == 'soapysdr'
267+
run: apt-get install -q -y librtlsdr-dev:${{ matrix.arch }} libssl-dev:${{ matrix.arch }} libsoapysdr-dev:${{ matrix.arch }}
268+
- name: Configure
269+
run: cmake -DCMAKE_TOOLCHAIN_FILE="$(pwd)/cmake/Toolchain-${{ matrix.compiler }}.cmake" -GNinja -B build
270+
- name: Build
271+
run: cmake --build build
272+
- name: Check final binary
273+
run: file build/src/rtl_433
274+
- name: Check final binary
275+
run: ${{ matrix.compiler }}-readelf -a build/src/rtl_433 | grep "Shared library:"
276+
- name: "Upload Release Asset"
277+
env:
278+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
279+
ZIP_FILE: rtl_433-${{ matrix.feat }}-Linux-${{ matrix.arch }}-${{ needs.release_job.outputs.release_version }}.zip
280+
run: |
281+
zip --junk-paths $ZIP_FILE build/src/rtl_433
282+
gh release upload ${{ needs.release_job.outputs.release_version }} $ZIP_FILE
283+
220284
build_mingw_job:
221285
needs: release_job
222286
if: ${{ needs.release_job.result != 'failure' }}
Lines changed: 4 additions & 0 deletions
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-gnueabi-gcc)
4+
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabi-g++)

0 commit comments

Comments
 (0)