From b0110bb29113943adca7bb4d684fc1f4cec139e4 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Sat, 26 Nov 2022 12:33:39 -0600 Subject: [PATCH] ci: expanded to more closely match SoapySDR's CI coverage * Some configs commented out until SoapySDR bugs fixed * MinGW doesn't work yet --- .github/workflows/ci.yml | 204 +++++++++++++++++++++++---------------- CMakeLists.txt | 2 +- 2 files changed, 120 insertions(+), 86 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2f5976..22b106c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,62 +3,62 @@ on: [push, pull_request] jobs: linux-ci: name: Linux - runs-on: ubuntu-latest strategy: fail-fast: false matrix: - include: + build_type: [Release, Debug] + config: - cc: gcc-9 cxx: g++-9 - build_type: Release - - cc: gcc-9 - cxx: g++-9 - build_type: Debug + os: ubuntu-20.04 - cc: gcc-10 cxx: g++-10 - build_type: Release - - cc: gcc-10 - cxx: g++-10 - build_type: Debug + os: ubuntu-20.04 + + - cc: gcc-11 + cxx: g++-11 + os: ubuntu-22.04 + + - cc: gcc-12 + cxx: g++-12 + os: ubuntu-22.04 - cc: clang-10 cxx: clang++-10 - build_type: Release - - cc: clang-10 - cxx: clang++-10 - build_type: Debug + os: ubuntu-20.04 - cc: clang-11 cxx: clang++-11 - build_type: Release - - cc: clang-11 - cxx: clang++-11 - build_type: Debug + os: ubuntu-20.04 - cc: clang-12 cxx: clang++-12 - build_type: Release - - cc: clang-12 - cxx: clang++-12 - build_type: Debug + os: ubuntu-20.04 + + - cc: clang-13 + cxx: clang++-13 + os: ubuntu-22.04 + + - cc: clang-14 + cxx: clang++-14 + os: ubuntu-22.04 + runs-on: ${{matrix.config.os}} env: - CC: ${{matrix.cc}} - CXX: ${{matrix.cxx}} + CC: ${{matrix.config.cc}} + CXX: ${{matrix.config.cxx}} INSTALL_PREFIX: /usr/local steps: - uses: actions/checkout@v2 - name: Install dependencies run: | sudo apt install -y libavahi-client-dev libavahi-common-dev - cd ${{runner.workspace}} # Build against earliest supported SoapySDR - git clone https://github.com/pothosware/SoapySDR -b soapy-sdr-0.8.0 + git clone https://github.com/pothosware/SoapySDR -b soapy-sdr-0.8.1 mkdir SoapySDR/build cd SoapySDR/build cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DENABLE_PYTHON=OFF -DENABLE_PYTHON3=OFF .. - make sudo make install sudo ldconfig - name: Build SoapyRemote @@ -66,123 +66,157 @@ jobs: mkdir ${{github.workspace}}/build cd ${{github.workspace}}/build cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{github.workspace}} - make - - name: Install - run: | - cd ${{github.workspace}}/build sudo make install - name: Test module registration run: | SoapySDRUtil --check=remote osx-ci: name: OS X - runs-on: macos-latest strategy: fail-fast: false matrix: - include: + build_type: [Release, Debug] + config: - cc: clang cxx: clang++ - build_type: Release - - cc: clang - cxx: clang++ - build_type: Debug + os: macos-11 + + # TODO: re-enable after MacOS Monterey Python issue fixed + #- cc: clang + # cxx: clang++ + # os: macos-12 + runs-on: ${{matrix.config.os}} env: - CC: ${{matrix.cc}} - CXX: ${{matrix.cxx}} + CC: ${{matrix.config.cc}} + CXX: ${{matrix.config.cxx}} INSTALL_PREFIX: /usr/local steps: - uses: actions/checkout@v2 - - name: Install SoapySDR + - name: Install dependencies run: | - cd ${{runner.workspace}} - - # Build against earliest supported SoapySDR - git clone https://github.com/pothosware/SoapySDR -b soapy-sdr-0.8.0 - mkdir SoapySDR/build - cd SoapySDR/build - cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DENABLE_PYTHON=OFF -DENABLE_PYTHON3=OFF .. - make - sudo make install + brew install soapysdr - name: Build SoapyRemote run: | mkdir ${{github.workspace}}/build cd ${{github.workspace}}/build cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{github.workspace}} - make - - name: Install - run: | - cd ${{github.workspace}}/build sudo make install - name: Test module registration run: | SoapySDRUtil --check=remote windows-ci: name: Windows - runs-on: windows-latest strategy: fail-fast: false matrix: - # Note: keeping cmake_config general enough for non-MSVC later - include: - - cmake_config: -G "Visual Studio 14 2015" -A "Win32" - arch: win32 - build_type: Release + build_type: [Release, Debug] + config: + # + # MSVC + # + - cmake_config: -G "Visual Studio 14 2015" -A "Win32" arch: win32 - build_type: Debug + os: windows-2019 + msvc: true - cmake_config: -G "Visual Studio 14 2015" -A "x64" arch: x64 - build_type: Release - - cmake_config: -G "Visual Studio 14 2015" -A "x64" - arch: x64 - build_type: Debug - - # Note: skipping VS2017, possible bugginess in parallel installs + os: windows-2019 + msvc: true - cmake_config: -G "Visual Studio 16 2019" -A "Win32" arch: win32 - build_type: Release - - cmake_config: -G "Visual Studio 16 2019" -A "Win32" - arch: win32 - build_type: Debug + os: windows-2019 + msvc: true - cmake_config: -G "Visual Studio 16 2019" -A "x64" arch: x64 - build_type: Release - - cmake_config: -G "Visual Studio 16 2019" -A "x64" + os: windows-2019 + msvc: true + + - cmake_config: -G "Visual Studio 17 2022" -A "Win32" + arch: win32 + os: windows-2022 + msvc: true + + - cmake_config: -G "Visual Studio 17 2022" -A "x64" arch: x64 - build_type: Release + os: windows-2022 + msvc: true + runs-on: ${{matrix.config.os}} env: INSTALL_PREFIX: 'C:\Program Files\SoapySDR' steps: - uses: actions/checkout@v2 - uses: ilammy/msvc-dev-cmd@v1 + if: + ${{matrix.config.msvc == true}} with: - arch: ${{matrix.arch}} + arch: ${{matrix.config.arch}} - name: Install SoapySDR run: | cd ${{runner.workspace}} - # Build against earliest supported SoapySDR - git clone https://github.com/pothosware/SoapySDR -b soapy-sdr-0.8.0 - mkdir SoapySDR\build - cd SoapySDR\build - cmake -DCMAKE_INSTALL_PREFIX="$Env:INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DENABLE_PYTHON=OFF -DENABLE_PYTHON3=OFF .. + # Build against earliest compatible SoapySDR + git clone https://github.com/pothosware/SoapySDR + cd SoapySDR + git checkout 6f48f370fc5a196bb850cc4146143d7bd98f43bc + mkdir build + cd build + cmake ${{matrix.config.cmake_config}} -DENABLE_PYTHON=OFF -DCMAKE_INSTALL_PREFIX="$Env:INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} .. cmake --build . --config ${{matrix.build_type}} cmake --install . --config ${{matrix.build_type}} - name: Build SoapyRemote run: | - mkdir ${{github.workspace}}/build - cd ${{github.workspace}}/build - cmake -DCMAKE_PREFIX_PATH="$Env:INSTALL_PREFIX" -DCMAKE_INSTALL_PREFIX="$Env:INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{github.workspace}} + $Env:INCLUDE += ";$Env:INSTALL_PREFIX\include" + $Env:LIB += ";$Env:INSTALL_PREFIX\lib" + mkdir build + cd build + cmake ${{matrix.config.cmake_config}} -DCMAKE_INSTALL_PREFIX="$Env:INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} .. cmake --build . --config ${{matrix.build_type}} - - name: Install - run: | - cd ${{github.workspace}}/build cmake --install . --config ${{matrix.build_type}} - name: Test module registration run: | $Env:PATH += ";$Env:INSTALL_PREFIX\bin" SoapySDRUtil --check=remote + freebsd-ci: + name: FreeBSD + runs-on: macos-12 + strategy: + fail-fast: false + matrix: + build_type: [Release, Debug] + release: ["12.3", "13.0", "13.1"] + steps: + - uses: actions/checkout@v2 + - uses: vmactions/freebsd-vm@v0 + name: Test in FreeBSD + with: + release: ${{matrix.release}} + copyback: false + prepare: | + pkg install -y cmake SoapySDR net/avahi + run: | + # We can't separate these steps, so add prints for clarity. + + echo + echo "----------------------------------" + echo "Building..." + echo "----------------------------------" + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} .. + make + + echo + echo "----------------------------------" + echo "Installing..." + echo "----------------------------------" + make install + + echo + echo "----------------------------------" + echo "Testing module registration..." + echo "----------------------------------" + SoapySDRUtil --check=remote diff --git a/CMakeLists.txt b/CMakeLists.txt index 60acb89..8885761 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "") include(GNUInstallDirs) #find soapy sdr with modern cmake support -find_package(SoapySDR "0.8.0" CONFIG) +find_package(SoapySDR "0.8.1" CONFIG) if(MSVC) #we always want to use multiple cores for compilation