forked from myriadrf/LimeSuiteNG
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (88 loc) · 4.8 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
92
93
94
95
96
97
98
99
100
101
102
103
104
name: CMake
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
SOAPY_SDR_BRANCH: master
INSTALL_PREFIX: ${{github.workspace}}/deps
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
compiler: gcc
- os: ubuntu-latest
compiler: clang
- os: windows-latest
compiler: msvc
arch: x64
- os: windows-latest
compiler: msvc
arch: Win32
- os: macos-latest
compiler: clang
steps:
- uses: actions/checkout@v4
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -qq gnuradio-dev libusb-1.0-0-dev libwxbase3.0-dev libwxgtk3.0-gtk3-dev liboctave-dev
- name: Install macOS dependencies
if: matrix.os == 'macos-latest'
run: brew install castxml gnuradio pybind11 wxwidgets
- name: Download Windows dependencies
if: matrix.os == 'windows-latest'
run: |
mkdir ${{github.workspace}}/deps
curl -o ${{github.workspace}}/deps/FX3SDK.zip -L https://downloads.myriadrf.org/project/limesuite/appveyor/FX3SDK.zip
7z x ${{github.workspace}}/deps/FX3SDK.zip -o${{github.workspace}}/deps/FX3SDK
curl -o ${{github.workspace}}/deps/wxWidgets-headers.7z -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.4/wxWidgets-3.2.4-headers.7z
7z x ${{github.workspace}}/deps/wxWidgets-headers.7z -o${{github.workspace}}/deps/wxWidgets
- name: Download Windows dependencies (64-bit wxWidgets)
if: matrix.os == 'windows-latest' && matrix.arch == 'x64'
run: |
curl -o ${{github.workspace}}/deps/wxWidgets.7z -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.4/wxMSW-3.2.4_vc14x_x64_Dev.7z
7z x ${{github.workspace}}/deps/wxWidgets.7z -o${{github.workspace}}/deps/wxWidgets
- name: Download Windows dependencies (32-bit wxWidgets)
if: matrix.os == 'windows-latest' && matrix.arch == 'Win32'
run: |
curl -o ${{github.workspace}}/deps/wxWidgets.7z -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.4/wxMSW-3.2.4_vc14x_Dev.7z
7z x ${{github.workspace}}/deps/wxWidgets.7z -o${{github.workspace}}/deps/wxWidgets
- name: Install SoapySDR from source
if: matrix.os != 'macos-latest' # Not needed on Mac OS because it is installed as a GNU Radio dependency
run: |
git clone -b ${{env.SOAPY_SDR_BRANCH}} --depth 1 https://github.com/pothosware/SoapySDR.git
cd SoapySDR
mkdir build && cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_APPS=OFF -DENABLE_TESTS=OFF -DENABLE_PYTHON3=OFF
cmake --build .
cmake --build . --target install
- name: Configure CMake (Windows)
if: matrix.os == 'windows-latest' && matrix.compiler == 'msvc'
run: cmake -B ${{github.workspace}}/build -A${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DwxWidgets_ROOT_DIR=${{github.workspace}}/deps/wxWidgets -DFX3_SDK_RELATIVE_PATH=deps/FX3SDK
- name: Configure CMake (GCC)
if: matrix.compiler == 'gcc'
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DINSTALL_KERNEL_MODULE=0 -DENABLE_UDEV_RULES=0
- name: Configure CMake (Clang)
if: matrix.compiler == 'clang'
run: cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DINSTALL_KERNEL_MODULE=0 -DENABLE_UDEV_RULES=0
- name: Configure GNU Radio in-tree CMake (mac)
if: matrix.os == 'macos-latest'
run: cmake -B ${{github.workspace}}/build -DENABLE_GNURADIO=1
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Build GNU Radio plug-in by itself (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install
cmake -B ${{github.workspace}}/plugins/gr-limesdr/build -S ${{github.workspace}}/plugins/gr-limesdr -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}}
cmake --build ${{github.workspace}}/plugins/gr-limesdr/build --config ${{env.BUILD_TYPE}}