forked from myriadrf/LimeSuiteNG
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (73 loc) · 3.03 KB
/
cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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
INSTALL_PREFIX: ${{github.workspace}}/deps
CMAKE_OPTIONS: -DINSTALL_KERNEL_MODULE=0 -DENABLE_UDEV_RULES=0
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: Add GNURadio PPA
if: ${{ matrix.os == 'ubuntu-22.04'}}
run: |
sudo add-apt-repository ppa:gnuradio/gnuradio-releases
- name: Install GNURadio
if: ${{ matrix.os != 'ubuntu-20.04'}}
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=on
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}}
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}}
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=on
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}}