Skip to content

Commit

Permalink
Merge pull request #98 from pothosware/ci-improvements
Browse files Browse the repository at this point in the history
ci: updating platform support to match SoapySDR as much as possible
  • Loading branch information
ncorgan authored Nov 26, 2022
2 parents f7dca6e + b0110bb commit 38b0a1e
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 86 deletions.
204 changes: 119 additions & 85 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,186 +3,220 @@ 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
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
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 38b0a1e

Please sign in to comment.