Android: #60
This file contains hidden or 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: Build Binaries | |
| on: | |
| push: | |
| branches-ignore: | |
| - nightly | |
| tags: | |
| - 'v[0-9]*.[0-9]*.[0-9]*' | |
| pull_request: | |
| branches-ignore: | |
| - nightly | |
| workflow_dispatch: | |
| permissions: | |
| contents: write # Required for creating releases and uploading files | |
| actions: read # Standard workflow permission | |
| env: | |
| # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
| BUILD_TYPE: Release | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| get_version: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.read.outputs.version }} | |
| version_full: ${{ steps.read.outputs.version_full }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Read version | |
| id: read | |
| run: | | |
| version=$(grep -oE '"[0-9]+\.[0-9]+\.[0-9]+(-(alpha|beta|rc)[0-9]*)?"' core/src/version.h | tr -d '"') | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| describe=$(git describe --tags --long --match "v[0-9]*.[0-9]*.[0-9]*" 2>/dev/null || true) | |
| if [ -n "$describe" ]; then | |
| build_info=$(echo "$describe" | grep -oE '[0-9]+-g[0-9a-f]+$') | |
| count=$(echo "$build_info" | grep -oE '^[0-9]+') | |
| else | |
| count=$(git rev-list --count HEAD) | |
| hash=$(git rev-parse --short HEAD) | |
| build_info="${count}-g${hash}" | |
| fi | |
| if [ "$count" = "0" ]; then | |
| version_full="$version" | |
| else | |
| version_full="${version}+${build_info}" | |
| fi | |
| echo "version_full=$version_full" >> $GITHUB_OUTPUT | |
| validate_tag: | |
| # On tag pushes, verify the tag matches the version in version.h before building anything. | |
| needs: [get_version] | |
| if: github.ref_type == 'tag' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check tag vs version.h | |
| env: | |
| TAG: ${{ github.ref_name }} | |
| HEADER_VER: ${{ needs.get_version.outputs.version }} | |
| run: | | |
| EXPECTED="v${HEADER_VER}" | |
| if [ "$TAG" != "$EXPECTED" ]; then | |
| echo "ERROR: tag '${TAG}' does not match version.h ('${EXPECTED}')" | |
| exit 1 | |
| fi | |
| echo "Tag ${TAG} matches version.h — OK" | |
| build_windows: | |
| needs: [get_version] | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Create Build Environment | |
| run: cmake -E make_directory ${{runner.workspace}}/build | |
| - name: Download PothosSDR | |
| run: Invoke-WebRequest -Uri "https://downloads.myriadrf.org/builds/PothosSDR/PothosSDR-2020.01.26-vc14-x64.exe" -OutFile ${{runner.workspace}}/pothos.exe | |
| - name: Install PothosSDR | |
| run: mkdir "C:/Program Files/PothosSDR" ; 7z x ${{runner.workspace}}/pothos.exe -o"C:/Program Files/PothosSDR/" | |
| - name: Download libusb | |
| run: Invoke-WebRequest -Uri "https://github.com/libusb/libusb/releases/download/v1.0.23/libusb-1.0.23.7z" -OutFile ${{runner.workspace}}/libusb.7z | |
| - name: Patch Pothos with earlier libusb version | |
| working-directory: ${{runner.workspace}} | |
| run: 7z x libusb.7z -olibusb_old ; rm "C:/Program Files/PothosSDR/bin/libusb-1.0.dll" ; cp "libusb_old/MS64/dll/libusb-1.0.dll" "C:/Program Files/PothosSDR/bin/" ; rm "C:/Program Files/PothosSDR/lib/libusb-1.0.lib" ; cp "libusb_old/MS64/dll/libusb-1.0.lib" "C:/Program Files/PothosSDR/lib/" | |
| - name: Download librtlsdr | |
| run: Invoke-WebRequest -Uri "https://ftp.osmocom.org/binaries/windows/rtl-sdr/rtl-sdr-64bit-20240623.zip" -OutFile ${{runner.workspace}}/rtl-sdr.zip | |
| - name: Patch Pothos with newer librtlsdr version | |
| working-directory: ${{runner.workspace}} | |
| run: 7z x rtl-sdr.zip ; rm "C:/Program Files/PothosSDR/bin/rtlsdr.dll" ; cp "rtl-sdr-64bit-20240623/librtlsdr.dll" "C:/Program Files/PothosSDR/bin/rtlsdr.dll" | |
| - name: Download SDRPlay API | |
| run: Invoke-WebRequest -Uri "https://www.sdrpp.org/SDRplay.zip" -OutFile ${{runner.workspace}}/SDRplay.zip | |
| - name: Install SDRPlay API | |
| run: 7z x ${{runner.workspace}}/SDRplay.zip -o"C:/Program Files/" | |
| - name: Download codec2 | |
| run: git clone https://github.com/drowe67/codec2 | |
| - name: Prepare MinGW | |
| run: C:/msys64/msys2_shell.cmd -defterm -here -no-start -mingw64 -c "pacman --noconfirm -S --needed base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja" | |
| - name: Prepare build for codec2 | |
| run: cd codec2 ; mkdir build ; cd build ; C:/msys64/msys2_shell.cmd -defterm -here -no-start -mingw64 -c "cmake .. -DCMAKE_GNUtoMS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-static-libgcc" | |
| - name: Build codec2 | |
| run: cd codec2/build ; C:/msys64/msys2_shell.cmd -defterm -here -no-start -mingw64 -c "ninja" | |
| - name: Install codec2 | |
| run: mkdir "C:/Program Files/codec2" ; mkdir "C:/Program Files/codec2/include" ; mkdir "C:/Program Files/codec2/include/codec2" ; mkdir "C:/Program Files/codec2/lib" ; cd "codec2" ; xcopy "src" "C:/Program Files/codec2/include" ; cd "build" ; xcopy "src" "C:/Program Files/codec2/lib" ; xcopy "codec2" "C:/Program Files/codec2/include/codec2" | |
| - name: Install vcpkg dependencies | |
| run: vcpkg install fftw3:x64-windows glfw3:x64-windows portaudio:x64-windows zstd:x64-windows libusb:x64-windows spdlog:x64-windows pthreads | |
| - name: Install rtaudio | |
| run: git clone https://github.com/thestk/rtaudio ; cd rtaudio ; git checkout 2f2fca4502d506abc50f6d4473b2836d24cfb1e3 ; mkdir build ; cd build ; cmake .. ; cmake --build . --config Release ; cmake --install . | |
| - name: Install libperseus-sdr | |
| run: git clone https://github.com/AlexandreRouma/libperseus-sdr ; cd libperseus-sdr ; mkdir build ; cd build ; cmake -DCMAKE_BUILD_TYPE=Release "-DLIBUSB_LIBRARIES=C:/Program Files/PothosSDR/lib/libusb-1.0.lib" "-DLIBUSB_INCLUDE_DIRS=C:/Program Files/PothosSDR/include/libusb-1.0" .. "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" ; cmake --build . --config Release ; mkdir "C:/Program Files/PothosSDR/include/perseus-sdr" ; cp Release/perseus-sdr.dll "C:/Program Files/PothosSDR/bin" ; cp Release/perseus-sdr.lib "C:/Program Files/PothosSDR/bin" ; cd .. ; xcopy "src" "C:/Program Files/PothosSDR/include/perseus-sdr" | |
| - name: Install librfnm | |
| run: git clone https://github.com/AlexandreRouma/librfnm ; cd librfnm ; mkdir build ; cd build ; cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" ; cmake --build . --config Release ; cmake --install . | |
| - name: Install libfobos | |
| run: git clone https://github.com/AlexandreRouma/libfobos ; cd libfobos ; mkdir build ; cd build ; cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" ; cmake --build . --config Release ; cmake --install . | |
| - name: Install libhydrasdr | |
| run: | | |
| git clone https://github.com/hydrasdr/hydrasdr-host | |
| cd hydrasdr-host | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Release ` | |
| "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" ` | |
| -DVCPKG_TARGET_TRIPLET=x64-windows ` | |
| "-DLIBUSB_LIBRARIES=C:\Program Files\PothosSDR\lib\libusb-1.0.lib" ` | |
| "-DLIBUSB_INCLUDE_DIR=C:\Program Files\PothosSDR\include\libusb-1.0" ` | |
| "-DTHREADS_PTHREADS_INCLUDE_DIR=C:/vcpkg/installed/x64-windows/include" ` | |
| "-DTHREADS_PTHREADS_WIN32_LIBRARY=C:/vcpkg/installed/x64-windows/lib/pthreadVC3.lib" | |
| cmake --build . --config Release | |
| cmake --install . | |
| - name: Install HydraSDR RFOne Headers and Libraries | |
| run: | | |
| # Create directories | |
| New-Item -ItemType Directory -Path "C:/Program Files/PothosSDR/include" -Force | |
| New-Item -ItemType Directory -Path "C:/Program Files/PothosSDR/lib" -Force | |
| New-Item -ItemType Directory -Path "C:/Program Files/PothosSDR/bin" -Force | |
| # Find and copy hydrasdr headers | |
| cd hydrasdr-host | |
| $headers = Get-ChildItem -Recurse -Filter "hydrasdr*.h" | |
| foreach ($header in $headers) { | |
| Copy-Item $header.FullName "C:/Program Files/PothosSDR/include/" | |
| Write-Host "Copied header: $($header.Name)" | |
| } | |
| # Copy built libraries from build directory | |
| cd build | |
| $libraries = Get-ChildItem -Recurse -Filter "*hydrasdr*" | Where-Object { $_.Extension -in @('.lib', '.dll') } | |
| foreach ($lib in $libraries) { | |
| if ($lib.Extension -eq '.dll') { | |
| Copy-Item $lib.FullName "C:/Program Files/PothosSDR/bin/" | |
| } else { | |
| Copy-Item $lib.FullName "C:/Program Files/PothosSDR/lib/" | |
| } | |
| Write-Host "Copied library: $($lib.Name)" | |
| } | |
| # Copy pthreadVC3.dll from vcpkg to PothosSDR bin directory | |
| Copy-Item "C:/vcpkg/installed/x64-windows/bin/pthreadVC3.dll" "C:/Program Files/PothosSDR/bin/" | |
| - name: Install libhydrasdr | |
| run: git clone https://github.com/hydrasdr/rfone_host; cd rfone_host/ ; mkdir build ; cd build ; cmake .. -DCMAKE_BUILD_TYPE=Release "-DLIBUSB_LIBRARIES=C:\Program Files\PothosSDR\lib\libusb-1.0.lib" "-DLIBUSB_INCLUDE_DIR=C:\Program Files\PothosSDR\include\libusb-1.0" "-DTHREADS_PTHREADS_WIN32_LIBRARY=C:\Program Files\PothosSDR\lib\pthreadVC2.lib" "-DTHREADS_PTHREADS_INCLUDE_DIR=C:\Program Files\PothosSDR\include" ; cmake --build . --config Release ; cmake --install . | |
| - name: Prepare CMake | |
| working-directory: ${{runner.workspace}}/build | |
| run: cmake -DCOPY_MSVC_REDISTRIBUTABLES=ON "$Env:GITHUB_WORKSPACE" "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DOPT_BUILD_BLADERF_SOURCE=ON -DOPT_BUILD_LIMESDR_SOURCE=ON -DOPT_BUILD_PERSEUS_SOURCE=ON -DOPT_BUILD_SDRPLAY_SOURCE=ON -DOPT_BUILD_NEW_PORTAUDIO_SINK=ON -DOPT_BUILD_M17_DECODER=ON -DOPT_BUILD_RFNM_SOURCE=ON -DOPT_BUILD_FOBOSSDR_SOURCE=ON -DOPT_BUILD_HYDRASDR_RFONE_SOURCE=ON | |
| - name: Build | |
| working-directory: ${{runner.workspace}}/build | |
| run: cmake --build . --config Release --verbose | |
| - name: Create Archive | |
| working-directory: ${{runner.workspace}} | |
| run: '&($Env:GITHUB_WORKSPACE + "/make_windows_package.ps1") ./build ($Env:GITHUB_WORKSPACE + "/root")' | |
| - name: Save Archive | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdrpp-iak-${{ needs.get_version.outputs.version_full }}-windows-x64 | |
| path: ${{runner.workspace}}/sdrpp_windows_x64.zip | |
| build_macos_intel: | |
| needs: [get_version] | |
| runs-on: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Create Build Environment | |
| run: cmake -E make_directory ${{runner.workspace}}/build | |
| - name: Install dependencies | |
| run: brew install pkg-config libusb fftw glfw airspy airspyhf portaudio hackrf libbladerf codec2 zstd autoconf automake libtool spdlog && pip3 install mako --break-system-packages | |
| - name: Install volk | |
| run: git clone --recursive https://github.com/gnuradio/volk && cd volk && mkdir build && cd build && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ | |
| - name: Install SDRplay API | |
| run: wget https://www.sdrplay.com/software/SDRplayAPI-macos-installer-universal-3.15.0.pkg && sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg -target / | |
| - name: Install libiio | |
| run: wget https://github.com/analogdevicesinc/libiio/archive/refs/tags/v0.25.zip && 7z x v0.25.zip && cd libiio-0.25 && mkdir build && cd build && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ | |
| - name: Install libad9361 | |
| run: git clone https://github.com/analogdevicesinc/libad9361-iio && cd libad9361-iio && mkdir build && cd build && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 .. && make -j3 && sudo make install && cd ../../ | |
| - name: Install LimeSuite | |
| run: git clone https://github.com/myriadrf/LimeSuite && cd LimeSuite && mkdir builddir && cd builddir && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ | |
| - name: Install libperseus | |
| run: git clone https://github.com/Microtelecom/libperseus-sdr && cd libperseus-sdr && autoreconf -i && ./configure --prefix=/usr/local && make && sudo make install && cd .. | |
| - name: Install librfnm | |
| run: git clone https://github.com/AlexandreRouma/librfnm && cd librfnm && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make && sudo make install && cd .. | |
| - name: Install libfobos | |
| run: git clone https://github.com/AlexandreRouma/libfobos && cd libfobos && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make && sudo make install && cd .. | |
| - name: Install more recent librtlsdr | |
| run: git clone https://github.com/osmocom/rtl-sdr && cd rtl-sdr && mkdir build && cd build && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release .. && make -j3 LIBRARY_PATH=$(pkg-config --libs-only-L libusb-1.0 | sed 's/\-L//') && sudo make install && cd ../../ | |
| - name: Install libhydrasdr | |
| run: git clone https://github.com/hydrasdr/hydrasdr-host && cd hydrasdr-host && mkdir build && cd build && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ | |
| - name: Prepare CMake | |
| working-directory: ${{runner.workspace}}/build | |
| run: cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 $GITHUB_WORKSPACE -DOPT_BUILD_PLUTOSDR_SOURCE=ON -DOPT_BUILD_BLADERF_SOURCE=ON -DOPT_BUILD_SDRPLAY_SOURCE=ON -DOPT_BUILD_LIMESDR_SOURCE=ON -DOPT_BUILD_AUDIO_SINK=OFF -DOPT_BUILD_PORTAUDIO_SINK=ON -DOPT_BUILD_NEW_PORTAUDIO_SINK=ON -DOPT_BUILD_M17_DECODER=ON -DOPT_BUILD_PERSEUS_SOURCE=ON -DOPT_BUILD_AUDIO_SOURCE=OFF -DOPT_BUILD_RFNM_SOURCE=ON -DOPT_BUILD_FOBOSSDR_SOURCE=ON -DOPT_BUILD_HYDRASDR_RFONE_SOURCE=ON -DUSE_BUNDLE_DEFAULTS=ON -DCMAKE_BUILD_TYPE=Release | |
| - name: Build | |
| working-directory: ${{runner.workspace}}/build | |
| run: make VERBOSE=1 -j3 | |
| - name: Create Archive | |
| working-directory: ${{runner.workspace}} | |
| run: cd $GITHUB_WORKSPACE && sh make_macos_bundle.sh ${{runner.workspace}}/build ./SDR++.app && zip -r ${{runner.workspace}}/sdrpp_macos_intel.zip SDR++.app | |
| - name: Save Archive | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdrpp-iak-${{ needs.get_version.outputs.version_full }}-macos-intel | |
| path: ${{runner.workspace}}/sdrpp_macos_intel.zip | |
| build_macos_arm: | |
| needs: [get_version] | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Create Build Environment | |
| run: cmake -E make_directory ${{runner.workspace}}/build | |
| - name: Install dependencies | |
| run: brew install pkg-config libusb fftw glfw airspy airspyhf portaudio hackrf libbladerf codec2 zstd autoconf automake libtool spdlog && pip3 install mako --break-system-packages | |
| - name: Install volk | |
| run: git clone --recursive https://github.com/gnuradio/volk && cd volk && mkdir build && cd build && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ | |
| - name: Install SDRplay API | |
| run: wget https://www.sdrplay.com/software/SDRplayAPI-macos-installer-universal-3.15.0.pkg && sudo installer -pkg SDRplayAPI-macos-installer-universal-3.15.0.pkg -target / | |
| - name: Install libiio | |
| run: wget https://github.com/analogdevicesinc/libiio/archive/refs/tags/v0.25.zip && 7z x v0.25.zip && cd libiio-0.25 && mkdir build && cd build && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ | |
| - name: Install libad9361 | |
| run: git clone https://github.com/analogdevicesinc/libad9361-iio && cd libad9361-iio && mkdir build && cd build && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 .. && make -j3 && sudo make install && cd ../../ | |
| - name: Install LimeSuite | |
| run: git clone https://github.com/myriadrf/LimeSuite && cd LimeSuite && mkdir builddir && cd builddir && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ | |
| # - name: Install libperseus | |
| # run: git clone https://github.com/Microtelecom/libperseus-sdr && cd libperseus-sdr && autoreconf -i && ./configure --prefix=/usr/local && make && make install && cd .. | |
| - name: Install librfnm | |
| run: git clone https://github.com/AlexandreRouma/librfnm && cd librfnm && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make && sudo make install && cd .. | |
| - name: Install libfobos | |
| run: git clone https://github.com/AlexandreRouma/libfobos && cd libfobos && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make && sudo make install && cd .. | |
| - name: Install more recent librtlsdr | |
| run: git clone https://github.com/osmocom/rtl-sdr && cd rtl-sdr && mkdir build && cd build && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release .. && make -j3 LIBRARY_PATH=$(pkg-config --libs-only-L libusb-1.0 | sed 's/\-L//') && sudo make install && cd ../../ | |
| - name: Install libhydrasdr | |
| run: git clone https://github.com/hydrasdr/hydrasdr-host && cd hydrasdr-host && mkdir build && cd build && cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ | |
| - name: Prepare CMake | |
| working-directory: ${{runner.workspace}}/build | |
| run: cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 $GITHUB_WORKSPACE -DOPT_BUILD_PLUTOSDR_SOURCE=ON -DOPT_BUILD_BLADERF_SOURCE=ON -DOPT_BUILD_SDRPLAY_SOURCE=ON -DOPT_BUILD_LIMESDR_SOURCE=ON -DOPT_BUILD_AUDIO_SINK=OFF -DOPT_BUILD_PORTAUDIO_SINK=ON -DOPT_BUILD_NEW_PORTAUDIO_SINK=ON -DOPT_BUILD_M17_DECODER=OFF -DOPT_BUILD_PERSEUS_SOURCE=OFF -DOPT_BUILD_AUDIO_SOURCE=OFF -DOPT_BUILD_RFNM_SOURCE=ON -DOPT_BUILD_FOBOSSDR_SOURCE=ON -DOPT_BUILD_HYDRASDR_RFONE_SOURCE=ON -DUSE_BUNDLE_DEFAULTS=ON -DCMAKE_BUILD_TYPE=Release | |
| - name: Build | |
| working-directory: ${{runner.workspace}}/build | |
| run: make VERBOSE=1 -j3 | |
| - name: Create Archive | |
| working-directory: ${{runner.workspace}} | |
| run: cd $GITHUB_WORKSPACE && sh make_macos_bundle.sh ${{runner.workspace}}/build ./SDR++.app && zip -r ${{runner.workspace}}/sdrpp_macos_arm.zip SDR++.app | |
| - name: Save Archive | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdrpp-iak-${{ needs.get_version.outputs.version_full }}-macos-arm | |
| path: ${{runner.workspace}}/sdrpp_macos_arm.zip | |
| build_linux: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - base_image: debian:bullseye | |
| runner: ubuntu-latest | |
| artifact: debian-bullseye-amd64 | |
| volk_package: libvolk2-dev | |
| extra_apt: '' | |
| - base_image: debian:bullseye | |
| runner: ubuntu-24.04-arm | |
| artifact: debian-bullseye-aarch64 | |
| volk_package: libvolk2-dev | |
| extra_apt: '' | |
| - base_image: debian:bookworm | |
| runner: ubuntu-latest | |
| artifact: debian-bookworm-amd64 | |
| volk_package: libvolk2-dev | |
| extra_apt: '' | |
| - base_image: debian:bookworm | |
| runner: ubuntu-24.04-arm | |
| artifact: debian-bookworm-aarch64 | |
| volk_package: libvolk2-dev | |
| extra_apt: '' | |
| - base_image: debian:trixie | |
| runner: ubuntu-latest | |
| artifact: debian-trixie-amd64 | |
| volk_package: libvolk-dev | |
| extra_apt: '' | |
| - base_image: debian:trixie | |
| runner: ubuntu-24.04-arm | |
| artifact: debian-trixie-aarch64 | |
| volk_package: libvolk-dev | |
| extra_apt: '' | |
| - base_image: debian:sid | |
| runner: ubuntu-latest | |
| artifact: debian-sid-amd64 | |
| volk_package: libvolk-dev | |
| extra_apt: ca-certificates | |
| - base_image: debian:sid | |
| runner: ubuntu-24.04-arm | |
| artifact: debian-sid-aarch64 | |
| volk_package: libvolk-dev | |
| extra_apt: ca-certificates | |
| - base_image: ubuntu:focal | |
| runner: ubuntu-latest | |
| artifact: ubuntu-focal-amd64 | |
| volk_package: libvolk2-dev | |
| extra_apt: '' | |
| - base_image: ubuntu:focal | |
| runner: ubuntu-24.04-arm | |
| artifact: ubuntu-focal-aarch64 | |
| volk_package: libvolk2-dev | |
| extra_apt: '' | |
| - base_image: ubuntu:jammy | |
| runner: ubuntu-latest | |
| artifact: ubuntu-jammy-amd64 | |
| volk_package: libvolk2-dev | |
| extra_apt: '' | |
| - base_image: ubuntu:jammy | |
| runner: ubuntu-24.04-arm | |
| artifact: ubuntu-jammy-aarch64 | |
| volk_package: libvolk2-dev | |
| extra_apt: '' | |
| - base_image: ubuntu:noble | |
| runner: ubuntu-latest | |
| artifact: ubuntu-noble-amd64 | |
| volk_package: libvolk-dev | |
| extra_apt: '' | |
| - base_image: ubuntu:noble | |
| runner: ubuntu-24.04-arm | |
| artifact: ubuntu-noble-aarch64 | |
| volk_package: libvolk-dev | |
| extra_apt: '' | |
| needs: [get_version] | |
| uses: ./.github/workflows/build_linux.yml | |
| with: | |
| base_image: ${{ matrix.base_image }} | |
| runner: ${{ matrix.runner }} | |
| artifact: sdrpp-iak-${{ needs.get_version.outputs.version_full }}-${{ matrix.artifact }} | |
| volk_package: ${{ matrix.volk_package }} | |
| extra_apt: ${{ matrix.extra_apt }} | |
| build_android: | |
| needs: [get_version] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Fetch container | |
| working-directory: ${{runner.workspace}} | |
| run: git clone https://github.com/bubnikv/android-sdr-kit-iak android-sdr-kit | |
| - name: Build container | |
| working-directory: ${{runner.workspace}}/android-sdr-kit | |
| run: docker build --progress=plain -t android-sdr-kit . | |
| - name: Build Debug APKs | |
| run: docker run --name build -v $GITHUB_WORKSPACE:/root/SDRPlusPlus android-sdr-kit /bin/bash -l -c "cd /root/SDRPlusPlus/android && gradle --info assembleArmDebug assembleX86Debug" | |
| - name: Recover Debug APKs | |
| working-directory: ${{runner.workspace}} | |
| run: | | |
| docker cp build:/root/SDRPlusPlus/android/app/build/outputs/apk/arm/debug/app-arm-debug.apk ./sdrpp_arm_debug.apk | |
| docker cp build:/root/SDRPlusPlus/android/app/build/outputs/apk/x86/debug/app-x86-debug.apk ./sdrpp_x86_debug.apk | |
| - name: Save ARM Debug APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdrpp-iak-${{ needs.get_version.outputs.version_full }}-android-arm-debug | |
| path: ${{runner.workspace}}/sdrpp_arm_debug.apk | |
| - name: Save x86 Debug APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdrpp-iak-${{ needs.get_version.outputs.version_full }}-android-x86-debug | |
| path: ${{runner.workspace}}/sdrpp_x86_debug.apk | |
| - name: Decode Keystore | |
| id: check_signing | |
| run: | | |
| if [ -n "$ANDROID_KEYSTORE_BASE64" ]; then | |
| echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > ${{runner.workspace}}/release.keystore | |
| echo "has_keystore=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_keystore=false" >> $GITHUB_OUTPUT | |
| fi | |
| env: | |
| ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
| - name: Build Signed Release APKs | |
| if: steps.check_signing.outputs.has_keystore == 'true' | |
| env: | |
| ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
| ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
| ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| run: | | |
| docker rm build | |
| docker run --name build_release \ | |
| -e ANDROID_KEYSTORE_FILE=/root/release.keystore \ | |
| -e ANDROID_KEYSTORE_PASSWORD="$ANDROID_KEYSTORE_PASSWORD" \ | |
| -e ANDROID_KEY_ALIAS="$ANDROID_KEY_ALIAS" \ | |
| -e ANDROID_KEY_PASSWORD="$ANDROID_KEY_PASSWORD" \ | |
| -v $GITHUB_WORKSPACE:/root/SDRPlusPlus \ | |
| -v ${{runner.workspace}}/release.keystore:/root/release.keystore \ | |
| android-sdr-kit /bin/bash -l -c "cd /root/SDRPlusPlus/android && gradle --info assembleArmRelease assembleX86Release" | |
| - name: Recover Release APKs | |
| if: steps.check_signing.outputs.has_keystore == 'true' | |
| working-directory: ${{runner.workspace}} | |
| run: | | |
| docker cp build_release:/root/SDRPlusPlus/android/app/build/outputs/apk/arm/release/app-arm-release.apk ./sdrpp_arm_release.apk | |
| docker cp build_release:/root/SDRPlusPlus/android/app/build/outputs/apk/x86/release/app-x86-release.apk ./sdrpp_x86_release.apk | |
| - name: Save ARM Release APK | |
| if: steps.check_signing.outputs.has_keystore == 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdrpp-iak-${{ needs.get_version.outputs.version_full }}-android-arm-release | |
| path: ${{runner.workspace}}/sdrpp_arm_release.apk | |
| - name: Save x86 Release APK | |
| if: steps.check_signing.outputs.has_keystore == 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdrpp-iak-${{ needs.get_version.outputs.version_full }}-android-x86-release | |
| path: ${{runner.workspace}}/sdrpp_x86_release.apk | |
| create_full_archive: | |
| needs: [ | |
| 'get_version', | |
| 'build_windows', | |
| 'build_macos_intel', | |
| 'build_macos_arm', | |
| 'build_linux', | |
| 'build_android' | |
| ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download All Builds | |
| uses: actions/download-artifact@v4 | |
| - name: Create Archive | |
| env: | |
| VER: ${{ needs.get_version.outputs.version_full }} | |
| run: | | |
| mkdir sdrpp_all | |
| git archive --format=tar.gz --prefix=sdrpp-iak-${VER}/ HEAD -o sdrpp_all/sdrpp-iak-${VER}-source.tar.gz | |
| mv sdrpp-iak-${VER}-windows-x64/sdrpp_windows_x64.zip sdrpp_all/sdrpp-iak-${VER}-windows-x64.zip | |
| mv sdrpp-iak-${VER}-macos-intel/sdrpp_macos_intel.zip sdrpp_all/sdrpp-iak-${VER}-macos-intel.zip | |
| mv sdrpp-iak-${VER}-macos-arm/sdrpp_macos_arm.zip sdrpp_all/sdrpp-iak-${VER}-macos-arm.zip | |
| mv sdrpp-iak-${VER}-debian-bullseye-amd64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-debian-bullseye-amd64.deb | |
| mv sdrpp-iak-${VER}-debian-bullseye-aarch64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-debian-bullseye-aarch64.deb | |
| mv sdrpp-iak-${VER}-debian-bookworm-amd64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-debian-bookworm-amd64.deb | |
| mv sdrpp-iak-${VER}-debian-bookworm-aarch64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-debian-bookworm-aarch64.deb | |
| mv sdrpp-iak-${VER}-debian-trixie-amd64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-debian-trixie-amd64.deb | |
| mv sdrpp-iak-${VER}-debian-trixie-aarch64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-debian-trixie-aarch64.deb | |
| mv sdrpp-iak-${VER}-debian-sid-amd64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-debian-sid-amd64.deb | |
| mv sdrpp-iak-${VER}-debian-sid-aarch64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-debian-sid-aarch64.deb | |
| mv sdrpp-iak-${VER}-ubuntu-focal-amd64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-ubuntu-focal-amd64.deb | |
| mv sdrpp-iak-${VER}-ubuntu-focal-aarch64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-ubuntu-focal-aarch64.deb | |
| mv sdrpp-iak-${VER}-ubuntu-jammy-amd64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-ubuntu-jammy-amd64.deb | |
| mv sdrpp-iak-${VER}-ubuntu-jammy-aarch64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-ubuntu-jammy-aarch64.deb | |
| mv sdrpp-iak-${VER}-ubuntu-noble-amd64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-ubuntu-noble-amd64.deb | |
| mv sdrpp-iak-${VER}-ubuntu-noble-aarch64/sdrpp_debian_amd64.deb sdrpp_all/sdrpp-iak-${VER}-ubuntu-noble-aarch64.deb | |
| mv sdrpp-iak-${VER}-android-arm-debug/sdrpp_arm_debug.apk sdrpp_all/sdrpp-iak-${VER}-android-arm-debug.apk | |
| mv sdrpp-iak-${VER}-android-x86-debug/sdrpp_x86_debug.apk sdrpp_all/sdrpp-iak-${VER}-android-x86-debug.apk | |
| [ -d sdrpp-iak-${VER}-android-arm-release ] && mv sdrpp-iak-${VER}-android-arm-release/sdrpp_arm_release.apk sdrpp_all/sdrpp-iak-${VER}-android-arm-release.apk || true | |
| [ -d sdrpp-iak-${VER}-android-x86-release ] && mv sdrpp-iak-${VER}-android-x86-release/sdrpp_x86_release.apk sdrpp_all/sdrpp-iak-${VER}-android-x86-release.apk || true | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: sdrpp-iak-${{ needs.get_version.outputs.version_full }}-all | |
| path: sdrpp_all/ | |
| update_nightly_release: | |
| needs: [get_version, create_full_archive] | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
| steps: | |
| - name: Download All Builds | |
| uses: actions/download-artifact@v4 | |
| - name: Create or Update Nightly Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| VER: ${{ needs.get_version.outputs.version_full }} | |
| run: | | |
| NOTES="Nightly build — v${VER} (commit ${{ github.sha }}) built $(date -u '+%Y-%m-%d %H:%M UTC')" | |
| # Create the release if it does not exist yet | |
| gh release view nightly -R ${{github.repository}} 2>/dev/null || \ | |
| gh release create nightly -R ${{github.repository}} --title "Nightly Build" --notes "$NOTES" --prerelease | |
| # Always refresh the release notes so they reflect the latest commit | |
| gh release edit nightly -R ${{github.repository}} --notes "$NOTES" | |
| # Remove assets from the previous build that are no longer produced | |
| gh release view nightly -R ${{github.repository}} --json assets --jq '.assets[].name' | while read -r asset; do | |
| if [ -n "$asset" ] && [ ! -f "sdrpp-iak-${VER}-all/$asset" ]; then | |
| gh release delete-asset nightly "$asset" -R ${{github.repository}} --yes | |
| fi | |
| done | |
| # Upload artifacts (--clobber overwrites existing files with the same name) | |
| gh release upload nightly sdrpp-iak-${VER}-all/* -R ${{github.repository}} --clobber | |
| create_release: | |
| needs: [get_version, validate_tag, create_full_archive] | |
| runs-on: ubuntu-latest | |
| if: github.ref_type == 'tag' | |
| steps: | |
| - name: Download All Builds | |
| uses: actions/download-artifact@v4 | |
| - name: Publish GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| VER: ${{ needs.get_version.outputs.version_full }} | |
| run: | | |
| # Mark alpha/beta/rc tags as pre-releases on GitHub. | |
| PRERELEASE_FLAG="" | |
| if echo "${{ github.ref_name }}" | grep -qE '\-(alpha|beta|rc)[0-9]*$'; then | |
| PRERELEASE_FLAG="--prerelease" | |
| fi | |
| gh release create "${{ github.ref_name }}" \ | |
| sdrpp-iak-${VER}-all/* \ | |
| --title "SDR++ ${{ github.ref_name }}" \ | |
| --generate-notes \ | |
| $PRERELEASE_FLAG \ | |
| --repo ${{ github.repository }} | |
| check_spelling: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install codespell | |
| run: sudo apt update -y && sudo apt install -y codespell | |
| - name: Running codespell | |
| run: cd $GITHUB_WORKSPACE && codespell -q 2 || true | |
| check_formatting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run check_clang_format | |
| run: cd $GITHUB_WORKSPACE && chmod +x ./check_clang_format.sh && ./check_clang_format.sh || true |