|
| 1 | +name: CI |
| 2 | +on: [push, pull_request] |
| 3 | +jobs: |
| 4 | + linux-ci: |
| 5 | + name: Linux |
| 6 | + runs-on: ubuntu-latest |
| 7 | + strategy: |
| 8 | + fail-fast: false |
| 9 | + matrix: |
| 10 | + include: |
| 11 | + - cc: gcc-9 |
| 12 | + cxx: g++-9 |
| 13 | + build_type: Release |
| 14 | + - cc: gcc-9 |
| 15 | + cxx: g++-9 |
| 16 | + build_type: Debug |
| 17 | + |
| 18 | + - cc: gcc-10 |
| 19 | + cxx: g++-10 |
| 20 | + build_type: Release |
| 21 | + - cc: gcc-10 |
| 22 | + cxx: g++-10 |
| 23 | + build_type: Debug |
| 24 | + |
| 25 | + - cc: clang-10 |
| 26 | + cxx: clang++-10 |
| 27 | + build_type: Release |
| 28 | + - cc: clang-10 |
| 29 | + cxx: clang++-10 |
| 30 | + build_type: Debug |
| 31 | + |
| 32 | + - cc: clang-11 |
| 33 | + cxx: clang++-11 |
| 34 | + build_type: Release |
| 35 | + - cc: clang-11 |
| 36 | + cxx: clang++-11 |
| 37 | + build_type: Debug |
| 38 | + |
| 39 | + - cc: clang-12 |
| 40 | + cxx: clang++-12 |
| 41 | + build_type: Release |
| 42 | + - cc: clang-12 |
| 43 | + cxx: clang++-12 |
| 44 | + build_type: Debug |
| 45 | + env: |
| 46 | + CC: ${{matrix.cc}} |
| 47 | + CXX: ${{matrix.cxx}} |
| 48 | + INSTALL_PREFIX: /usr/local |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v2 |
| 51 | + - name: Install dependencies |
| 52 | + run: | |
| 53 | + sudo apt install -y libavahi-client-dev libavahi-common-dev |
| 54 | + cd ${{runner.workspace}} |
| 55 | +
|
| 56 | + # Build against earliest supported SoapySDR |
| 57 | + git clone https://github.com/pothosware/SoapySDR -b soapy-sdr-0.4.0 |
| 58 | + mkdir SoapySDR/build |
| 59 | + cd SoapySDR/build |
| 60 | + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DENABLE_PYTHON=OFF -DENABLE_PYTHON3=OFF .. |
| 61 | + make |
| 62 | + sudo make install |
| 63 | + sudo ldconfig |
| 64 | + - name: Build SoapyRemote |
| 65 | + run: | |
| 66 | + mkdir ${{github.workspace}}/build |
| 67 | + cd ${{github.workspace}}/build |
| 68 | + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{github.workspace}} |
| 69 | + make |
| 70 | + - name: Install |
| 71 | + run: | |
| 72 | + cd ${{github.workspace}}/build |
| 73 | + sudo make install |
| 74 | + - name: Test module registration |
| 75 | + run: | |
| 76 | + SoapySDRUtil --check=remote |
| 77 | + osx-ci: |
| 78 | + name: OS X |
| 79 | + runs-on: macos-latest |
| 80 | + strategy: |
| 81 | + fail-fast: false |
| 82 | + matrix: |
| 83 | + include: |
| 84 | + - cc: clang |
| 85 | + cxx: clang++ |
| 86 | + build_type: Release |
| 87 | + - cc: clang |
| 88 | + cxx: clang++ |
| 89 | + build_type: Debug |
| 90 | + env: |
| 91 | + CC: ${{matrix.cc}} |
| 92 | + CXX: ${{matrix.cxx}} |
| 93 | + INSTALL_PREFIX: /usr/local |
| 94 | + steps: |
| 95 | + - uses: actions/checkout@v2 |
| 96 | + - name: Install SoapySDR |
| 97 | + run: | |
| 98 | + cd ${{runner.workspace}} |
| 99 | +
|
| 100 | + # Build against earliest supported SoapySDR |
| 101 | + git clone https://github.com/pothosware/SoapySDR -b soapy-sdr-0.4.0 |
| 102 | + mkdir SoapySDR/build |
| 103 | + cd SoapySDR/build |
| 104 | + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DENABLE_PYTHON=OFF -DENABLE_PYTHON3=OFF .. |
| 105 | + make |
| 106 | + sudo make install |
| 107 | + - name: Build SoapyRemote |
| 108 | + run: | |
| 109 | + mkdir ${{github.workspace}}/build |
| 110 | + cd ${{github.workspace}}/build |
| 111 | + cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{github.workspace}} |
| 112 | + make |
| 113 | + - name: Install |
| 114 | + run: | |
| 115 | + cd ${{github.workspace}}/build |
| 116 | + sudo make install |
| 117 | + - name: Test module registration |
| 118 | + run: | |
| 119 | + SoapySDRUtil --check=remote |
| 120 | + windows-ci: |
| 121 | + name: Windows |
| 122 | + runs-on: windows-latest |
| 123 | + strategy: |
| 124 | + fail-fast: false |
| 125 | + matrix: |
| 126 | + # Note: keeping cmake_config general enough for non-MSVC later |
| 127 | + include: |
| 128 | + - cmake_config: -G "Visual Studio 14 2015" -A "Win32" |
| 129 | + arch: win32 |
| 130 | + build_type: Release |
| 131 | + - cmake_config: -G "Visual Studio 14 2015" -A "Win32" |
| 132 | + arch: win32 |
| 133 | + build_type: Debug |
| 134 | + |
| 135 | + - cmake_config: -G "Visual Studio 14 2015" -A "x64" |
| 136 | + arch: x64 |
| 137 | + build_type: Release |
| 138 | + - cmake_config: -G "Visual Studio 14 2015" -A "x64" |
| 139 | + arch: x64 |
| 140 | + build_type: Debug |
| 141 | + |
| 142 | + # Note: skipping VS2017, possible bugginess in parallel installs |
| 143 | + |
| 144 | + - cmake_config: -G "Visual Studio 16 2019" -A "Win32" |
| 145 | + arch: win32 |
| 146 | + build_type: Release |
| 147 | + - cmake_config: -G "Visual Studio 16 2019" -A "Win32" |
| 148 | + arch: win32 |
| 149 | + build_type: Debug |
| 150 | + |
| 151 | + - cmake_config: -G "Visual Studio 16 2019" -A "x64" |
| 152 | + arch: x64 |
| 153 | + build_type: Release |
| 154 | + - cmake_config: -G "Visual Studio 16 2019" -A "x64" |
| 155 | + arch: x64 |
| 156 | + build_type: Release |
| 157 | + env: |
| 158 | + INSTALL_PREFIX: 'C:\Program Files\SoapySDR' |
| 159 | + steps: |
| 160 | + - uses: actions/checkout@v2 |
| 161 | + - uses: ilammy/msvc-dev-cmd@v1 |
| 162 | + with: |
| 163 | + arch: ${{matrix.arch}} |
| 164 | + - name: Install SoapySDR |
| 165 | + run: | |
| 166 | + cd ${{runner.workspace}} |
| 167 | +
|
| 168 | + # Build against earliest supported SoapySDR |
| 169 | + git clone https://github.com/pothosware/SoapySDR -b soapy-sdr-0.4.0 |
| 170 | + mkdir SoapySDR\build |
| 171 | + cd SoapySDR\build |
| 172 | + cmake -DCMAKE_INSTALL_PREFIX="$Env:INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DENABLE_PYTHON=OFF -DENABLE_PYTHON3=OFF .. |
| 173 | + cmake --build . --config ${{matrix.build_type}} |
| 174 | + cmake --install . --config ${{matrix.build_type}} |
| 175 | + - name: Build SoapyRemote |
| 176 | + run: | |
| 177 | + mkdir ${{github.workspace}}/build |
| 178 | + cd ${{github.workspace}}/build |
| 179 | + cmake -DCMAKE_PREFIX_PATH="$Env:INSTALL_PREFIX" -DCMAKE_INSTALL_PREFIX="$Env:INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{github.workspace}} |
| 180 | + cmake --build . --config ${{matrix.build_type}} |
| 181 | + - name: Install |
| 182 | + run: | |
| 183 | + cd ${{github.workspace}}/build |
| 184 | + cmake --install . --config ${{matrix.build_type}} |
| 185 | + - name: Test module registration |
| 186 | + run: | |
| 187 | + $Env:PATH += ";$Env:INSTALL_PREFIX\bin" |
| 188 | + SoapySDRUtil --check=remote |
0 commit comments