forked from myriadrf/LimeSuiteNG
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (75 loc) · 3.9 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
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
SOAPY_SDR_BRANCH: master
INSTALL_PREFIX: ${{github.workspace}}/deps
CMAKE_OPTIONS: -DINSTALL_KERNEL_MODULE=0 -DENABLE_UDEV_RULES=0 -DENABLE_GNURADIO=0
jobs:
buildLinux:
name: Build Linux
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc, clang]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -qq gnuradio-dev libusb-1.0-0-dev libwxbase3.0-dev libwxgtk3.0-gtk3-dev
- name: Configure CMake (GCC)
if: matrix.compiler == 'gcc'
run: cmake -B ${{github.workspace}}/build_${{ matrix.compiler }} -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} ${{env.CMAKE_OPTIONS}}
- name: Configure CMake (Clang)
if: matrix.compiler == 'clang'
run: cmake -B ${{github.workspace}}/build_${{ matrix.compiler }} -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} ${{env.CMAKE_OPTIONS}}
- name: Build
run: cmake --build ${{github.workspace}}/build_${{ matrix.compiler }} --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}}
buildWindows:
name: Build Windows
runs-on: windows-latest
strategy:
matrix:
arch: [x64, Win32]
steps:
- uses: actions/checkout@v4
- name: Download dependencies
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 dependencies (64-bit wxWidgets)
if: 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 dependencies (32-bit wxWidgets)
if: 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: Configure CMake
run: cmake -B ${{github.workspace}}/build -A${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} ${{env.CMAKE_OPTIONS}} -DwxWidgets_ROOT_DIR=${{github.workspace}}/deps/wxWidgets -DFX3_SDK_RELATIVE_PATH=deps/FX3SDK
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}}
buildOSX:
name: Build MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install wxwidgets
# castxml gnuradio pybind11
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} ${{env.CMAKE_OPTIONS}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.CMAKE_BUILD_PARALLEL_LEVEL}}