-
Notifications
You must be signed in to change notification settings - Fork 28
94 lines (74 loc) · 3.43 KB
/
Copy pathcmake.yml
File metadata and controls
94 lines (74 loc) · 3.43 KB
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
92
93
94
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]
compiler: [ {cpp: g++, c: gcc}, {cpp: clang++, c: clang} ]
steps:
- uses: actions/checkout@v6
- 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@v6
- name: Checkout SoapySDR
uses: actions/checkout@v6
with:
repository: pothosware/SoapySDR
path: ${{github.workspace}}/SoapySDR
- name: Build/Install SoapySDR from source
run: |
cmake -S ${{github.workspace}}/SoapySDR -B ${{github.workspace}}/SoapySDR/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_APPS=OFF -DENABLE_TESTS=OFF -DENABLE_PYTHON2=OFF -DENABLE_PYTHON3=OFF -DENABLE_CSHARP=OFF -DENABLE_DOCS=OFF
cmake --build ${{github.workspace}}/SoapySDR/build --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}}
cmake --build ${{github.workspace}}/SoapySDR/build --target install
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -A${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{env.CMAKE_OPTIONS}} -DBUILD_DOCS=OFF
- 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@v6
- 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}}