diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index d47aa05781..0000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,270 +0,0 @@ -name: Build - -on: [push, pull_request] - -jobs: - appimage: - name: AppImage - runs-on: ubuntu-latest - container: - image: "ubuntu:18.04" - env: - DEBIAN_FRONTEND: noninteractive - APPIMAGE_EXTRACT_AND_RUN: "1" - steps: - - name: Install dependencies - run: | - apt-get update -qq - apt-get install -y --no-install-recommends software-properties-common - add-apt-repository -y ppa:gnuradio/gnuradio-releases - add-apt-repository -y ppa:git-core/ppa - apt-get install -y --no-install-recommends \ - git \ - build-essential \ - autoconf \ - automake \ - cmake \ - libtool \ - wget \ - qt5-default \ - qt5-gtk-platformtheme \ - qttranslations5-l10n \ - libqt5svg5-dev \ - libboost-dev \ - libpulse-dev \ - portaudio19-dev \ - liblog4cpp5-dev \ - gnuradio-dev \ - libairspy-dev \ - libairspyhf-dev \ - libfreesrp-dev \ - libhackrf-dev \ - libusb-1.0-0-dev \ - libsoapysdr-dev \ - soapysdr-module-remote \ - libuhd-dev \ - liborc-0.4-dev \ - libhidapi-dev - - cd /tmp - git clone https://gitea.osmocom.org/sdr/rtl-sdr.git - cd rtl-sdr - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr -DDETACH_KERNEL_DRIVER=ON .. - make -j4 - make install - ldconfig - - cd /tmp - git clone https://github.com/Nuand/bladeRF.git - cd bladeRF - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr .. - make -j4 - make install - ldconfig - - cd /tmp - git clone https://github.com/dl1ksv/gr-fcdproplus.git - cd gr-fcdproplus - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr .. - make -j4 - make install - ldconfig - - cd /tmp - git clone https://gitea.osmocom.org/sdr/libosmo-dsp.git - cd libosmo-dsp - autoreconf -i - ./configure --prefix=/usr - make -j4 - make install - ldconfig - - cd /tmp - git clone https://gitea.osmocom.org/sdr/gr-iqbal.git - cd gr-iqbal - git checkout gr3.8 - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_MODULES_DIR=/usr/lib/x86_64-linux-gnu/cmake .. - make -j4 - make install - ldconfig - - cd /tmp - git clone https://gitea.osmocom.org/sdr/gr-osmosdr.git - cd gr-osmosdr - git checkout origin/gr3.8 - git cherry-pick -n 9c09c90d920dd4906fa8bb9d8443eef84d2565a3 - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_MODULES_DIR=/usr/lib/x86_64-linux-gnu/cmake -DENABLE_PYTHON=False .. - make -j4 - make install - ldconfig - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Configure - run: | - git config --global --add safe.directory $GITHUB_WORKSPACE - mkdir build - cd build - cmake .. - - name: Compile - working-directory: build - run: make -j4 - - name: Build AppImage - run: ./appimage.sh - - name: Save artifact - uses: actions/upload-artifact@v3 - with: - name: gqrx-appimage-${{ github.run_id }} - path: Gqrx-*.AppImage - macos: - name: MacOS - runs-on: macos-12 - steps: - - name: Check for Secret availability - id: secret-check - run: | - if [ "${{ secrets.BUILD_CERTIFICATE_BASE64 }}" != '' ]; then - echo "available=true" >> $GITHUB_OUTPUT; - else - echo "available=false" >> $GITHUB_OUTPUT; - fi - - name: Install dependencies - run: | - brew update - brew install --HEAD librtlsdr - brew install airspy airspyhf boost dylibbundler gnuradio hackrf libbladerf libserialport portaudio pybind11 uhd qt@6 || true - brew tap pothosware/homebrew-pothos - brew install soapyremote - - cd /tmp - git clone https://github.com/analogdevicesinc/libiio.git - cd libiio - git checkout v0.23 - mkdir build - cd build - cmake .. - make -j4 - sudo make install - - cd /tmp - git clone https://github.com/analogdevicesinc/libad9361-iio.git - cd libad9361-iio - mkdir build - cd build - cmake .. - make -j4 - sudo make install - - cd /tmp - git clone https://github.com/pothosware/SoapyPlutoSDR.git - cd SoapyPlutoSDR - mkdir build - cd build - cmake .. - make -j4 - make install - - cd /tmp - cp /Library/Frameworks/iio.framework/iio /usr/local/lib/libiio.dylib - install_name_tool -id "/usr/local/lib/libiio.dylib" /usr/local/lib/libiio.dylib - cp /Library/Frameworks/ad9361.framework/ad9361 /usr/local/lib/libad9361.dylib - install_name_tool -id "/usr/local/lib/libad9361.dylib" /usr/local/lib/libad9361.dylib - install_name_tool -delete_rpath /Library/Frameworks /usr/local/lib/libad9361.dylib - install_name_tool -change @rpath/iio.framework/Versions/0.23/iio /usr/local/lib/libiio.dylib /usr/local/lib/libad9361.dylib - install_name_tool -change @rpath/iio.framework/Versions/0.23/iio /usr/local/lib/libiio.dylib /usr/local/lib/SoapySDR/modules0.*/libPlutoSDRSupport.so - install_name_tool -change @rpath/ad9361.framework/Versions/0.2/ad9361 /usr/local/lib/libad9361.dylib /usr/local/lib/SoapySDR/modules0.*/libPlutoSDRSupport.so - - cd /tmp - git clone https://gitea.osmocom.org/sdr/gr-iqbal.git - cd gr-iqbal - git submodule update --init --recursive - mkdir build - cd build - cmake .. - make -j4 - make install - - cd /tmp - git clone https://gitea.osmocom.org/sdr/gr-osmosdr.git - cd gr-osmosdr - mkdir build - cd build - cmake -DCMAKE_CXX_FLAGS=-Wno-register .. - LIBRARY_PATH=/usr/local/opt/icu4c/lib make -j4 - make install - - name: Install Apple certificate - if: ${{ steps.secret-check.outputs.available == 'true' }} - env: - BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} - P12_PASSWORD: ${{ secrets.P12_PASSWORD }} - KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} - run: | - CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 - KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db - - echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH - - security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH - security set-keychain-settings -lut 21600 $KEYCHAIN_PATH - security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH - - security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH - security list-keychain -d user -s $KEYCHAIN_PATH - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Configure - run: mkdir build && cd build && cmake .. - - name: Compile - working-directory: build - run: make -j4 - - name: Build app bundle - run: ./macos_bundle.sh ${{ steps.secret-check.outputs.available }} - - name: Notarize app bundle - if: ${{ steps.secret-check.outputs.available == 'true' }} - env: - NOTARIZE_USERNAME: ${{ secrets.NOTARIZE_USERNAME }} - NOTARIZE_TEAM_ID: ${{ secrets.NOTARIZE_TEAM_ID }} - NOTARIZE_PASSWORD: ${{ secrets.NOTARIZE_PASSWORD }} - run: | - ditto -c -k --keepParent Gqrx.app Gqrx.zip - xcrun notarytool submit Gqrx.zip --apple-id "$NOTARIZE_USERNAME" --team-id "$NOTARIZE_TEAM_ID" --password "$NOTARIZE_PASSWORD" --wait - - name: Staple app bundle - if: ${{ steps.secret-check.outputs.available == 'true' }} - run: xcrun stapler staple --verbose Gqrx.app - - name: Create DMG - run: | - GQRX_VERSION=$(- - git - make - pacboy: >- - toolchain:p - cmake:p - ninja:p - libusb:p - boost:p - qt5:p - spdlog:p - volk:p - libsndfile:p - soapysdr:p - fftw:p - rtl-sdr:p - - name: Clone and build GNU Radio - shell: msys2 {0} - working-directory: ${{ runner.temp }} - run: | - git clone --depth 1 https://github.com/gnuradio/gnuradio.git - cd gnuradio - cmake -S . -B build \ - -DCMAKE_INSTALL_PREFIX=C:/gqrx \ - -DENABLE_DEFAULT=OFF \ - -DENABLE_COMMON_PCH=ON \ - -DENABLE_GNURADIO_RUNTIME=ON \ - -DENABLE_GR_ANALOG=ON \ - -DENABLE_GR_AUDIO=ON \ - -DENABLE_GR_BLOCKS=ON \ - -DENABLE_GR_DIGITAL=ON \ - -DENABLE_GR_FFT=ON \ - -DENABLE_GR_FILTER=ON \ - -DENABLE_GR_NETWORK=ON - cmake --build build - cmake --install build - - name: Clone and build gr-osmosdr - shell: msys2 {0} - working-directory: ${{ runner.temp }} - run: | - git clone https://gitea.osmocom.org/sdr/gr-osmosdr.git - cd gr-osmosdr - cmake -S . -B build \ - -DCMAKE_INSTALL_PREFIX=C:/gqrx \ - -DCMAKE_PREFIX_PATH=C:/gqrx \ - -DENABLE_DEFAULT=OFF \ - -DENABLE_RTL=ON \ - -DENABLE_SOAPY=ON - cmake --build build - cmake --install build - - name: Checkout code - uses: actions/checkout@v3 - - name: Configure, compile & install - shell: msys2 {0} - run: | - cmake -S . -B build \ - -DCMAKE_INSTALL_PREFIX=C:/gqrx \ - -DCMAKE_PREFIX_PATH=C:/gqrx - cmake --build build - cmake --install build diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml new file mode 100644 index 0000000000..71facee8e4 --- /dev/null +++ b/.github/workflows/win.yml @@ -0,0 +1,106 @@ +name: Test + +on: [push, pull_request] + +jobs: + windows-build: + runs-on: windows-latest + name: Windows + steps: + - name: Setup MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: >- + git + make + pacboy: >- + toolchain:p + cmake:p + ninja:p + libusb:p + boost:p + qt6-base:p + qt6-svg:p + spdlog:p + volk:p + libsndfile:p + soapysdr:p + fftw:p + rtl-sdr:p + - name: Clone and build GNU Radio + shell: msys2 {0} + working-directory: ${{ runner.temp }} + run: | + git clone --depth 1 https://github.com/gnuradio/gnuradio.git + cd gnuradio + cmake -S . -B build \ + -DCMAKE_INSTALL_PREFIX=D:/a/_temp/msys64/mingw64 \ + -DENABLE_DEFAULT=OFF \ + -DENABLE_COMMON_PCH=ON \ + -DENABLE_GNURADIO_RUNTIME=ON \ + -DENABLE_GR_ANALOG=ON \ + -DENABLE_GR_AUDIO=ON \ + -DENABLE_GR_BLOCKS=ON \ + -DENABLE_GR_DIGITAL=ON \ + -DENABLE_GR_FFT=ON \ + -DENABLE_GR_FILTER=ON \ + -DENABLE_GR_NETWORK=ON + cmake --build build + cmake --install build + - name: Clone and build gr-osmosdr + shell: msys2 {0} + working-directory: ${{ runner.temp }} + run: | + git clone https://gitea.osmocom.org/sdr/gr-osmosdr.git + cd gr-osmosdr + cmake -S . -B build \ + -DCMAKE_INSTALL_PREFIX=D:/a/_temp/msys64/mingw64 \ + -DENABLE_DEFAULT=OFF \ + -DENABLE_RTL=ON \ + -DENABLE_SOAPY=ON + cmake --build build + cmake --install build + - name: Checkout code + uses: actions/checkout@v3 + - name: Configure, compile & install + shell: msys2 {0} + run: | + cmake -S . -B build \ + -DCMAKE_INSTALL_PREFIX=D:/a/_temp/msys64/mingw64 + cmake --build build + cmake --install build + - name: Save artifact + uses: actions/upload-artifact@v3 + with: + name: gqrx-windows-${{ github.run_id }} + path: | + D:/a/_temp/msys64/mingw64/bin/gqrx.exe + D:/a/_temp/msys64/mingw64/bin/libboost_program_options-mt.dll + D:/a/_temp/msys64/mingw64/bin/libboost_thread-mt.dll + D:/a/_temp/msys64/mingw64/bin/libfftw3f-3.dll + D:/a/_temp/msys64/mingw64/bin/libfftw3f_threads-3.dll + D:/a/_temp/msys64/mingw64/bin/libFLAC.dll + D:/a/_temp/msys64/mingw64/bin/libfmt.dll + D:/a/_temp/msys64/mingw64/bin/libgcc_s_seh-1.dll + D:/a/_temp/msys64/mingw64/bin/libgnuradio-*.dll + D:/a/_temp/msys64/mingw64/bin/libmp3lame-0.dll + D:/a/_temp/msys64/mingw64/bin/libmpg123-0.dll + D:/a/_temp/msys64/mingw64/bin/libogg-0.dll + D:/a/_temp/msys64/mingw64/bin/libopus-0.dll + D:/a/_temp/msys64/mingw64/bin/liborc-0.4-0.dll + D:/a/_temp/msys64/mingw64/bin/librtlsdr.dll + D:/a/_temp/msys64/mingw64/bin/libsndfile-1.dll + D:/a/_temp/msys64/mingw64/bin/libSoapySDR.dll + D:/a/_temp/msys64/mingw64/bin/libspdlog.dll + D:/a/_temp/msys64/mingw64/bin/libstdc++-6.dll + D:/a/_temp/msys64/mingw64/bin/libvolk.dll + D:/a/_temp/msys64/mingw64/bin/libvorbis-0.dll + D:/a/_temp/msys64/mingw64/bin/libvorbisenc-2.dll + D:/a/_temp/msys64/mingw64/bin/libwinpthread-1.dll + D:/a/_temp/msys64/mingw64/bin/Qt6Core.dll + D:/a/_temp/msys64/mingw64/bin/Qt6Gui.dll + D:/a/_temp/msys64/mingw64/bin/Qt6Network.dll + D:/a/_temp/msys64/mingw64/bin/Qt6SvgWidgets.dll + D:/a/_temp/msys64/mingw64/bin/Qt6Widgets.dll