cmake formatting #456
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build All | |
on: | |
workflow_dispatch: | |
push: | |
branches: [develop] | |
pull_request: | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
CMAKE_BUILD_PARALLEL_LEVEL: 2 | |
CMAKE_OPTIONS: | |
jobs: | |
build-Linux: | |
name: Linux build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04] | |
compiler: [ {cpp: g++, c: gcc}, {cpp: clang++, c: clang} ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install GNURadio | |
if: ${{ matrix.os != 'ubuntu-20.04'}} # 20.04 has GNURadio 3.8.1, it's python bindings are not using pybind11, so not compatible | |
run: | | |
sudo apt-get update | |
sudo apt-get install -qq gnuradio-dev python3-packaging | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo ${{github.workspace}}/install_dependencies.sh | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{env.CMAKE_OPTIONS}} -DCMAKE_UNITY_BUILD=false | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}} | |
- name: Install | |
run: sudo cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}} --target install | |
build-Windows: | |
name: Windows build | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x64, Win32] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install SoapySDR from source | |
run: | | |
git clone -b master --depth 1 https://github.com/pothosware/SoapySDR.git | |
cd SoapySDR | |
mkdir build && cd build | |
cmake ../ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_APPS=OFF -DENABLE_TESTS=OFF -DENABLE_PYTHON3=OFF -DENABLE_CSHARP=OFF | |
cmake --build . --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}} | |
cmake --build . --target install | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -A${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{env.CMAKE_OPTIONS}} | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}} | |
- name: Install | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}} --target install | |
build-MacOS: | |
name: MacOS build | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
# GNURadio plugin fails to build due to issues with spdlog dependency | |
run: brew install wxwidgets soapysdr gnuradio pybind11 castxml | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{env.CMAKE_OPTIONS}} -DCMAKE_UNITY_BUILD=false | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}} |