forked from f4exb/sdrangel
-
Notifications
You must be signed in to change notification settings - Fork 0
140 lines (137 loc) · 5.33 KB
/
sdrangel.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# https://stackoverflow.com/questions/69126323/github-actions-creating-releases-for-multiple-branches-in-a-single-workflow
# https://gist.github.com/NickNaso/0d478f1481686d5bcc868cac06620a60
name: SDRangel CI/CD
on:
push:
branches:
- master
- mac_ci
tags:
- 'v*'
pull_request:
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows-x64",
WIN_ARCH: "x64",
os: windows-latest,
QT_INST_DIR: "C:/",
QTDIR: "C:/Qt/5.15.2/msvc2019_64",
QT_ARCH: win64_msvc2019_64,
boost_dl: "${{ github.workspace }}\\downloads\\boost",
lib_dir: "C:\\Libraries",
generators: Ninja
}
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
echo github.ref: ${{ github.ref }}
echo github.workspace: ${{ github.workspace }}
- name: Install basic dependencies on Windows
if: startsWith(matrix.config.os, 'windows')
run: |
choco install ninja cmake
ninja --version
cmake --version
- name: Install MSVC on Windows
if: startsWith(matrix.config.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install Boost
env:
BOOST_ROOT: ${{ matrix.config.boost_dl }}
BOOST_DEST: ${{ matrix.config.lib_dir }}
BOOST_URL: https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.bz2
run: |
mkdir -p $BOOST_ROOT
mkdir -p $BOOST_DEST
curl --progress-bar --location --output $BOOST_ROOT/download.tar.bz2 $BOOST_URL
7z -o$BOOST_ROOT x $BOOST_ROOT/download.tar.bz2 -y -bd
7z -o$BOOST_ROOT x $BOOST_ROOT/download.tar -y -bd
cd $BOOST_ROOT && cp -r boost_* $BOOST_DEST
ls -l $BOOST_DEST
ls -l "C:\\"
rm -rf boost_*/* download.tar.bz2 download.tar
shell: bash
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
dir: ${{matrix.config.QT_INST_DIR}}
arch: ${{matrix.config.QT_ARCH}}
setup-python: false
modules: 'qtcharts qtwebengine'
- name: build sdrangel on Windows
if: startsWith(matrix.config.os, 'windows')
run: |
cmd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
choco install patch
mkdir build && cd build
cmake .. -G "${{ matrix.config.generators }}" -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=SSE4_2 -DDEBUG_OUTPUT=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DCMAKE_PREFIX_PATH="C:\Qt\5.15.2\msvc2019_64;C:\Libraries\boost_1_73_0"
cmake --build . --config Release --target package
- name: Check disk space
run: Get-PSDrive
- name: Get version
id: get_version
run: echo "version=$(grep sdrangel_VERSION build/CMakeCache.txt | cut -d "=" -f2)" >> $env:GITHUB_OUTPUT
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: sdrangel-${{ steps.get_version.outputs.version }}-win64.exe
path: ${{ github.workspace }}/build/sdrangel-${{ steps.get_version.outputs.version }}-win64.exe
- name: Upload release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/[email protected]
with:
files: ${{ github.workspace }}/build/sdrangel-${{ steps.get_version.outputs.version }}-win64.exe
build_mac:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Update brew
run: brew update
- name: Install brew packages
run: brew install nasm boost hidapi libusb fftw ffmpeg faad2 zlib airspy airspyhf hackrf rtl-sdr libbladerf soapysdr qt
- name: Install brew uhd package
run: |
rm -f /usr/local/bin/2to3*
rm -f /usr/local/bin/idle3
rm -f /usr/local/bin/pydoc3
rm -f /usr/local/bin/python3
rm -f /usr/local/bin/python3-config
brew install uhd
- name: Install brew opencv package
run: |
rm -f /usr/local/bin/2to3
brew install opencv
- name: Configure SDRangel
run: |
mkdir build && cd build
cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_QT6=ON -DCMAKE_BUILD_TYPE=Release -DARCH_OPT=nehalem -DDEBUG_OUTPUT=ON -DENABLE_MIRISDR=OFF -DBUILD_SERVER=OFF -DENABLE_EXTERNAL_LIBRARIES=AUTO -DBUNDLE=ON -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=TRUE
- name: Get filename
id: get_filename
run: echo "filename=$(grep CPACK_PACKAGE_FILE_NAME build/CMakeCache.txt | cut -d "=" -f2)" >> $GITHUB_OUTPUT
- name: Build SDRangel on Mac
run: |
cd build
make package -j3
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.get_filename.outputs.filename }}.dmg
path: ${{ github.workspace }}/build/${{ steps.get_filename.outputs.filename }}.dmg