|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ develop ] |
| 6 | + pull_request: |
| 7 | + branches: [ develop ] |
| 8 | + workflow_dispatch: |
| 9 | + inputs: |
| 10 | + debug_enabled: |
| 11 | + description: 'Build and run interactive shell' |
| 12 | + required: false |
| 13 | + default: false |
| 14 | + |
| 15 | +env: |
| 16 | + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) |
| 17 | + BUILD_TYPE: Release |
| 18 | + |
| 19 | +jobs: |
| 20 | + # Installation of dependencies is too OS-dependent now, we don't |
| 21 | + # miss that much by particularizing this in a per-OS basis. |
| 22 | + |
| 23 | + build-linux: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 26 | + - name: Setup interactive shell session |
| 27 | + uses: mxschmitt/action-tmate@v3 |
| 28 | + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} |
| 29 | + |
| 30 | + - name: Install sndfile |
| 31 | + run: sudo apt-get install libsndfile1-dev |
| 32 | + |
| 33 | + - name: Install Volk |
| 34 | + run: sudo apt-get install libvolk2-dev |
| 35 | + |
| 36 | + - name: Install FFTW3 |
| 37 | + run: sudo apt-get install libfftw3-dev |
| 38 | + |
| 39 | + - name: Install SoapySDR modules |
| 40 | + run: sudo apt-get install soapysdr-module-all |
| 41 | + |
| 42 | + - name: Install SoapySDR development files |
| 43 | + run: sudo apt-get install libsoapysdr-dev |
| 44 | + |
| 45 | + - name: Install libxml2 |
| 46 | + run: sudo apt-get install libxml2-dev |
| 47 | + |
| 48 | + - name: Install portaudio |
| 49 | + run: sudo apt-get install portaudio19-dev |
| 50 | + |
| 51 | + - name: Checkout (sigutils) |
| 52 | + uses: actions/checkout@v2 |
| 53 | + with: |
| 54 | + repository: BatchDrake/sigutils |
| 55 | + ref: refs/heads/develop |
| 56 | + path: sigutils |
| 57 | + |
| 58 | + - name: Configure CMake (sigutils) |
| 59 | + run: cmake -DCMAKE_INSTALL_PREFIX=/usr -B ${{github.workspace}}/sigutils/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} sigutils |
| 60 | + |
| 61 | + - name: Build (sigutils) |
| 62 | + run: cmake --build ${{github.workspace}}/sigutils/build --config ${{env.BUILD_TYPE}} |
| 63 | + |
| 64 | + - name: Install system-wide (sigutils) |
| 65 | + run: sudo cmake --build ${{github.workspace}}/sigutils/build --config ${{env.BUILD_TYPE}} --target install |
| 66 | + |
| 67 | + - name: Checkout (suscan) |
| 68 | + uses: actions/checkout@v2 |
| 69 | + with: |
| 70 | + path: suscan |
| 71 | + |
| 72 | + - name: Configure CMake (suscan) |
| 73 | + run: cmake -DCMAKE_INSTALL_PREFIX=/usr -B ${{github.workspace}}/suscan/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} suscan |
| 74 | + |
| 75 | + - name: Build (suscan) |
| 76 | + run: cmake --build ${{github.workspace}}/suscan/build --config ${{env.BUILD_TYPE}} |
| 77 | + |
| 78 | + |
| 79 | + build-macos: |
| 80 | + runs-on: macos-latest |
| 81 | + steps: |
| 82 | + - name: Setup interactive shell session |
| 83 | + uses: mxschmitt/action-tmate@v3 |
| 84 | + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} |
| 85 | + |
| 86 | + - name: Install sndfile |
| 87 | + run: brew install libsndfile |
| 88 | + |
| 89 | + - name: Install Volk |
| 90 | + run: brew install volk |
| 91 | + |
| 92 | + - name: Install FFTW3 |
| 93 | + run: brew install fftw |
| 94 | + |
| 95 | + - name: Adding SoapySDR taps (Pothos) |
| 96 | + run: brew tap pothosware/homebrew-pothos && brew update |
| 97 | + |
| 98 | + - name: Install SoapySDR (Pothos) |
| 99 | + run: brew install pothossoapy |
| 100 | + |
| 101 | + - name: Install SDRPlay API |
| 102 | + run: wget https://www.sdrplay.com/software/SDRplay_RSP_API-MacOSX-3.07.3.pkg && sudo installer -pkg SDRplay_RSP_API-MacOSX-3.07.3.pkg -target / |
| 103 | + |
| 104 | + - name: Build and install SoapySDR module for SDRPlay |
| 105 | + run: git clone https://github.com/pothosware/SoapySDRPlay3 && cd SoapySDRPlay3 && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make -j3 && sudo make install && cd ../../ |
| 106 | + |
| 107 | + # soapyaudio removed from due to deprecated hamlib API |
| 108 | + - name: Install SoapySDR modules (Pothos) |
| 109 | + run: brew install soapyrtlsdr soapyhackrf soapybladerf soapyairspy soapyairspyhf soapyosmo soapyuhd soapyredpitaya soapyiris limesuite soapyplutosdr |
| 110 | + |
| 111 | + - name: Install libxml2 |
| 112 | + run: brew install libxml2 |
| 113 | + |
| 114 | + - name: Install portaudio |
| 115 | + run: brew install portaudio |
| 116 | + |
| 117 | + - name: Checkout (sigutils) |
| 118 | + uses: actions/checkout@v2 |
| 119 | + with: |
| 120 | + repository: BatchDrake/sigutils |
| 121 | + ref: refs/heads/develop |
| 122 | + path: sigutils |
| 123 | + |
| 124 | + - name: Configure CMake (sigutils) |
| 125 | + run: cmake -DCMAKE_INSTALL_PREFIX=/usr -B ${{github.workspace}}/sigutils/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} sigutils |
| 126 | + |
| 127 | + - name: Build (sigutils) |
| 128 | + run: cmake --build ${{github.workspace}}/sigutils/build --config ${{env.BUILD_TYPE}} |
| 129 | + |
| 130 | + - name: Install system-wide (sigutils) |
| 131 | + run: sudo cmake --build ${{github.workspace}}/sigutils/build --config ${{env.BUILD_TYPE}} --target install |
| 132 | + |
| 133 | + - name: Checkout (suscan) |
| 134 | + uses: actions/checkout@v2 |
| 135 | + with: |
| 136 | + path: suscan |
| 137 | + |
| 138 | + - name: Configure CMake (suscan) |
| 139 | + run: cmake -DCMAKE_INSTALL_PREFIX=/usr -B ${{github.workspace}}/suscan/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} suscan |
| 140 | + |
| 141 | + - name: Build (suscan) |
| 142 | + run: cmake --build ${{github.workspace}}/suscan/build --config ${{env.BUILD_TYPE}} |
0 commit comments