soapy: Use the new IOCTL call on enumeration #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SoapySDR module build tests | |
on: | |
pull_request: | |
paths: | |
- "software/soapy/**" | |
branches: [ "v2" ] | |
push: | |
paths: | |
- "software/soapy/**" | |
branches: [ "v2" ] | |
workflow_dispatch: | |
env: | |
SOAPY_BRANCH: "soapy-sdr-0.8.1" | |
SOAPY_VERSION: "0.8" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- arch: amd64 | |
lib-arch: x86_64 | |
- arch: arm64 | |
lib-arch: aarch64 | |
steps: | |
- name: Update install | |
run: | |
sudo apt-get update | |
timeout-minutes: 5 | |
- name: Install build dependencies | |
run: | | |
if [[ "${{matrix.arch}}" == "amd64" ]]; then | |
# Native | |
sudo apt-get install build-essential | |
elif [[ "${{matrix.arch}}" == "arm64" ]]; then | |
# 64-bit ARM | |
sudo apt-get install crossbuild-essential-arm64 | |
fi | |
sudo apt-get install cmake | |
timeout-minutes: 5 | |
- name: Install SoapySDR | |
run: | | |
git clone --depth=1 --branch $SOAPY_BRANCH https://github.com/pothosware/SoapySDR | |
cd SoapySDR | |
mkdir build | |
cd build | |
if [[ "${{matrix.arch}}" == "amd64" ]]; then | |
# Native | |
cmake \ | |
-D ENABLE_APPS=OFF \ | |
-D ENABLE_LIBRARY=ON \ | |
-D ENABLE_PYTHON=OFF \ | |
-D ENABLE_PYTHON3=OFF \ | |
-D ENABLE_TESTS=OFF \ | |
.. | |
elif [[ "${{matrix.arch}}" == "arm64" ]]; then | |
# 64-bit ARM | |
CROSS_COMPILE=aarch64-linux-gnu- | |
cmake \ | |
-D ENABLE_APPS=OFF \ | |
-D ENABLE_LIBRARY=ON \ | |
-D ENABLE_PYTHON=OFF \ | |
-D ENABLE_PYTHON3=OFF \ | |
-D ENABLE_TESTS=OFF \ | |
-D CMAKE_C_COMPILER=${CROSS_COMPILE}gcc \ | |
-D CMAKE_CXX_COMPILER=${CROSS_COMPILE}g++ \ | |
-D CMAKE_AR=${CROSS_COMPILE}ar \ | |
-D CMAKE_C_COMPILER_AR=${CROSS_COMPILE}gcc-ar \ | |
-D CMAKE_C_COMPILER_RANLIB=${CROSS_COMPILE}gcc-ranlib \ | |
-D CMAKE_LINKER=${CROSS_COMPILE}ld \ | |
-D CMAKE_NM=${CROSS_COMPILE}nm \ | |
-D CMAKE_OBJCOPY=${CROSS_COMPILE}objcopy \ | |
-D CMAKE_OBJDUMP=${CROSS_COMPILE}objdump \ | |
-D CMAKE_RANLIB=${CROSS_COMPILE}ranlib \ | |
-D CMAKE_STRIP=${CROSS_COMPILE}strip \ | |
.. | |
fi | |
make -j$(nproc) | |
sudo make install | |
sudo ldconfig | |
timeout-minutes: 5 | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
clean: true | |
- name: Build SoapySDR module (${{matrix.arch}}) | |
run: | | |
cd ${{github.workspace}}/software/soapy | |
mkdir build | |
cd build | |
if [[ "${{matrix.arch}}" == "amd64" ]]; then | |
# Native | |
cmake .. | |
elif [[ "${{matrix.arch}}" == "arm64" ]]; then | |
# 64-bit ARM | |
CROSS_COMPILE=aarch64-linux-gnu- | |
cmake \ | |
-D CMAKE_C_COMPILER=${CROSS_COMPILE}gcc \ | |
-D CMAKE_CXX_COMPILER=${CROSS_COMPILE}g++ \ | |
-D CMAKE_AR=${CROSS_COMPILE}ar \ | |
-D CMAKE_C_COMPILER_AR=${CROSS_COMPILE}gcc-ar \ | |
-D CMAKE_C_COMPILER_RANLIB=${CROSS_COMPILE}gcc-ranlib \ | |
-D CMAKE_LINKER=${CROSS_COMPILE}ld \ | |
-D CMAKE_NM=${CROSS_COMPILE}nm \ | |
-D CMAKE_OBJCOPY=${CROSS_COMPILE}objcopy \ | |
-D CMAKE_OBJDUMP=${CROSS_COMPILE}objdump \ | |
-D CMAKE_RANLIB=${CROSS_COMPILE}ranlib \ | |
-D CMAKE_STRIP=${CROSS_COMPILE}strip \ | |
.. | |
fi | |
make -j$(nproc) | |
- name: Make deb package (${{matrix.arch}}) | |
run: | | |
mkdir deb | |
mkdir deb/DEBIAN | |
cp ${{github.workspace}}/software/soapy/.deb/* deb/DEBIAN/ | |
echo "Architecture: ${{matrix.arch}}" >> deb/DEBIAN/control | |
echo "" >> deb/DEBIAN/control | |
mkdir -p deb/usr/lib/${{matrix.lib-arch}}-linux-gnu/SoapySDR/modules${SOAPY_VERSION} | |
cp ${{github.workspace}}/software/soapy/build/libIcyRadioSupport.so deb/usr/lib/${{matrix.lib-arch}}-linux-gnu/SoapySDR/modules${SOAPY_VERSION} | |
dpkg-deb --build --root-owner-group ./deb ${{github.workspace}}/software/soapy/soapysdr-module-icyradio_${{matrix.arch}}.deb | |
- name: Upload results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: soapy_module_${{matrix.arch}} | |
path: | | |
${{github.workspace}}/software/soapy/build/libIcyRadioSupport.so | |
${{github.workspace}}/software/soapy/soapysdr-module-icyradio_${{matrix.arch}}.deb | |
retention-days: 30 |